WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@claymcleod
Copy link
Collaborator

@claymcleod claymcleod commented Nov 3, 2025

This PR addresses several open issues regarding the semantics of File and Directory. It builds off the work done in #735 and #745 to fully qualify when File/Directorys are evaluated, how they are evaluated, and equality semantics.

Closes #720.

Before submitting this PR, please make sure:

  • You have added a few sentences describing the PR here.
  • You have considered whether the README.md or other documentation needs updating to account for these changes.
  • You have updated the CHANGELOG.md describing the change and linking back to your pull request.
  • You have read and agree to the CONTRIBUTING.md document.
  • You have considered adding or updating relevant example WDL tests to the specification.
    • See the guide for more details.

For OpenWDL team members:

  • Assign the appropriate individual to this PR.
  • Triage the PR and add appropriate labels.

@claymcleod claymcleod changed the base branch from wdl-1.2 to wdl-1.2.1 November 3, 2025 22:28
@claymcleod claymcleod self-assigned this Nov 3, 2025
@claymcleod claymcleod requested a review from a team November 3, 2025 22:29
@claymcleod
Copy link
Collaborator Author

Note that the example here will not compile until we merge in the work of 1.2 bug fixes. After that, I'll need to hook up the inputs correctly to this example.

@claymcleod claymcleod added Z-specification-change (Metadata) An issue or PR related to a specification change. K-clarification (Kind) Clarifications regarding the WDL specification. S05-in-progress (State) A task that is in progress. labels Nov 3, 2025
@claymcleod claymcleod changed the title revise: clarifies canonicalization, validation, and euality semantics around File and Directory revise: clarifies canonicalization, validation, and equality semantics around File and Directory Nov 4, 2025
* Makes it clear that `File`s can only point to file paths
  and `Directory`s can only point to directory paths. Errors
  otherwise.
* Fixes the `join_paths()` function to accept a `Directory` as
  the first argument and return a `String`. See openwdl#721 for more
  information on what needed changing and why.

Closes openwdl#721.

When a `File` or `Directory` value is created, the following operations are performed:

- **Path Canonicalization.** Intermediate path components are normalized (resolving `.` for current directory and `..` for parent directory segments), symbolic links are resolved to their final targets, and relative paths are converted to their absolute path form. For `Directory` values, trailing directory separators are removed.

Choose a reason for hiding this comment

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

It would be helpful to have a very specific description of how relative paths are converted to absolute form. I believe the sensible choice is that they're normalized relative to the .wdl file in which the declaration appears, but unless I'm missing something this is left ambiguous in the current text.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Apologies, you're right—I have this language in #735 (a PR to WDL 1.3), and my intention was to go back and cherry-pick that PR onto WDL 1.2.1 as well. So this will be addressed in the final changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

K-clarification (Kind) Clarifications regarding the WDL specification. S05-in-progress (State) A task that is in progress. Z-specification-change (Metadata) An issue or PR related to a specification change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How does equality comparison work for File and Directory values? Are equality relationships preserved outside and inside tasks?

2 participants