Skip to content

fix(tmp): try make clipboard patterns safe for Filter - #3622

Draft
Timongcraft wants to merge 2 commits into
IntellectualSites:mainfrom
Timongcraft:fix/sync-clip-wrapper
Draft

fix(tmp): try make clipboard patterns safe for Filter#3622
Timongcraft wants to merge 2 commits into
IntellectualSites:mainfrom
Timongcraft:fix/sync-clip-wrapper

Conversation

@Timongcraft

Copy link
Copy Markdown
Contributor

Overview

Fix corruption when using ClipboardPattern and disabling on disk clipboards as some implementations have an unsafe cache.

This does not fix RandomFullClipboardPattern, which also seems affected but I'm not sure how to wrap the clipboard properly as it uses the old single get clipboard (seemingly on purpose) but idk if or how that should be wrapped as we'd need a map or list, no?

Description

Add a temporary wrapper to sync block access in clipboards for ClipboardPattern.

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
    - [ ] New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@Timongcraft

Timongcraft commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Caused by: org.gradle.internal.resolve.ArtifactNotFoundException: Could not find yarn-1.21.1+build.3-mergedv2.jar (net.fabricmc:yarn:1.21.1+build.3).

hm...

|| clipboard instanceof EmptyClipboard
|| clipboard instanceof DiskOptimizedClipboard // FastSchematicReaderV2/V3 no min offset
|| (clipboard instanceof BlockArrayClipboard blockArrayClipboard
&& blockArrayClipboard.getParent() instanceof DiskOptimizedClipboard)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I know it's still in draft, but perhaps we can add a #concurrentAccessSupported function to clipboard

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I appreciate the feedback!
that would be better I just wasn't sure if I should touch that but will do!

 -> currently "wrongly" marked true in ConcurrentReadClipboard although it only wraps block reads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants