Track active tools and SDKs in activated.json - #1766
Open
sbc100 wants to merge 1 commit into
Open
Conversation
sbc100
force-pushed
the
activated-json
branch
4 times, most recently
from
August 3, 2026 21:28
50c92bc to
db9759e
Compare
sbc100
force-pushed
the
activated-json
branch
2 times, most recently
from
August 3, 2026 22:14
1031db7 to
a3b8a46
Compare
Store active tools and SDKs in a dedicated `activated.json` file when they are activated by `emsdk activate`. Update `Tool.is_active()` to check against `activated.json` rather than matching entries in `.emscripten`. This solves several issues with the previous `.emscripten`-based `is_active()` logic: 1. Tools with no `activated_cfg` (such as `ccache` or tools that only modify `PATH` or environment variables) previously returned `is_active() == False` because they had no `.emscripten` keys and no dependencies (`len(deps) == 0`). 2. Tools with dependencies but no `activated_cfg` previously falsely reported `is_active() == True` whenever their dependencies were active, even if the tool itself was never activated. Replaces: #1345
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Store active tools and SDKs in a dedicated
activated.jsonfile when they are activated byemsdk activate. UpdateTool.is_active()to check againstactivated.jsonrather than matching entries in.emscripten.This solves several issues with the previous
.emscripten-basedis_active()logic:activated_cfg(such asccacheor tools that only modifyPATHor environment variables) previously returnedis_active() == Falsebecause they had no.emscriptenkeys and no dependencies (len(deps) == 0).activated_cfgpreviously falsely reportedis_active() == Truewhenever their dependencies were active, even if the tool itself was never activated.This allows us to remove all of the
activated_cfgentries that were there only to keep track of tool activation.Replaces: #1345