You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
@bcoe can you explain what exactly was wrong and how you fixed it? The commit shows no changes, but Greenkeeper reported a ton of fails for nyc@6.6.0. I tried clearing cache and restarting the build to make it install 6.6.1 and that fixed it: https://travis-ci.org/hoodiehq/hoodie/builds/137583994
The reason will be displayed to describe this comment to others. Learn more.
@gr2m npm's dedupe logic in 3.x brings to the forefront some potential singleton related bugs, because nyc acts as a harness, and relies on several fairly popular dependencies, it runs into a few of these ... as an example require-main-filename reporting the working directory of where nyc included the module first, rather than the top-level dependency that required the module.
tldr; we started bundling dependencies with nyc mainly to ensure that we were hanging these singletons onto different module instances ... we next found that deduping the modules installed for nyc itself still could lead to some of this strange singleton behavior ... my solution was to start installing with npm@2.x prior to publishing nyc ... unflattened dependencies.
v6.6.0 somehow ended up in a state where some deep dependencies had been hoisted that should not have been -- which is a dependency of foreground-child and had been hoisted, but is not part of the list of bundled modules.
The reason will be displayed to describe this comment to others. Learn more.
clarifying this summary a bit for the benefit of @kt3k:
if a module being tested by nyc, and nyc itself share a module, e.g., yargs, issues can arise when these modules hang state onto the global module.
by using bundled dependencies, we ensure that there are two copies of the module in the node_modules folder.
node's module loader attaches this global state onto each instance of the module, so if we have two different copies of yargs in node_modules, we circumvent singleton related bugs.
I somehow ended up with an unclean publish of nyc, which had deduped some modules but not others.
7bdccf5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bcoe can you explain what exactly was wrong and how you fixed it? The commit shows no changes, but Greenkeeper reported a ton of fails for nyc@6.6.0. I tried clearing cache and restarting the build to make it install 6.6.1 and that fixed it: https://travis-ci.org/hoodiehq/hoodie/builds/137583994
7bdccf5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gr2m npm's dedupe logic in
3.x
brings to the forefront some potential singleton related bugs, becausenyc
acts as a harness, and relies on several fairly popular dependencies, it runs into a few of these ... as an example require-main-filename reporting the working directory of wherenyc
included the module first, rather than the top-level dependency that required the module.tldr; we started bundling dependencies with
nyc
mainly to ensure that we were hanging these singletons onto different module instances ... we next found that deduping the modules installed fornyc
itself still could lead to some of this strange singleton behavior ... my solution was to start installing withnpm@2.x
prior to publishingnyc
... unflattened dependencies.v6.6.0
somehow ended up in a state where some deep dependencies had been hoisted that should not have been --which
is a dependency offoreground-child
and had been hoisted, but is not part of the list of bundled modules.7bdccf5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clarifying this summary a bit for the benefit of @kt3k:
node_modules
folder.7bdccf5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bcoe
Now I understand what singleton means in this context!
I think I understand this much clearer! π
Thank you! π