GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||
GeezerVison is showing github.com — zlib: add Brotli support by addaleax · Pull Request #24938 · nodejs/node Conversation
|
|
@addaleax build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/1884/pipeline |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I would much rather this live in a separate module or perhaps in a new namespace (which would still require a new 'module' anyway -- but would be better for organizational purposes) that can house all compression methods. I don't think stuffing this into zlib just so it's semver-minor is the right way to go about things. How the two work or are implemented internally doesn't really matter IMO.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
As I said in the PR description, that’s not the only reason for this.
It does matter that said fact makes the APIs analogous, imo. It also means that a bug or feature request for one part of the API likely applies to the other part of the API as well. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
For those reviewing you can look at the below subset to avoid seeing the addition of the brotli dep itself 70bb2464c0ca18a35dfe6f2022d05bd8e67817f8...32e89319e19bbbf5cc5632b7da3e3a697bd62487 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Interesting approach, and the API looks quite simple and usable to me. This would be a great way to address the issue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
That's an internal concern though, not something the end user should care about. Anyway, I still believe we should be doing this more correct from the get-go by incorporating and using a new namespace instead. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@mscdex if we move to a new namespace are we imagining |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm+1 on the approach suggested by @addaleax. I have to review the code more to sign off tho |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
I recognize |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Would it make sense to avoid overlapping with existing npm packages by using special characters? require('#brotli'); or use a different method maybe: require.internal('brotli'); require.stdlib('brotli'); |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@MayhemYDG please take a look at #21551 where we are exploring introducing a Node.js namespace in which we can put future modules. This would solve the problem in a slightly more elegant way imho @mscdex would you be open to landing this within the I'd like to propose we do the following
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
That sounds like replicating the original mistake here – we shouldn’t be naming anything |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@addaleax I've updated the above plan to rename zlib and add a deprecation warning to the compat alias. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
No, as that is something that would probably happen eventually anyway if namespaces do get added. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
One approach moving forward could be:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mscdex Instead of just saying that the reasons I provided for putting this feature in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
I hinted at this initially, but I believe it's confusing/misleading and not the correct place for this new API from an organizational standpoint since brotli is not zlib-compatible nor is it a format supported by the standard zlib library. Is that what you were asking for? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mscdex Okay – I’m not convinced by this, tbh… none of the other formats under Again, I understand that it’s unfortunate that the module was named |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
The formats supported by node are all supported by the actual underlying zlib library, so it makes sense that they're available under the
I also prefer that they all live under one module/namespace. I just believe that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
/cc @nodejs/collaborators for opinions on the naming & reviews |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don't think most people who use the Renaming it longer term to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR-URL: nodejs#24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Refs: nodejs#20458 Co-authored-by: Hackzzila <[email protected]> PR-URL: nodejs#24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Co-authored-by: Hackzzila <[email protected]> PR-URL: nodejs#24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
PR-URL: nodejs#24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Co-authored-by: Anna Henningsen <[email protected]> Backport-PR-URL: #27681 PR-URL: #24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Backport-PR-URL: #27681 PR-URL: #24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Refs: #20458 Co-authored-by: Hackzzila <[email protected]> Backport-PR-URL: #27681 PR-URL: #24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Co-authored-by: Hackzzila <[email protected]> Backport-PR-URL: #27681 PR-URL: #24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Backport-PR-URL: #27681 PR-URL: #24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Co-authored-by: Anna Henningsen <[email protected]> Backport-PR-URL: #27681 PR-URL: #24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Backport-PR-URL: #27681 PR-URL: #24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Refs: #20458 Co-authored-by: Hackzzila <[email protected]> Backport-PR-URL: #27681 PR-URL: #24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Co-authored-by: Hackzzila <[email protected]> Backport-PR-URL: #27681 PR-URL: #24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Backport-PR-URL: #27681 PR-URL: #24938 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
Notable changes:
- deps:
- icu 63.1 bump (CLDR 34) (Steven R. Loomis)
[#23715](#23715)
- upgrade npm to 6.9.0 (Kat Marchán)
[#26244](#26244)
- upgrade openssl sources to 1.1.1a (Sam Roberts)
[#25381](#25381)
- upgrade to libuv 1.24.1 (cjihrig)
[#25078](#25078)
- events: add once method to use promises with EventEmitter
(Matteo Collina) [#26078](#26078)
- n-api: mark thread-safe function as stable (Gabriel Schulhof)
[#25556](#25556)
- repl: support top-level for-await-of (Shelley Vohr)
[#23841](#23841)
- zlib:
- add brotli support (Anna Henningsen)
[#24938](#24938)
PR-URL: #27514
Notable changes:
- **deps**:
- update ICU to 64.2 (Ujjwal Sharma)
[#27361](#27361)
- upgrade npm to 6.9.0 (Kat Marchán)
[#26244](#26244)
- upgrade openssl sources to 1.1.1b (Sam Roberts)
[#26327](#26327)
- upgrade to libuv 1.28.0 (cjihrig)
[#27241](#27241)
- **events**:
- add once method to use promises with EventEmitter (Matteo Collina)
[#26078](#26078)
- **n-api**:
- mark thread-safe function as stable (Gabriel Schulhof)
[#25556](#25556)
- **repl**:
- support top-level for-await-of (Shelley Vohr)
[#23841](#23841)
- **zlib**:
- add brotli support (Anna Henningsen)
[#24938](#24938)
PR-URL: #27514
Notable changes:
- **deps**:
- update ICU to 64.2 (Ujjwal Sharma)
[#27361](#27361)
- upgrade npm to 6.9.0 (Kat Marchán)
[#26244](#26244)
- upgrade openssl sources to 1.1.1b (Sam Roberts)
[#26327](#26327)
- upgrade to libuv 1.28.0 (cjihrig)
[#27241](#27241)
- **events**:
- add once method to use promises with EventEmitter (Matteo Collina)
[#26078](#26078)
- **n-api**:
- mark thread-safe function as stable (Gabriel Schulhof)
[#25556](#25556)
- **repl**:
- support top-level for-await-of (Shelley Vohr)
[#23841](#23841)
- **zlib**:
- add brotli support (Anna Henningsen)
[#24938](#24938)
PR-URL: #27514
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.