Skip to content

Remove automatic fallback to $HOME/.emscripten_cache. NFC #22801

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

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 29, 2024

Putting the cache in the $HOME directory is not a great idea since its a location that is shared by any/all versions of emscripten. If anyone really wants to use that location they can do so via the config file setting CACHE or via the environment variable EMCC_CACHE.

@sbc100 sbc100 requested review from kripken and dschuff October 29, 2024 23:05
@sbc100 sbc100 force-pushed the default_cache_dir branch from 91990a6 to 79d834c Compare October 29, 2024 23:26
Putting the cache in the $HOME directory is not a great idea since its
a location that is shared by any/all versions of emscripten.  If anyone
really wants to use that location they can do so via the config file
setting `CACHE` or via the environment variable `EMCC_CACHE`.
@sbc100 sbc100 force-pushed the default_cache_dir branch from 79d834c to 07a319b Compare October 30, 2024 02:31
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I imagine the link could help someone. Like imagine a dev is maintaining an emcc build that they didn't set up themselves, and it breaks due to this. They aren't a power user and just want to fix it quickly, so the more info we can give them, the better.

@sbc100 sbc100 merged commit 48d9bc0 into emscripten-core:main Oct 30, 2024
28 checks passed
@sbc100 sbc100 deleted the default_cache_dir branch October 30, 2024 18:35
@neondev9
Copy link

neondev9 commented Dec 1, 2024

is it really expected that emscripten compiler doesn't create --cache/EM_CACHE directories now?
i.e. if you override cache directory, you need to guarantee that directory exists before compilation.

Just updated SDK from 3.1.57 and this change affected Github Action pipelines because of
em++: error: unable to create cache directory "/home/runner/work/Project/Project/.tmp/Emscripten/cache": parent directory not writable (see https://emscripten.org/docs/tools_reference/emcc.html for info on setting the cache directory)

@sbc100
Copy link
Collaborator Author

sbc100 commented Dec 2, 2024

is it really expected that emscripten compiler doesn't create --cache/EM_CACHE directories now? i.e. if you override cache directory, you need to guarantee that directory exists before compilation.

Just updated SDK from 3.1.57 and this change affected Github Action pipelines because of em++: error: unable to create cache directory "/home/runner/work/Project/Project/.tmp/Emscripten/cache": parent directory not writable (see https://emscripten.org/docs/tools_reference/emcc.html for info on setting the cache directory)

Sorry, no that was not an indented change in behaviour. Sounds like a case we don't cover in out tests.

sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 2, 2024
We were incorrectly reporting non-existent parent directories as
non-writable.

This was broken in emscripten-core#22801.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 2, 2024
We were incorrectly reporting non-existent parent directories as
non-writable.

This was broken in emscripten-core#22801.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 2, 2024
We were incorrectly reporting non-existent parent directories as
non-writable.

This was broken in emscripten-core#22801.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 3, 2024
We were incorrectly reporting non-existent parent directories as
non-writable.

This was broken in emscripten-core#22801.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 3, 2024
We were incorrectly reporting non-existent parent directories as
non-writable.

This was broken in emscripten-core#22801.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 3, 2024
We were incorrectly reporting non-existent parent directories as
non-writable.

This was broken in emscripten-core#22801.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 3, 2024
We were incorrectly reporting non-existent parent directories as
non-writable.

This was broken in emscripten-core#22801.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 3, 2024
We were incorrectly reporting non-existent parent directories as
non-writable.

This was broken in emscripten-core#22801.
sbc100 added a commit that referenced this pull request Dec 4, 2024
We were incorrectly reporting non-existent parent directories as
non-writable.

This was broken in #22801.
hedwigz pushed a commit to hedwigz/emscripten that referenced this pull request Dec 18, 2024
…ore#23049)

We were incorrectly reporting non-existent parent directories as
non-writable.

This was broken in emscripten-core#22801.
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

Successfully merging this pull request may close these issues.

3 participants