resolve function #426
Replies: 3 comments 1 reply
-
|
Just seeing this now. I think this is a great idea and definitely is inline with how files are treated in every other language. The implicit suggestion in wdl that "a file is just a special string" leads to soooo many issues and inconsistent behaviour. I would definitely +1 this proposal |
Beta Was this translation helpful? Give feedback.
-
|
Looks great! The way you describe it it brings Python's I would propose that this function can allow an arbitrary number of arguments, or an array. My only gripe is with the name. |
Beta Was this translation helpful? Give feedback.
-
If OpenWDL has standardized on BASH, then implicitly you've standardized on POSIX, therefore the path separator should always be |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
One thing that has tripped up many people is concatenation of
FileandString. Specifically, it is not clear whether the following expressions should result inFileorString:File+StringString+FileI propose that we disallow all concatenations between
FileandString, and instead introduce a resolve function:File resolve(String|File, String|File)resolveaccepts two arguments that are both assumed to be paths. The first argument may be a relative or absolute path; the second argument must be a relative path.resolveappends the two paths and returns the result as aFile. Importantly,resolveensures the two paths are joined by the system-specific path separator (i.e./on *nix and\on Windows).Beta Was this translation helpful? Give feedback.
All reactions