Skip to content
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

[1.x] Emit SourceInfos when incremental compilation fails #1306

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

Friendseeker
Copy link
Member

@Friendseeker Friendseeker commented Dec 9, 2023

This PR implements #932 via building SourceInfos from analysis callback and pass them to handleErrors in CompilerBridge.scala.

c.c. @adpi2

@Friendseeker Friendseeker changed the title Emits SourceInfos when incremental compilation fails Emit SourceInfos when incremental compilation fails Dec 9, 2023
@Friendseeker Friendseeker marked this pull request as ready for review December 9, 2023 20:49
Copy link
Member

@adpi2 adpi2 left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

Here are some small suggestions but apart from that it looks good to me.

@Friendseeker
Copy link
Member Author

Friendseeker commented Sep 27, 2024

@adpi2 Reopened this PR and added a unit test.

@eed3si9n c.c. #932 (comment) for reason for revisiting this PR. I am thinking if this can be merged along with #1309 as both involves adding AnalysisCallback3.

@eed3si9n
Copy link
Member

LGTM. could you squash the commits and add problem and solution descriptions in the commit message plz?

@Friendseeker Friendseeker changed the title Emit SourceInfos when incremental compilation fails [1.x] Emit SourceInfos when incremental compilation fails Sep 27, 2024
Zinc does not provide a way to surface list of all problems present in a
codebase.

This PR builds SourceInfos in Analysis Callback and in `handleErrors`,
the compiler bridge then throws an exception containing the SourceInfos
so build tools like sbt can access the informations.

Closes sbt#932
@Friendseeker
Copy link
Member Author

@eed3si9n Squashed!

@eed3si9n eed3si9n merged commit a1768b2 into sbt:1.10.x Sep 27, 2024
9 checks passed
@Friendseeker Friendseeker deleted the build-source-info branch September 27, 2024 18:45
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.

3 participants