[2.x] fix: Fix whatDependsOn RuntimeException#8462
Conversation
Filters out empty versions during parser construction to prevent RuntimeException when creating token parsers. Includes comprehensive test coverage for edge cases.
|
@eed3si9n please I would love you to review this PR. I am open to changing anything in this pr |
|
@Dairus01 Thanks for the contribution! From what I can tell the test seems to be calling |
Remove unnecessary plugins.sbt from scripted tests DependencyTreePlugin loads automatically as an AutoPlugin. The addDependencyTreePlugin helper is unavailable in scripted test contexts, causing CI failures.
DependencyTreePlugin is an AutoPlugin with trigger = AllRequirements, so it loads automatically in scripted tests without requiring explicit plugin configuration. The addDependencyTreePlugin helper is only available in the main sbt build's project/ directory and is not accessible in isolated scripted test environments, causing "Not found: addDependencyTreePlugin" errors. This aligns with other dependency-graph scripted tests which either omit the plugins.sbt file entirely or comment out addDependencyTreePlugin.
|
@eed3si9n I have fixed what was making that one check to fail DependencyTreePlugin is an AutoPlugin with trigger = AllRequirements, so it loads automatically in scripted tests without requiring explicit plugin configuration. |
|
@eed3si9n please check now |
|
@eed3si9n is there any other thing I should do or any suggestionsfor the checks to pass or is it ok like this? |
sbt-app/src/sbt-test/dependency-graph/whatDependsOn-without-previous-initialization/build.sbt
Outdated
Show resolved
Hide resolved
Relax whatDependsOn test: assert presence of cats-effect artifact
|
@eed3si9n is there any other issue |
|
Once the CI passes, I think we're good to land. |
Add cleanup step for SBT server on Windows.
Removed relaxed check comment from the check task.
|
@eed3si9n please can you help me review the code |
|
I was hoping scripted would be somewhat quick, but it looks like a wild sheep chase, so I'm ok with just landing as-is if the CI finishes ok. |
|
@eed3si9n all the CI tests have passed, what do you think? |
|
Thank you @Dairus01 ! |
It was a pleasure doing this, I would be doing more, if you have any other open issue you need to solve feel free to tag me to it |
Fixes #8094 -
RuntimeException: String literal cannot be emptyinwhatDependsOncommand when the dependency graph contains modules with empty version strings.Problem:
After the first successful run of
whatDependsOn, subsequent runs fail because the persisted dependency graph contains modules with empty versions, causing parser token creation to fail.Solution:
Testing:
All existing tests pass. Added 4 new test cases covering the regression and edge cases.
Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=201190161