Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cached build files failing to update #17986

Open
KadenAgrey opened this issue Jan 12, 2023 · 7 comments
Open

cached build files failing to update #17986

KadenAgrey opened this issue Jan 12, 2023 · 7 comments
Labels

Comments

@KadenAgrey
Copy link
Contributor

KadenAgrey commented Jan 12, 2023

Describe the bug
BUILD files are cached and not updated for subsequent runs of ./pants tailor :: even after edits have been made.

Pants version
2.14.0

OS
Linux (using WSL on windows machine)

Additional info
Steps in case above is unclear,

  1. Introduce error to a BUILD file as example -> add line my_error
  2. run ./pants tailor :: (will cause error)
    Name 'my_error' is not defined.
  3. Remove offending line and rerun ./pants tailor :: (same error message, expected no error)
  4. Disable or enable some backend package (e.g., pants.backend.build_files.fmt.black) and rerun ./pants tailor :: (now succeeds)
@KadenAgrey KadenAgrey added the bug label Jan 12, 2023
@KadenAgrey
Copy link
Contributor Author

I've realized the issue occurs whether pants.backend.build_files.fmt.black is enabled or not. Simply enabling/disabling something in the backend_packages list forces pants to refresh the BUILD files, otherwise the files are not read in, even when I've made changes.

@KadenAgrey KadenAgrey changed the title pants.backend.build_files.fmt.black caches build files cached build files failing to update Jan 12, 2023
@jsirois
Copy link
Contributor

jsirois commented Jan 12, 2023

Pants does not work on Windows generally, it only works when run completely from a WSL vm. The repo must reside inside the VM and not be accessed via /mnt/<Windows drive>. Does this describe your issue?

@KadenAgrey
Copy link
Contributor Author

Yes this describes my problem, the bash is navigated through /mnt/... and commands run from there.

This is surprising. Should the Getting Started docs be updated with a disclaimer to avoid confusion around this? They imply pants should work in general through either WSL bash or power shell via the WSL command.

@jsirois
Copy link
Contributor

jsirois commented Jan 12, 2023

Probably, yes. Are you willing to take a crack at that doc update?: https://github.com/pantsbuild/pants/blob/main/docs/markdown/Getting%20Started/getting-started/prerequisites.md

@KadenAgrey
Copy link
Contributor Author

Sure, I'll take a look tonight.

Thanks for the help!

@KadenAgrey
Copy link
Contributor Author

Hmm, do you prefer I use the "suggest edits" feature on the website directly or go through github?

@jsirois
Copy link
Contributor

jsirois commented Jan 13, 2023

GitHub please.

jsirois pushed a commit that referenced this issue Jan 17, 2023
A short disclaimer was added to inform new Windows users that their projects must live within the Linux virtual machine for Pants to work correctly. 

Feedback welcome! In particular, I want to confirm that using the `wsl` prefix in a Windows shell has the same limitations. I will check myself in a few days if no one knows already.

Related to discussion in #17986.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants