Closed
Conversation
f362838 to
555e808
Compare
Member
Author
|
We should probably add a separate method |
Member
Can you show an example? I really like how our |
BurntSushi
pushed a commit
that referenced
this pull request
Sep 6, 2024
This PR revives #6129, but is less bold: * It doesn't rename anything. (I think the rename is probably right though.) * It doesn't change the _default_ `Debug` impl. Instead, it offers this as a new `MarkerTree::debug_graph` method. I found this pretty useful for debugging since it gives a display format that is more faithful to the internal representation of a `MarkerTree`. So I think it's worth having around. But making it available in `Debug` is perhaps a bridge too far since it isn't as familiar as the typical PEP 508 representation and isn't as succinct. I did consider printing this when using `{:#?}` (i.e., the "alternate" debug representation), but too many things use that (like `insta` I think) to make it practical. Closes #6129
BurntSushi
pushed a commit
that referenced
this pull request
Sep 6, 2024
This PR revives #6129, but is less bold: * It doesn't rename anything. (I think the rename is probably right though.) * It doesn't change the _default_ `Debug` impl. Instead, it offers this as a new `MarkerTree::debug_graph` method. I found this pretty useful for debugging since it gives a display format that is more faithful to the internal representation of a `MarkerTree`. So I think it's worth having around. But making it available in `Debug` is perhaps a bridge too far since it isn't as familiar as the typical PEP 508 representation and isn't as succinct. I did consider printing this when using `{:#?}` (i.e., the "alternate" debug representation), but too many things use that (like `insta` I think) to make it practical. Closes #6129
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a simple
Debugrepresentation forMarkerTreebased on the underlying decision diagram. For example,python_version == '3.7' and os_name == 'Linux') or os_name == 'Windows'is displayed as:I'm not sure we want to use this form for our debug logs because it could be confusing to users but we've also run into issues where markers looked equal when simplified despite being represented slightly differently..