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

Make bare setting loading order alphabetical #5447

Merged
merged 1 commit into from Feb 26, 2020

Conversation

eed3si9n
Copy link
Member

Fixes #2697
Ref https://twitter.com/not_xuwei_k/status/1230140477959286848

Note that this is could potentially break an existing build that was relying on previous behavior, which seem to return build.sbt at the end if you have a.sbt, b.sbt, c.sbt, and build.sbt.

@dwijnand
Copy link
Member

dwijnand commented Feb 22, 2020

Fixes #2232 too?

@dwijnand
Copy link
Member

dwijnand commented Feb 22, 2020

Also:

Is ÿÿÿÿÿÿÿÿÿÿ~~~~dbuild~defs.sbt still last?https://t.co/P1SRncRm4O

— Dale Wijnand (@dwijnand) February 22, 2020

@eed3si9n
Copy link
Member Author

I don't think it was ever the last:

> show Compile/scalacOptions
[info] * c
[info] * b
[info] * a
[info] * ÿÿÿÿÿÿÿÿÿÿ
[info] * build

with my patch it will be:

> show Compile/scalacOptions
[info] * a
[info] * b
[info] * build
[info] * c
[info] * ÿÿÿÿÿÿÿÿÿÿ

@eed3si9n
Copy link
Member Author

If #2232 is still around, this won't fix it since this just changes the ordering of *.sbt files.

@dwijnand
Copy link
Member

since this just changes the ordering of *.sbt files.

Isn't the criteria for #2232 "There should be a clear ordering on which one wins, or forbid initializing other subproject's keys."?

@dwijnand
Copy link
Member

I don't think it was ever the last:

I find that very surprising, given dbuild introspects the build... Hmm, maybe it was discovered that naming convention didn't work, which is why they swiched to doing things onLoad? Maybe we should validate or talk to @cunei about it.

Fixes sbt#2697
Ref https://twitter.com/not_xuwei_k/status/1230140477959286848

Note that this is could potentially break an existing build that was relying on previous behavior, which seem to return `build.sbt` at the end if you have `a.sbt`, `b.sbt`, `c.sbt`, and `build.sbt`.
@eed3si9n
Copy link
Member Author

Toni said:

This is not what I remember; the .sbt files used to be loaded in alphabetical order. It is the reason why the dbuild-specific file is called ÿÿÿÿ...: to be able to patch things after everything else loads. I don't know when/if sbt changed loading order, but this is my recollection.

@dwijnand
Copy link
Member

I noticed yesterday from the output of loading that it definitely has build.sbt at the end. I can't remember anything being changes around sbt 1.0 times, so maybe this changed back when "no blankies" landed?

@eed3si9n eed3si9n added this to the 1.4.0 milestone Feb 26, 2020
@eed3si9n eed3si9n merged commit a2563f0 into sbt:develop Feb 26, 2020
@eed3si9n eed3si9n deleted the wip/ordering branch February 26, 2020 21:25
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.

Order of settings evaluation is surprising and not intuitive
2 participants