-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: change DebugSession::source_by_path()
to return SourceCode
enum
#758
Conversation
|
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.