[2.x] fix: Restore bincompat for ScriptedRun methods#8654
Merged
eed3si9n merged 1 commit intosbt:developfrom Jan 29, 2026
Merged
[2.x] fix: Restore bincompat for ScriptedRun methods#8654eed3si9n merged 1 commit intosbt:developfrom
eed3si9n merged 1 commit intosbt:developfrom
Conversation
eed3si9n
approved these changes
Jan 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8653
Problem
In PR #8621, I added a new
keepTempDirectoryparameter toScriptedRun.run()andinvoke()methods. To suppress MiMa warnings, I addedmimaBinaryIssueFiltersfor:DirectMissingMethodProblem("sbt.ScriptedRun.run")DirectMissingMethodProblem("sbt.ScriptedRun.invoke")DirectMissingMethodProblemfor various internalRunV1,RunV2,RunInParallelV1,RunInParallelV2classesHowever, this broke binary compatibility, which prevents sbt 1.x from calling sbt 2.x for cross-building (building sbt 2.x plugins using sbt 1.x).
Solution
Instead of using MiMa filters to suppress the warnings, this PR restores binary compatibility by:
Adding backward-compatible overloaded methods: Created overloaded
run()andinvoke()methods without thekeepTempDirectoryparameter that delegate to the new methods withkeepTempDirectory=falseRemoving problematic MiMa filters: Removed all
DirectMissingMethodProblemfilters forScriptedRunmethodsKeeping acceptable filter: Retained only
ReversedMissingMethodProblem("sbt.ScriptedRun.invoke")filter, which is acceptable since the old method signatures are preservedCode cleanup: Removed unused
@unusedimportChanges
main/src/main/scala/sbt/ScriptedRun.scalarun()method withoutkeepTempDirectoryparameter (delegates to new method withfalse)invoke()method withoutkeepTempDirectoryparameter (delegates to new method withfalse)@unusedimport (no longer needed)@unusedannotations from internal class methodsbuild.sbtDirectMissingMethodProblemonScriptedRunmethodsReversedMissingMethodProblem("sbt.ScriptedRun.invoke")filterTesting
mainProj/mimaReportBinaryIssuespassesChecklist
keepTempDirectoryparameter