Hi, I am trying to use pantsbuild with WSL2. I am...
# general
Hi, I am trying to use pantsbuild with WSL2. I am seeing some really strange behaviors for the commands
./pants tailor
is only returning o/p sometimes.
./pants package
does not seem to recognize the changes in the BUILD file. The BUILD file is autogenerated with only
target so I added
target but sometimes the package command return with
no package goal defined
other times its not even returning any o/p can someone help me with this, It seems that i am missing something basic.
Hmm that is very odd
Do you have a native linux system to test this on, so we can verify if the problem is related to WSL2 or if that is a red herring?
I think that one Windows user in the past has warned that you have to make sure to save your editor frequently or something when making changes
It would seem the critical likely piece of data is where is the data located? Is it in the WSL image or under /mnt (shared from windows). I would guess the latter and then my hand-wavy hunch would terminate in something-something-inotify-can't-handle-windows-shares.
👍 2
Thanks for the replies Yeah, I was editing the code with pycharm running in windows. The folder is shared from windows. I only verified that changes are getting reflected when I read from the fs from WSL2. Can you share why you are using inotify, Are you getting file updates and keeping the build files in memory somewhere
Basically, yes. Pants snapshots your files, storing them in a database when they change. Then, when Pants needs to operate against your files (compile them, test them, etc), it pulls them from the database and writes them in a temporary sandbox directory. This is all to have a hermetic copy of the file data undisturbed by your edits.
You can run
./pants --no-pantsd ...
to avoid this, but it will be much slower.
Got it, Thanks again