doc: how to expose primordials when using --expose-internals#38026
doc: how to expose primordials when using --expose-internals#38026Trott merged 1 commit intonodejs:masterfrom
Conversation
|
Seems fine; it might be nice to have the primordials exposed as a core module always, too. |
|
@ljharb |
|
Ah, I’d say that’s a requirement. In that case tho, is it even good to expose them with this flag? |
|
@ljharb I'd say the benefit of developing internal packages in different repos likely outweighs the problems. Using |
jasnell
left a comment
There was a problem hiding this comment.
--expose-internals is problematic on it's own but there's really no great alternative, and it's super useful for testing so I'm +1 on this.
|
@jasnell I do think moving |
|
Agreed |
|
FWIW you can achieve this already since 983e922: Doesn't this cover your use-case already? |
|
@aduh95 maybe we could just add this to testing docs then? |
Yes definitely, the fact that you don't know about this shows that it's not documented well enough. Do you want me to open a new PR or would you like to re-purpose this one? |
|
I can repurpose this one in a bit |
efb5dd8 to
2facf36
Compare
| ``` | ||
|
|
||
| In specific scenarios it may be useful to get a hold of `primordials` or | ||
| `internalBinding()`. You can do so using |
There was a problem hiding this comment.
| `internalBinding()`. You can do so using | |
| `internalBinding()`. You can do so using: |
Trott
left a comment
There was a problem hiding this comment.
LGTM with or without my trivial suggestion.
This comment has been minimized.
This comment has been minimized.
|
updated title |
PR-URL: nodejs#38026 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2facf36 to
f52c921
Compare
|
Landed in f52c921. @bmeck If it saves you a little time in the future, doc-only changes don't need to be run on Jenkins. You can rely on the GitHub Actions results for those. (The one possible exception would be the docs for addons. The C++ code in the examples are extracted and compiled to make sure they are all valid. I'm not sure if that happens on GitHub Actions or not. But everything else...doc-only changes don't need Jenkins.) |
|
@Trott I tried to re-read collaborator guide for that but guess I missed it. |
Understandable considering how overwhelming the guide is. You are now inspiring me to open a pull request to remove non-essential content. |
PR-URL: #38026 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #38026 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #38026 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This exposes
primordialsas a global property when using--expose-internals.This allows efforts like #21128 to follow general core robustness using
primordialswhile potentially being developed outside of the core repo itself. Without such a repo usingprimordialsit would not be easy to vendor in while maintaining such rigor without various duplications.The
--expose-internalsflag is not currently documented in the main docs and I didn't add a note about this because of that.