-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 loading circular dependencies #655
Conversation
@@ -250,10 +251,6 @@ export class DenoCompiler implements ts.LanguageServiceHost { | |||
} | |||
const dependencyMetaData = this._getModuleMetaData(dep); | |||
assert(dependencyMetaData != null, `Missing dependency "${dep}".`); | |||
assert( |
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.
This was, in the end, a bad assertion, because with circular dependencies, you will have some modules that are not yet run, but we will be returning the reference to their .exports
object to a module.
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.
Looks good. Thanks ! Is there any way this could be tested in compiler_test instead ? The check output tests are relatively expensive to run - so I would like to avoid adding to them if possible.
Yes, I can do that instead! |
793cead
to
a36e30e
Compare
@ry good to go now. |
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.
LGTM - thanks!
This PR adds V8 code cache support for ES modules loaded through `ModuleLoader`, and for scripts evaluated through `evalContext` (used by `require` in Deno). Embedders have full control over whether code caching is enabled, and how code cache is retrieved/stored. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Fixes #653