Skip to content

Conversation

eed3si9n
Copy link
Member

Fixes #1875

Problem
Plugins are topologically sorted, but plugins with equal weigh could modify the same key via ~= etc, resulting in different builds depending on the artifact.

Solution
This attempts to fix that by first sorting the selected plugins by the class name before sorting it topologically.

@@ -216,12 +216,12 @@ object Plugins extends PluginsFunctions {
case Right(results) =>
log.debug(s" :: deduced result: ${results}")
val selectedAtoms: List[Atom] = results.ordered
Copy link
Member Author

Choose a reason for hiding this comment

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

It does say ordered here, but evidently not ordered enough.

Copy link

@rossabaker rossabaker Oct 12, 2023

Choose a reason for hiding this comment

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

**Problem**
Plugins are topologically sorted, but plugins with equal weigh could
modify the same key via `~=` etc, resulting in different builds
depending on the artifact.

**Solution**
This attempts to fix that by first sorting the selected plugins
by the class name before sorting it topologically.
@eed3si9n eed3si9n merged commit 63ec794 into sbt:1.10.x Oct 16, 2023
@eed3si9n eed3si9n deleted the wip/sort_plugins branch October 16, 2023 02:32
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.

non-determinism from conflicting AutoPlugins
2 participants