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

ENH: build cache that plays nicely with git worktree/asv #3826

Open
jbrockmendel opened this issue Sep 14, 2020 · 2 comments
Open

ENH: build cache that plays nicely with git worktree/asv #3826

jbrockmendel opened this issue Sep 14, 2020 · 2 comments

Comments

@jbrockmendel
Copy link
Contributor

cython is pretty good about avoiding unnecessary compilations, but that doesn't play nicely with git worktree or asv

Two ways this could work:

  1. An explicit cache that sits next to the "real" .git repo

  2. If in a worktree directory, scan other directories in the worktree to see if we can re-use already-cythonized results from there.

I'm not sure how to make version 2 work with asv.

@scoder
Copy link
Contributor

scoder commented Sep 15, 2020

I'm not sure I understand your problem description. Could you update it with some details? Are you suggesting that there is a problem with checking out different branches or something like that? What does asv refer to here? A link would help.

@jbrockmendel
Copy link
Contributor Author

I'm not sure I understand your problem description. Could you update it with some details? Are you suggesting that there is a problem with checking out different branches or something like that?

Refresher on git worktree:

~/Desktop/pd/ is where I keep all my pandas branches
pd/pandas/ has master checked out
pd/pandas/.git is the actual repo

git worktree add ../foo foo creates a foo branch and checks it out in pd/foo/, and the pd/foo/.git file is a single-line file telling git where to find the actual repo directory.

If I were to just check out a new branch directly inside the pd/pandas/ directory, the cythonized .c files would still be there, so would not need to be re-cythonized. But when a new branch is instantiated in a worktree directory, the .pyx files need to be cythonized from scratch, which is what I'd like to avoid.

What does asv refer to here? A link would help.

https://github.com/airspeed-velocity/asv

A benchmarking tool. The relevant behavior is that it will also check out existing branches in fresh directories and build from scratch, which can be a real pain point.

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