Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Drop special support for point spans at the end of files #31

Merged
merged 2 commits into from
Jan 29, 2019
Merged

Conversation

nex3
Copy link
Member

@nex3 nex3 commented Jan 26, 2019

This broke point spans at the beginning of lines elsewhere in the
file. Unfortunately, there's no way to disambiguate these currently.
SourceSpanWithContext doesn't have any information about where the
span appears in the context, so for point spans at column 0, it could
be at the beginning of the line or after the trailing newline.

We should eventually add something like
SourceSpanWithContext.indexInContext, but that'll require a breaking
release, since downstream users implement FileSpan as an interface.

This broke point spans at the beginning of lines elsewhere in the
file. Unfortunately, there's no way to disambiguate these currently.
SourceSpanWithContext doesn't have any information about where the
span appears in the context, so for point spans at column 0, it could
be at the beginning of the line or after the trailing newline.

We should eventually add something like
SourceSpanWithContext.indexInContext, but that'll require a breaking
release, since downstream users implement FileSpan as an interface.
@nex3 nex3 requested a review from srawlins January 26, 2019 01:41
@nex3
Copy link
Member Author

nex3 commented Jan 26, 2019

cc @natebosch

Copy link
Member

@srawlins srawlins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nex3 nex3 merged commit 1a97871 into master Jan 29, 2019
@nex3 nex3 deleted the fix-point-bol branch January 29, 2019 00:01
nex3 added a commit to sass/sass-spec that referenced this pull request Jan 29, 2019
This regresses the trailing newline spans for the reasons described in
dart-lang/source_span#31. I plan to fix these weird outputs later by
adjusting the span itself in Dart Sass.
nex3 pushed a commit to nex3/source_span that referenced this pull request Jul 2, 2024
* remove redundant experiment

* bump dev version

* bump dev version
mosuem pushed a commit to dart-lang/tools that referenced this pull request Dec 10, 2024
…ource_span#31)

Drop special support for point spans at the end of files

This broke point spans at the beginning of lines elsewhere in the
file. Unfortunately, there's no way to disambiguate these currently.
SourceSpanWithContext doesn't have any information about where the
span appears in the context, so for point spans at column 0, it could
be at the beginning of the line or after the trailing newline.

We should eventually add something like
SourceSpanWithContext.indexInContext, but that'll require a breaking
release, since downstream users implement FileSpan as an interface.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants