feat: change DebugSession::source_by_path() to return SourceCode enum#758
feat: change DebugSession::source_by_path() to return SourceCode enum#758
DebugSession::source_by_path() to return SourceCode enum#758Conversation
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #758 +/- ##
==========================================
+ Coverage 73.90% 74.19% +0.28%
==========================================
Files 69 70 +1
Lines 14952 15112 +160
==========================================
+ Hits 11051 11213 +162
+ Misses 3901 3899 -2 |
SourceCode enumDebugSession::source_by_path() to return SourceCode enum
loewenheim
left a comment
There was a problem hiding this comment.
Thanks for doing this!
61ea71c to
524ebfd
Compare
| let mut source_link_mappings = Vec::new(); | ||
| for cdi in CustomDebugInformationIterator::new(&result, SOURCE_LINK_KIND)? { | ||
| let cdi = cdi?; | ||
| // Note: only handle module #1 (do we actually handle multiple modules in any way??) |
There was a problem hiding this comment.
I believe there is only ever one module as defined in the specification.
Co-authored-by: Sebastian Zivota <loewenheim@users.noreply.github.com>
Co-authored-by: Sebastian Zivota <loewenheim@users.noreply.github.com>
|
Don't take this as blocking the merge but I think it might be sensible to think about this a bit more. These thoughts came to mind:
This to me implied there are multiple ways to refer to source, some of which might exist concurrencly. I wonder if it makes sense to revisit this abstraction. If we do decide that the return value is an enum and you gotta deal with it there, then we should make this |
cf65c78 to
647df89
Compare
|
Thanks @mitsuhiko, I've added the attribute. |
647df89 to
1bde15b
Compare
closes #735 - this changes
DebugSession::source_by_path()to return one of two options, a real source code, or an http source link.This is a breaking change so will require a new major version.