Track active tools and SDKs in activated.json - #1766
Conversation
50c92bc to
db9759e
Compare
1031db7 to
a3b8a46
Compare
|
The new behavior seems reasonable, but also changing the current long-standing behavior seems risky. How much of a benefit do you estimate our users would get from this? |
|
I think its much cleaner and clearer design. Without this we need to have dummy config vars in the For example there on mac an windows you will see We need the invent new functional |
|
I tired to mitigate the potential risk by building migration system from the old to new system. The idea is that maybe one day we can remove this. |
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
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