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
I'm not 100% on this, but think it is probably a good idea. When using properly typed tasks, if you pass a string to a File/Directory-typed field, it will be coerced to a fileformats object and then properly checked for existence/format and have its contents hashed. However, if you don't type your task and just leave the field as typing.Any, the string representing the file path will be just treated as a string and the node won't be rerun if its contents change.
To avoid this, for typing.Any-typed fields, we could check all strings and see if they correspond to an existing file path, and if so implicitly convert it to a File/Directory object before passing it the task, in which its contents will be hashed when building the task checksum.
The text was updated successfully, but these errors were encountered:
We could list the names of fields with implicitly defined Any types in a _implicitly_typed_fields and then use this during the checksum function to do the implicit conversion to File during the hash calculation.
Alternatively, we could use our own Untyped type to signify fields that haven't been explicitly typed Any
I'm not 100% on this, but think it is probably a good idea. When using properly typed tasks, if you pass a string to a
File/Directory
-typed field, it will be coerced to a fileformats object and then properly checked for existence/format and have its contents hashed. However, if you don't type your task and just leave the field astyping.Any
, the string representing the file path will be just treated as a string and the node won't be rerun if its contents change.To avoid this, for
typing.Any
-typed fields, we could check all strings and see if they correspond to an existing file path, and if so implicitly convert it to a File/Directory object before passing it the task, in which its contents will be hashed when building the task checksum.The text was updated successfully, but these errors were encountered: