Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: writes compiled mongosh to lib-boxednode instead of lib to avoid linking it twice when building node#43

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

himanshusinghs
Copy link
Contributor

@himanshusinghshimanshusinghs commentedJul 31, 2023
edited
Loading

As pointed by Anna, probably because of changes (1,2) in between Node16 to Node20, the compiled mongosh file that we used to write underlib dir in node source tree was getting linked twice when building Node, but one the mentioned changes made this an error state and our compilation started failing after switching to Node20.

With this change we will start writing the compiled mongosh file tolib-boxednode dir in node source tree instead oflib and will continue linking it (only once) with--link-module arg.

@himanshusinghs
Copy link
ContributorAuthor

Looking into test failures. Even though the the file was linked during building, the final binary is not able to require it for some reason. Works fine, if I write to source tree root and include it from there.

Copy link
Contributor

@addaleaxaddaleax left a comment

Choose a reason for hiding this comment

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

Maybehttps://github.com/nodejs/node/blob/main/BUILDING.md#building-nodejs-with-external-core-modules is helpful here? i.e. the lines below

mainSource=mainSource.replace(/\bREPLACE_WITH_ENTRY_POINT\b/g,JSON.stringify(`${namespace}/${namespace}`));

may need to become

mainSource=mainSource.replace(/\bREPLACE_WITH_ENTRY_POINT\b/g,JSON.stringify(`/lib-boxednode/${namespace}/${namespace}`));

(and we could also drop the double namespacing here now I think, previously that was only there to avoid potential conflicts with existing files inlib/)

@himanshusinghs
Copy link
ContributorAuthor

That was actually it, thank you for pointing, I missed that.

@himanshusinghshimanshusinghs merged commitecf1b1c intomainAug 1, 2023
@himanshusinghshimanshusinghs deleted the MONGOSH-1536-avoid-linking-compiled-mongosh-twice branchAugust 1, 2023 16:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@addaleaxaddaleaxaddaleax approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@himanshusinghs@addaleax

[8]ページ先頭

©2009-2025 Movatter.jp