Show line & column numbers#2056
Open
thomas-zahner wants to merge 3 commits intolycheeverse:masterfrom
Open
Conversation
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.
Fixes #1304
We call line & column numbers
spanandRawUriSpanin our code. Not sure if this is the best name, as it currently isn't really a span but a position, so the span is missing the end. But maybe we could update the span to include an end. (maybe not in this PR)I've removed html5ever as an experiment in the second commit, to show that it makes it possible to unwrap the column. It seems like we tried to not rely too much on html5ever and the code comments discourage its usage. Maybe it's a good point to remove it then, but I'm not quite sure and don't now the background story. @mre What do you think?
Then, I'm also open to discuss how the output looks like. Do you have a better proposal? The current one seems simple and quite straight forward, basically minimal changes.
Note that @mihaigalos's suggestion with
[./README.md:123:54]:would make the current grouping by input source impossible or it would lead to repetition of the input source.Oh and just noticed that this screws up caching as the requests differ in spans. See the new test failure
cli::test_caching_across_files.