Skip to content

fix issue with re-require()'ing native modules#1354

Merged
implausible merged 1 commit into
nodegit:masterfrom
jmurzy:fix-rerequre
Nov 28, 2017
Merged

fix issue with re-require()'ing native modules#1354
implausible merged 1 commit into
nodegit:masterfrom
jmurzy:fix-rerequre

Conversation

@jmurzy
Copy link
Copy Markdown
Contributor

@jmurzy jmurzy commented Aug 14, 2017

Discussion on why this change was required can be found in the following issues:

jestjs/jest#3552
jestjs/jest#3550
nodejs/node#5016

Discussion on why this change was required can be found in the following issues:

jestjs/jest#3552
jestjs/jest#3550
nodejs/node#5016
@maxkorp
Copy link
Copy Markdown
Collaborator

maxkorp commented Aug 15, 2017

What is the additional startup time load on this?

@jmurzy
Copy link
Copy Markdown
Contributor Author

jmurzy commented Aug 15, 2017

@maxkorp ~3ms on my MacBook Pro:

const start = performanceNow();
rawApi = _.cloneDeep(rawApi);
const end = performanceNow();
console.log(((end - start) / MILLISECONDS).toFixed(3), 'seconds');
0.003 seconds

node --version
v7.10.0

🍻

@jmurzy
Copy link
Copy Markdown
Contributor Author

jmurzy commented Aug 31, 2017

@maxkorp is this PR safe to merge? If so, any rough ETA on when it might land in a release?

@sorenlouv
Copy link
Copy Markdown

Are there any blockers, or reasons why this is not merged? Perhaps some tests are needed?

@implausible
Copy link
Copy Markdown
Member

I think the addition of a test for this would be grand. I'm looking through the related discussions on what drove this PR and see if we can make it land soon.

@jmurzy
Copy link
Copy Markdown
Contributor Author

jmurzy commented Oct 16, 2017

@implausible I'd say existing test cases cover this minor tweak as well. So not sure what else can be tested here. Either way, let me know what you want tested and I'll try to add. Thanks!

@implausible implausible merged commit 708b9dd into nodegit:master Nov 28, 2017
@axiac
Copy link
Copy Markdown

axiac commented Dec 14, 2018

Jest tests of modules that require nodegit still do not work.
Using --no-cache (as suggested in Jest issue #3550) doesn't help.
It works if --maxWorkers is set to a value larger than the number of tests but this reaches its limits easily.

Do you have any idea where is the actual problem (NodeGit, Jest or Node)?

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.

5 participants