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(vendor): error on dynamic imports that fail to load instead of panicking #15391

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Aug 2, 2022

Closes #15215

@dsherret dsherret requested a review from kitsonk August 2, 2022 22:49
let err = builder
.with_loader(|loader| {
loader.add("/mod.ts", "import 'https://localhost/mod.ts';");
loader.add("https://localhost/mod.ts", "await import('./test.ts');");
Copy link
Member Author

Choose a reason for hiding this comment

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

Interestingly this only occurs for dynamic imports.

@@ -68,6 +68,14 @@ pub fn build(
graph.lock()?;
graph.valid()?;
Copy link
Member Author

@dsherret dsherret Aug 2, 2022

Choose a reason for hiding this comment

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

Removing this in https://github.com/denoland/deno/pull/15390/files#diff-25670ef0ccc50ba364743d0195b7ed54396876142b482fa36b99926bc1d6b46bL69 because it would error on some bare specifiers in type declarations, which wouldn't occur with deno run even when doing --check=remote.

I kind of feel like this should have surfaced the error though?

Copy link
Contributor

@kitsonk kitsonk left a comment

Choose a reason for hiding this comment

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

LGTM

@dsherret dsherret merged commit 8b03c1e into denoland:main Aug 4, 2022
@dsherret dsherret deleted the fix_vendor_error_dynamic_failed branch August 4, 2022 01:23
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 panics when vendoring "https://esm.sh/[email protected]?pin=v87"
2 participants