[2.x] fix: trim whitespace from sbt.version in build.properties#8524
Merged
eed3si9n merged 1 commit intosbt:developfrom Jan 14, 2026
Merged
[2.x] fix: trim whitespace from sbt.version in build.properties#8524eed3si9n merged 1 commit intosbt:developfrom
eed3si9n merged 1 commit intosbt:developfrom
Conversation
Member
|
Looks like this PR has a few extra commits. Do you mind dropping those, via git rebase -i. |
When sbt.version in build.properties has trailing whitespace, sbt incorrectly reports a version mismatch even after reboot. This fix trims the property value in all places where sbt.version is read from build.properties: - Main.scala (version mismatch warning) - MainLoop.scala (clean command version detection) - ScriptedTests.scala (test compatibility check) Fixes sbt#8103
4eebe6b to
c622b63
Compare
Contributor
Author
|
Fixed! Rebased onto latest |
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.
When
sbt.versioninbuild.propertieshas trailing whitespace, sbt incorrectly reports a version mismatch even after reboot.Problem
As reported in #8103, when
project/build.propertiescontains:(note the trailing space)
SBT shows the warning:
This warning persists even after
rebootandreloadcommands.Solution
This PR trims whitespace from the
sbt.versionproperty value in all places where it's read frombuild.properties:The fix adds
.map(_.trim)after reading the property, ensuring whitespace is removed before any comparison.Testing
The fix can be verified by:
sbt.version=2.0.0-M3(with trailing space) inproject/build.propertiesFixes #8103
Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=162055292