Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Modules lkgr rebase #53

Closed
wants to merge 5 commits into from
Closed

Modules lkgr rebase #53

wants to merge 5 commits into from

Conversation

MylesBorins
Copy link
Contributor

another day another conflict.

@MylesBorins
Copy link
Contributor Author

Took the liberty to squash some of the duplicated commits related to the loader revert.

CI: https://ci.nodejs.org/job/node-test-pull-request/21347/

@MylesBorins
Copy link
Contributor Author

oh fun things are actually broken... going to dig in

@guybedford
Copy link
Contributor

Fun indeed. Looks like it's - nodejs/node@b05fd4b, where the ESM init should happen after debug log.

@guybedford
Copy link
Contributor

I've only glanced at it briefly, but something like moving this require - https://github.com/nodejs/node/blob/master/lib/internal/main/check_syntax.js#L14 so that it is inside of the function body after prepareMainThreadExecution() may help.

@MylesBorins
Copy link
Contributor Author

MylesBorins commented Mar 9, 2019

Took liberty to clean up the branch for upstreaming. 35 commits down to 7 (+1 for test fix). Did my best to split it up into observable bits. Still will need to go through it again and ensure that the test suite passes for each commit

@guybedford @GeoffreyBooth @jdalton you all had commits that got squashed at some point. I've included all authors in commit meta data though.

CI: https://ci.nodejs.org/job/node-test-pull-request/21365/

@GeoffreyBooth
Copy link
Member

Looks like the CI build failed?

@MylesBorins
Copy link
Contributor Author

@GeoffreyBooth looks like my solution introduced a "double require" which the linter is yelling about. Will need to refactor a bit, but going to compare against upstream first

@MylesBorins MylesBorins force-pushed the modules-lkgr-rebase branch from 3be2e38 to 02bcd09 Compare March 10, 2019 04:30
@MylesBorins
Copy link
Contributor Author

const vm = require('vm');
const {
stripShebang, stripBOM
} = require('internal/modules/cjs/helpers');

let CJSModule;
function CJSModuleInit() {
if (!CJSModule)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this guard is probably not necessary... but I'm being paranoid

@MylesBorins MylesBorins force-pushed the modules-lkgr-rebase branch from 02bcd09 to a0b1964 Compare March 10, 2019 21:42
@MylesBorins
Copy link
Contributor Author

Did another pass on the rebase. Simplified commits and ensured the test suite passes for each one

I think we could fold 89ddcfd, a9887b8, and c7e5fe0 into one commit potentially... for the IRP implementation. Haven't dug into if that diff is easier to review. Thoughts?

CI: https://ci.nodejs.org/job/node-test-pull-request/21410/

@GeoffreyBooth
Copy link
Member

I think we could fold 89ddcfd, a9887b8, and c7e5fe0 into one commit potentially… for the IRP implementation. Haven’t dug into if that diff is easier to review. Thoughts?

Those three commits are basically: our Phase 0 work (remove stuff we’ll be replacing); add IRP; revert removal of loader code. I could see maybe the first and third being combined, but adding the IRP implementation feels like it should be its own commit.

@MylesBorins
Copy link
Contributor Author

@GeoffreyBooth my thought process was that upstream there isn't necessarily any reason to keep this more granual, it is an artifact of our process. The loader revert is someone dependent on the types implementation in IRP... so it is a non-trivial amount of extra work to keep the tree clean.

Keep in mind there is a non-zero chance all our work will be squashed into a single commit when landing on core. This is more about making review easier

@GeoffreyBooth
Copy link
Member

Sure, whatever you think is best.

@MylesBorins MylesBorins force-pushed the modules-lkgr-rebase branch from a0b1964 to ea59221 Compare March 11, 2019 22:55
@MylesBorins
Copy link
Contributor Author

landed in 2e2670a...ea59221

@MylesBorins MylesBorins deleted the modules-lkgr-rebase branch March 13, 2019 21:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants