Skip to content

Run source generators in topological order #1819

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 1 commit into from
Sep 15, 2022

Conversation

Duhemm
Copy link
Collaborator

@Duhemm Duhemm commented Sep 15, 2022

Previously, the buildTarget/sources BSP request could fail in cases where the build included source generators that depend on the output of other source generators. This issue would happen because, in this case, the ordering in which the source generators would run wasn't clearly defined.

During a compilation task, this problem would not appear because the source generators would always be run after their dependencies have run.

To fix this problem in the BSP services, Bloop will now run the source generators in the topological order.

Previously, the `buildTarget/sources` BSP request could fail in cases
where the build included source generators that depend on the output of
other source generators. This issue would happen because, in this case,
the ordering in which the source generators would run wasn't clearly
defined.

During a compilation task, this problem would not appear because the
source generators would always be run after their dependencies have run.

To fix this problem in the BSP services, Bloop will now run the source
generators in the topological order.
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM!

@tgodzik tgodzik merged commit 75a0d6e into scalacenter:main Sep 15, 2022
@Duhemm Duhemm deleted the bsp-sources-topological-sort branch September 15, 2022 15:42
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.

None yet

2 participants