Skip to content

Align PositionBridge#toString impl with Zinc #14910

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

Merged
merged 2 commits into from
Apr 12, 2022

Conversation

adpi2
Copy link
Member

@adpi2 adpi2 commented Apr 12, 2022

In sbt-bridge, the PositonBrdige#toString should return "<path>:<line>" as in Zinc.

Fixes sbt/zinc#1089

pos.toString formats the position as an offset rather than a line

Fixes sbt/zinc#1089
return pos.toString();
Optional<String> path = sourcePath();
if (path.isPresent())
return path.get() + ":" + line().orElse(-1).toString();
Copy link
Member

Choose a reason for hiding this comment

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

I'd put the column here too even though zinc didn't.

Copy link
Member Author

@adpi2 adpi2 Apr 12, 2022

Choose a reason for hiding this comment

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

@smarter smarter merged commit 1503044 into scala:main Apr 12, 2022
@adpi2 adpi2 deleted the sbt-position-tostring branch March 7, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source locations are formatted as offsets instead of line+column.
2 participants