Skip to content

[2.x] Reject java.nio.file.Path cached task output type#9032

Merged
eed3si9n merged 2 commits intosbt:developfrom
eed3si9n:wip/ban-path-caching
Apr 6, 2026
Merged

[2.x] Reject java.nio.file.Path cached task output type#9032
eed3si9n merged 2 commits intosbt:developfrom
eed3si9n:wip/ban-path-caching

Conversation

@eed3si9n
Copy link
Copy Markdown
Member

@eed3si9n eed3si9n commented Apr 6, 2026

Fixes #9014

Problem
Like File, Path normally captures the absolute path, so likely not a good candidate for caching.

Solution
Ban it.

**Problem**
Like File, Path normally captures the absolute path,
so likely not a good candidate for caching.

**Solution**
Ban it.
Copy link
Copy Markdown
Member

@anatoliykmetyuk anatoliykmetyuk left a comment

Choose a reason for hiding this comment

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

LGTM, added a minor grammar point. Also would be good to add a test similar to sbt-app/src/sbt-test/cache/skip-file-cache.

Co-authored-by: Anatolii Kmetiuk <anatoliikmt@proton.me>
@eed3si9n eed3si9n merged commit 6c8ee6e into sbt:develop Apr 6, 2026
15 checks passed
@eed3si9n eed3si9n deleted the wip/ban-path-caching branch April 6, 2026 18:40
eed3si9n added a commit to eed3si9n/sbt that referenced this pull request Apr 7, 2026
**Problem**
Like File, Path normally captures the absolute path,
so likely not a good candidate for caching.

**Solution**
Ban it.

---------

Co-authored-by: Anatolii Kmetiuk <anatoliikmt@proton.me>
@eed3si9n eed3si9n changed the title [2.x] Remove Path type from caching [2.x] Reject java.nio.file.Path cached task output type Apr 7, 2026
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.

[2.x] java.nio.file.Path yields incorrect cache

3 participants