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

Move .pids under .pants.d by default #19911

Merged
merged 5 commits into from
Sep 22, 2023
Merged

Move .pids under .pants.d by default #19911

merged 5 commits into from
Sep 22, 2023

Conversation

benjyw
Copy link
Contributor

@benjyw benjyw commented Sep 22, 2023

We also make the workdir a subdir of .pants.d, so that it's easy to
nuke it without nuking the pids. These are just changes to default
option values. It is still possible to explicitly set those options so
whatever the user wants.

The structure under .pants.d is opaque to end users and not part
of the API, so we have the freedom to do this without a deprecation.

Note that we do not move .pants.d/bsp under .pants.d/workdir.
For whatever reason, bsp uses that hardcoded directory, rather
than consulting the pants_workdir option.

So the end result of this change is that .pants.d is no longer the
same thing as the workdir, but a looser "directory Pants writes stuff
under, and that you can safely nuke". There are now three things that
go under that dir: pids, workdir and bsp.

@benjyw
Copy link
Contributor Author

benjyw commented Sep 22, 2023

Fixes #3511

@thejcannon
Copy link
Member

In general, I'm for this change 👍

Copy link
Member

@kaos kaos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm bar some minor nits and one potential mistake ;)

src/python/pants/backend/java/bsp/rules.py Outdated Show resolved Hide resolved
src/python/pants/backend/scala/bsp/rules.py Outdated Show resolved Hide resolved
src/python/pants/pantsd/process_manager.py Outdated Show resolved Hide resolved
src/python/pants/backend/scala/bsp/rules.py Outdated Show resolved Hide resolved
Copy link
Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In favor: thanks!

@stuhood stuhood linked an issue Sep 22, 2023 that may be closed by this pull request
@benjyw benjyw merged commit deffc2c into main Sep 22, 2023
@benjyw benjyw deleted the benjyw_pids_under_workdir branch September 22, 2023 18:51
@benjyw
Copy link
Contributor Author

benjyw commented Sep 22, 2023

@stuhood why is bsp hardcoded under .pants.d? Should it be under workdir? Or at least configurable? Unlike other things under workdir, it seems like bsp is intended to be consumed by the user('s IDE)? So maybe it actually should be under dist?

AlexTereshenkov pushed a commit that referenced this pull request Feb 14, 2024
Update the `pants.log` file location after the changes in
#19911
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move .pids under .pants.d
4 participants