Skip to content

Conversation

juj
Copy link
Collaborator

@juj juj commented Sep 11, 2025

If external logic is correct, then this exception should never be thrown.

(I considered no-opping this call in FROZEN_CACHE mode, but I think that is not a good idea. Better to fix any callers to cache.erase() in FROZEN_CACHE mode directly)

tools/cache.py Outdated
@@ -83,6 +83,9 @@ def ensure():

def erase():
ensure_setup()
if config.FROZEN_CACHE:
raise Exception('Cache cannot be erased when FROZEN_CACHE is set')
Copy link
Collaborator

Choose a reason for hiding this comment

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

assert not config.FROZEN_CACHE, 'Cache cannot be erased when FROZEN_CACHE is set'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok

@juj juj merged commit 7df12fd into emscripten-core:main Sep 15, 2025
31 checks passed
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.

2 participants