Skip to content

Merge tools now that OS-specific keys are possible - #1768

Merged
sbc100 merged 1 commit into
mainfrom
merge_configs
Aug 6, 2026
Merged

Merge tools now that OS-specific keys are possible#1768
sbc100 merged 1 commit into
mainfrom
merge_configs

Conversation

@sbc100

@sbc100 sbc100 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Since #1761 we now have os-specific keys so we don't need separate entries in these cases anymore.

@sbc100
sbc100 requested review from juj and kripken August 4, 2026 23:14
Comment thread emsdk_manifest.json Outdated
sbc100 added a commit that referenced this pull request Aug 5, 2026
Rename the `uses` tool property to `deps` in `emsdk.py` and
`emsdk_manifest.json`. See #1768 for an example of when this name makes
more sense. We also use the term "deps" in emscripten already so this is
more consistent.

Update `--uses` flag description and parsing in `emsdk list` to use
`--deps`.
@sbc100
sbc100 force-pushed the merge_configs branch 2 times, most recently from 57401a3 to cbceb4c Compare August 5, 2026 18:56
@sbc100
sbc100 requested a review from kripken August 5, 2026 20:51
Comment thread emsdk.py
return self.url is not None
# Tools/SDKs without an explicit 'os' filter are compatible if they specify
# a download URL *or* have dependencies.
return self.url is not None or bool(self.deps)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The reason this is needed is the previously the "sdks" were listed as one-per-os, but now there is just a single one with deps and deps_linux.

Prior to this change the return statement above on line 1963 would always fire for SDKs

Comment thread emsdk.py Outdated

return self.url is not None
# Tools/SDKs without an explicit 'os' filter are compatible if they specify
# a download URL *or* have dependencies.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But why does having dependencies make a tool compatible? E.g. some build system might only run on linux/mac, so it has deps for each of those, but windows wouldn't want it?

That is, having deps is a "structural" property. it doesn't say who or what should use it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

If if you only specify mac_deps and windows_deps and then on linux the self.deps would be empty here. i.e. it would be uninstallable.

What this logic is saying is that to be installable you need to either have a url or deps for the current platforms. If you have neither of them then you are not installable.

i.e. its ok to have url for current platform or not deps for the current platform, but its not OK to have neither.

The reason this wasn't needed because is that the SDK had an entry for each OS with a specific os = 'linux'. Now that the SDK is generic we need this line to be able to deal with a tools with no URL and only deps (i.e. an SDK).

Yes another way of putting it: Prior to this change all the deps-only tools were OS-specific, but there is no reason you can't have a deps-only tool that is generic, and that requires this change (or something like it).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I update the comment to make this more clear. Both self.url and self.deps are by construction working on the current OS.

Since #1761 we now have os-specific keys so we don't need separate
entries in these cases anymore.
Comment thread emsdk.py
return self.url is not None
# Tools without an explicit 'os' are compatible with the current
# OS if they have URL for the current OS *or* a set of dependencies
# for the current OS.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# for the current OS.
# for the current OS (`deps` by itself, unlike `deps_linux`, applies to all OSes, so all are compatible with it).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Its a bit more subtle than that. self.deps is the deps for the current OS. So if either deps_linux or deps (no suffix) exist in the file then deps will be non-null here.

@sbc100
sbc100 merged commit f8754c4 into main Aug 6, 2026
9 checks passed
@sbc100
sbc100 deleted the merge_configs branch August 6, 2026 19:47
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