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

Automatically regenerate IDE integration steps #125

Open
grahamalama opened this issue Aug 4, 2024 · 1 comment
Open

Automatically regenerate IDE integration steps #125

grahamalama opened this issue Aug 4, 2024 · 1 comment

Comments

@grahamalama
Copy link

Initially posted this as a question in the Slack and was encouraged to convert it to an issue here.

The docs have a clear section on how to set up some basic IDE integrations (with VSCode, in my case):

First party deps:

ROOTS=$(pants roots)
python3 -c "print('PYTHONPATH=./' + ':./'.join('''${ROOTS}'''.replace(' ', '\\ ').split('\n')) + ':\$PYTHONPATH')" > .env

Third party deps:

pants export --py-resolve-format=symlinked_immutable_virtualenv --resolve=python-default

It would be nice to rerun these steps automatically when either a source is changed (for first party deps) or a 3rd party dependency is changed.

@sureshjoshi
Copy link
Member

Yep, this is a great idea - could be done pretty reasonably as part of some post-pants.toml change hooks that the plugin already needs to have.

Ideally could be back ported into pants.

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

No branches or pull requests

2 participants