cool-easter-32542
10/12/2023, 2:45 PMcontent = FileContent(path=versions_file_path, content="some string")
digest = await Get(Digest, CreateDigest([content]))
That resulted in the infamous Filesystem changed during run: retrying 'MyGoal' infinite loop. I was really confused. Upon further inspection of the run logs, I found this:
09:14:56.95 [31m[ERROR][0m panic at 'called `Result::unwrap()` on an `Err` value: "Field `content` was not convertible to type alloc::vec::Vec<u8>: PyErr { type: <class 'TypeError'>, value: TypeError(\"'str' object cannot be interpreted as an integer\"), traceback: None }"', src/intrinsics.rs:422
So I updated the code above to call .encode() on the string before passing it as content and things started working. However, I feel like my mistake should have resulted in an error / failure instead of the infinite Filesystem changed loop as this just made things harder to debug.
Pants version
2.16.0
OS
MacOS
Additional info
I like pants
pantsbuild/pants