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

Support directories in uv.tool.cache-keys #7246

Closed
vivienm opened this issue Sep 10, 2024 · 3 comments · Fixed by #7268
Closed

Support directories in uv.tool.cache-keys #7246

vivienm opened this issue Sep 10, 2024 · 3 comments · Fixed by #7268
Assignees
Labels
enhancement New feature or request needs-decision Undecided if this should be done

Comments

@vivienm
Copy link
Contributor

vivienm commented Sep 10, 2024

I work on projects using both Python and Rust. I'd like to make uv rebuild the project when the Rust code is modified, typically when any *.rs file in the src directory is modified.

The new configuration entry uv.tool.cache-keys is promising, but doesn't seem to work with directories.

Possibly related: #2152.

@charliermarsh
Copy link
Member

I've been hesitant to add this because in some cases it may just be slower than building the project. Perhaps not for an extension module like that, though.

@charliermarsh charliermarsh added enhancement New feature or request needs-decision Undecided if this should be done labels Sep 10, 2024
@vivienm
Copy link
Contributor Author

vivienm commented Sep 10, 2024

Also, it looks like entries such as { file = "some-directory" } are silently ignored. Maybe it could be nice to have a warning?

@sbidoul
Copy link

sbidoul commented Sep 10, 2024

Related: the ask for glob patterns in cache-keys, discussed in #7136

@charliermarsh charliermarsh self-assigned this Sep 10, 2024
charliermarsh added a commit that referenced this issue Sep 11, 2024
## Summary

This has been asked for a few times. There are risks that these checks
could be slow, but they're buyer-beware.

Closes #7246.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-decision Undecided if this should be done
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants