You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you accidently call a file-path object like it was a hash map (e.g. an nf-core meta map), where the object is from a https link, you can call 'fake' subobjects like it was a metamap, which is just a string of the name of the subobject.
Steps to reproduce the problem
We can create a file on our filesystem
touch hello.txt
Then in the nextflow console, run the following, which should fail as expected, if we try and call a nonexistent map-like attribute
foo = file("hello.txt")
print(foo.single_end)
Note this also fails if we use an s3 path (as expected).
However, if we replace remote file as a HTTPS URL, this does not fail and instead outputs the string of the attribute that was called
Expected behaviour (as works correctly with local paths):
groovy> foo = file("hello.txt")
groovy> print(foo.single_end)
Exception thrown
groovy.lang.MissingPropertyException: No such property: single_end for class: sun.nio.fs.UnixPath
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:67)
Bug report
The following error was originally found by @ilight1542 and then debugged with @TCLamnidis @maxulysse @nvnieuwk
Expected behavior and actual behavior
If you accidently call a file-path object like it was a hash map (e.g. an nf-core meta map), where the object is from a
https
link, you can call 'fake' subobjects like it was a metamap, which is just a string of the name of the subobject.Steps to reproduce the problem
We can create a file on our filesystem
Then in the
nextflow console
, run the following, which should fail as expected, if we try and call a nonexistent map-like attributeNote this also fails if we use an s3 path (as expected).
However, if we replace remote file as a HTTPS URL, this does not fail and instead outputs the string of the attribute that was called
@nvnieuwk suspects it may be related to this object: https://github.com/openjdk/jdk/blob/master/src/java.base/unix/classes/sun/nio/fs/UnixPath.java
Program output
Expected behaviour (as works correctly with local paths):
Incorrect behaviour when https:
Environment
$SHELL --version
): GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)Additional context
(Add any other context about the problem here)
The text was updated successfully, but these errors were encountered: