Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have nodejs_zlib implied by nodejs_compat_v2 #2804

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Sep 25, 2024

Ensures that if either nodejs_compat or nodejs_compat_v2 are enabled, then nodejs_zlib will be enabled also

There was a limitation in the original definition of the implied by annotation in that it would only allow specifying a single field. The effect was that nodejs_zlib would be implied by nodejs_compat but not noejs_compat_v2. If I updated it to be implied by nodejs_compat_v2 then it would transitively work for both nodejs_compat and nodejs_compat_v2 but wouldn't do the right thing if the worker had nodejs_compat, no_nodejs_compat_v2... Confusing.

This PR modifies the implied by annotation to allow multiple flags to be specified so that it works correct in any combination.

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!
I left a few minor comments

src/workerd/io/compatibility-date.capnp Outdated Show resolved Hide resolved
src/workerd/io/compatibility-date.capnp Outdated Show resolved Hide resolved
src/workerd/api/node/tests/zlib-nodejs-test.js Outdated Show resolved Hide resolved
@jasnell jasnell force-pushed the jsnell/node_zlib_impliedby_nodejs_compat_V2 branch from 7cab4cf to b8ae510 Compare September 25, 2024 21:58
src/workerd/io/compatibility-date.c++ Outdated Show resolved Hide resolved
@jasnell jasnell force-pushed the jsnell/node_zlib_impliedby_nodejs_compat_V2 branch from b8ae510 to acaa910 Compare September 25, 2024 22:30
Ensures that if either nodejs_compat or nodejs_compat_v2 are enabled,
then nodejs_zlib will be enabled also
@jasnell jasnell force-pushed the jsnell/node_zlib_impliedby_nodejs_compat_V2 branch from acaa910 to 704b836 Compare September 25, 2024 22:43
@jasnell jasnell merged commit b3bd93a into main Sep 25, 2024
14 checks passed
@jasnell jasnell deleted the jsnell/node_zlib_impliedby_nodejs_compat_V2 branch September 25, 2024 22:58
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.

3 participants