Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(npm): handle an npm package that has itself as a dependency #17425

Merged
merged 2 commits into from
Jan 14, 2023

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jan 14, 2023

I'm not sure this properly handles scenarios where an npm package uses an alias that resolves to itself, we can fix that if we find a package that actually depends on that behavior.

V:\deno_report [oci ≡]
> ../deno/target/debug/deno run main.ts
✅ Granted env access to "NODE_CLUSTER_SCHED_POLICY".
✅ Granted env access to "NODE_UNIQUE_ID".
hello

Closes #17420

@@ -303,6 +303,7 @@ impl Graph {
parent_id: &NpmPackageId,
) {
let mut child = (*child).lock();
assert_ne!(child.id, *parent_id);
Copy link
Member Author

Choose a reason for hiding this comment

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

Need to do this before it would deadlock on the line below.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, no comments

@dsherret dsherret merged commit 7cd249d into denoland:main Jan 14, 2023
@dsherret dsherret deleted the fix_npm_package_dependency_self branch January 14, 2023 20:10
bartlomieju pushed a commit that referenced this pull request Jan 16, 2023
I'm not sure this properly handles scenarios where an npm package uses
an alias that resolves to itself, we can fix that if we find a package
that actually depends on that behavior.

Closes #17420
MierenManz added a commit to MierenManz/oned that referenced this pull request Jan 20, 2023
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.

deno hangs when npm package has itself as a dependency
2 participants