Skip to content

Track active tools and SDKs in activated.json - #1766

Open
sbc100 wants to merge 1 commit into
mainfrom
activated-json
Open

Track active tools and SDKs in activated.json#1766
sbc100 wants to merge 1 commit into
mainfrom
activated-json

Conversation

@sbc100

@sbc100 sbc100 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

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.

This allows us to remove all of the activated_cfg entries that were there only to keep track of tool activation.

Replaces: #1345

@sbc100
sbc100 force-pushed the activated-json branch 4 times, most recently from 50c92bc to db9759e Compare August 3, 2026 21:28
@sbc100
sbc100 requested a review from juj August 3, 2026 21:29
@sbc100
sbc100 force-pushed the activated-json branch 2 times, most recently from 1031db7 to a3b8a46 Compare August 3, 2026 22:14
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
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.

1 participant