[2.x] fix: Fixes dependency lock file url#8744
Merged
eed3si9n merged 5 commits intosbt:developfrom Feb 15, 2026
Merged
Conversation
- Add CacheUrlConversion in lm-coursier internal to convert cache file paths back to original repository URLs (single place for logic). - CoursierDependencyResolution delegates to CacheUrlConversion. - DependencyLockManager.createFromUpdateReport now accepts optional cacheDir; when an artifact has a file URL it either converts via cache dir (Coursier layout) or fails with a clear message. - dependencyLock task passes csrCacheDirectory so lock file gets portable HTTPS URLs instead of machine-specific cache paths. Expectation 1: Lock file contains original Maven Central (or repo) URLs. Expectation 2: If conversion is not possible, lock creation fails.
- CacheUrlConversion: normalize paths for comparison (forward slashes) and strip leading slash on Windows file URIs so cache matching works. - Apply scalafmt to touched files.
Catch parse errors when reading cached values and return Left(None) so the task is re-run instead of failing with IncompleteParseException. Fixes plugins/dotty-sandwich scripted test flake.
Contributor
Author
|
@eed3si9n Would you mind reviewing the PR? |
eed3si9n
reviewed
Feb 15, 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 #8741
When using Coursier for dependency resolution, the dependency lock file was sometimes writing absolute
file://URLs pointing at the local cache (e.g.file:///home/runner/.cache/coursier/...). That made the lock file machine-specific and broke portability.This PR normalizes those cache URLs so the lock file stays portable. File URLs from the Coursier cache are converted to a stable form (e.g.
${CSR_CACHE}) before being written to the lock file, and converted back when reading. Path handling is normalized so Windows and Unix both behave correctly.Also in this PR: Action cache was occasionally failing in CI with
IncompleteParseException: exhausted inputwhen reading cached task values (e.g. in the dotty-sandwich scripted test). We now treat invalid or empty cached JSON as a cache miss and re-run the task instead of failing.