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

Symlink runfiles tree so that you can do a dev/test iteration without rebuilding PEX #69

Open
c4urself opened this issue Apr 9, 2018 · 1 comment

Comments

@c4urself
Copy link

c4urself commented Apr 9, 2018

With py_test (PAR-based) rules I can dev/test iterate on an individual test by running the following:

  1. bazel test //foo:foo_tests
  2. find and update an issue in dependency bar.py
  3. run bazel test //foo:foo_tests without rebuilding the PAR because the runfiles are symlinked

The iteration cycle (1 and 2 above) is fast because it essentially lays out the zipfile in the runfiles directory and symlinks files that I may want to edit.

With the PEX rules I cannot do this as the only files that are symlinked are the srcs files from the test itself. This means that I have to rebuild the PEX each time I have to edit a dependent file which makes life quite tedious for any serious development.

What should happen is that the runfiles tree is created similarly to what PAR does.

@benley
Copy link
Owner

benley commented Apr 9, 2018

I agree that would be nice - the challenge lies in keeping all the wheels/eggs/setuptools-stuff dependencies available. We could make a script wrapper that sets PEX_PATH to have pex get dependencies from the previously-built .pex, but I'm not sure how to make it keep a path outside of the .pex in sys.path after pex initializes itself. Any suggestions?

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