Skip to content

[2.x] fix: Undefined per-project settings order#8862

Merged
eed3si9n merged 1 commit intosbt:developfrom
seroperson:i7173-subproject-issue
Mar 3, 2026
Merged

[2.x] fix: Undefined per-project settings order#8862
eed3si9n merged 1 commit intosbt:developfrom
seroperson:i7173-subproject-issue

Conversation

@seroperson
Copy link
Copy Markdown
Contributor

@seroperson seroperson commented Mar 2, 2026

Previously, as build.defined is a map with undefined order, projectSettings could have a default "empty" initializer go after a cross-project appender. Whether it would work or not depended on this internal map order randomness, so, for example (see an added scripted test), defining the lazy val baz = project would cause an empty sourceGenerators, but defining the lazy val ewikqelkqweqopweo = project would work as intended.

This fix eliminates this randomness, so cross-project settings always go after own-scoped or global settings. Should not affect anything, as previously order was undefined in such cases.

Closes #7173

@eed3si9n
Copy link
Copy Markdown
Member

eed3si9n commented Mar 2, 2026

I'll get back to the actual review when I have time to read the code a bit, but thanks for working on this issue!

Copy link
Copy Markdown
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

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

Thanks!

@eed3si9n eed3si9n merged commit 81edea4 into sbt:develop Mar 3, 2026
15 checks passed
eed3si9n pushed a commit to eed3si9n/sbt that referenced this pull request Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding subproject causes setting to no longer be evaluated (?)

2 participants