Add opt-in patch for unordered directory hashing#6353
Merged
pditommaso merged 4 commits intoSTABLE-25.04.xfrom Sep 3, 2025
Merged
Add opt-in patch for unordered directory hashing#6353pditommaso merged 4 commits intoSTABLE-25.04.xfrom
pditommaso merged 4 commits intoSTABLE-25.04.xfrom
Conversation
This implements improved order-independent hashing for directories and unordered collections, controlled by the NXF_PATCH_UNORDERED_DIR environment variable. Key improvements: - Directory traversal order no longer affects hash values - Unordered collections (Sets, Bags) produce consistent hashes - Addresses edge cases with similar directory contents (fixes #6198) - Uses commutative byte addition for order independence - Maintains backward compatibility (disabled by default) The patch can be enabled by setting NXF_PATCH_UNORDERED_DIR=true. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Member
|
This seems out of scope for a backport |
bentsherman
requested changes
Aug 20, 2025
Member
bentsherman
left a comment
There was a problem hiding this comment.
Well, it's a hidden environment var and it's only on 25.04 so it won't clutter the code or docs on master. My only suggestion is to improve the name: NXF_PATCH_DIRECTORY_HASH
Member
|
Don't forget to backport #6313 while you're at it |
…PATCH_DIRECTORY_HASH Rename the environment variable to better reflect its purpose for directory hashing configuration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
This PR implements improved order-independent hashing for directories and unordered collections, controlled by the
NXF_PATCH_DIRECTORY_HASHenvironment variable.Key Features
NXF_PATCH_DIRECTORY_HASH=trueTechnical Implementation
hashDirSha256Patched()andhashUnorderedCollectionPatched()Usage
To enable the patch:
export NXF_PATCH_DIRECTORY_HASH=true nextflow run your-pipeline.nfTest Coverage
🤖 Generated with Claude Code