Scope default xbuildenv caches per pyodide-build installation#370
Conversation
|
@copilot, fix the linting issues in https://results.pre-commit.ci/run/github/809763431/1780948591.EoyxRmlGR2CFBmvU-bNhBg |
Fixed in 3d85404. |
|
@copilot, could you confirm whether it is also necessary to include the Pyodide Python version and Pyodide ABI version in the hash, or whether they are not necessary? |
|
@agriyakhetarpal Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub. You can ask me to try again later by mentioning me in a new comment. If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: Sorry for the inconvenience! |
5 similar comments
|
@agriyakhetarpal Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub. You can ask me to try again later by mentioning me in a new comment. If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: Sorry for the inconvenience! |
|
@agriyakhetarpal Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub. You can ask me to try again later by mentioning me in a new comment. If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: Sorry for the inconvenience! |
|
@agriyakhetarpal Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub. You can ask me to try again later by mentioning me in a new comment. If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: Sorry for the inconvenience! |
|
@agriyakhetarpal Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub. You can ask me to try again later by mentioning me in a new comment. If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: Sorry for the inconvenience! |
|
@agriyakhetarpal Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub. You can ask me to try again later by mentioning me in a new comment. If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: Sorry for the inconvenience! |
|
I wonder if I just used up whatever credits are available on the free plan or something 😅 |
I don’t think they need to be part of the install-id hash. The hash is only for scoping the cache root to a specific The Pyodide ABI is a property of the chosen xbuildenv version/config inside those versioned directories, not of the cache root itself, so including it in the hash would mostly just split one installation’s cache unnecessarily. |
agriyakhetarpal
left a comment
There was a problem hiding this comment.
Since Copilot was tripping up, I also checked manually locally (so much for a brain these days! 😂) and confirmed that xbuildenvs will not clobber over each other with differences in ABI versions, both through code and testing with a few variations of venvs.
ryanking13
left a comment
There was a problem hiding this comment.
Sounds okay to me. Thanks!
The default xbuildenv cache layout currently drops versioned directories directly into the user cache, which leaves stray top-level folders behind and causes different
pyodide-buildinstallations to reuse the same cache root. This change moves xbuildenvs under a dedicatedpyodide-buildcache directory and scopes the default root to the active installation.Cache layout
platformdirs.user_cache_dir() / ".pyodide-xbuildenv-<version>"platformdirs.user_cache_dir("pyodide-build") / ".pyodide-xbuildenv-<install-id>"Installation scoping
pyodide_buildpackage location, so separate virtual environments and separate source installs do not share the same default xbuildenv root.Docs and tests
Example default layout: