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

Dynamic import #2516

Merged
merged 1 commit into from Aug 8, 2019

Conversation

@piscisaureus
Copy link
Collaborator

commented Jun 14, 2019

My attempt at fixing #2510.
The scope went a little overboard.
cc @ry

@piscisaureus

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 14, 2019

@ry
Copy link
Collaborator

left a comment

Does this compile for you? I'm getting type errors.

I kinda see the point of having this register() function to pass the &mut Isolate into the module code, but I don't understand what is being streamed.

core/isolate.rs Outdated Show resolved Hide resolved
core/isolate.rs Show resolved Hide resolved
core/isolate.rs Show resolved Hide resolved

@piscisaureus piscisaureus force-pushed the piscisaureus:loader_refactor branch 2 times, most recently from 43fd625 to 01b98de Jun 15, 2019

@@ -140,6 +161,24 @@ impl<L: Loader> RecursiveLoad<L> {

Ok(module_name)
}

pub fn get_future(

This comment has been minimized.

Copy link
@piscisaureus

piscisaureus Jun 15, 2019

Author Collaborator

Eventually this should go. I added it to make porting over the tests easier.

@ry

This comment has been minimized.

Copy link
Collaborator

commented Jun 17, 2019

ref #1789

@piscisaureus piscisaureus force-pushed the piscisaureus:loader_refactor branch 2 times, most recently from e5bb620 to 7b85cb9 Jul 12, 2019

cli/state.rs Outdated Show resolved Hide resolved

@piscisaureus piscisaureus force-pushed the piscisaureus:loader_refactor branch 4 times, most recently from 8fd5c92 to 3449974 Jul 12, 2019

@ry ry changed the title Loader refactor Dynamic import Jul 12, 2019

@ry ry referenced this pull request Jul 14, 2019
@ry

This comment has been minimized.

Copy link
Collaborator

commented Jul 23, 2019

Update: This is close to landing and still being worked on.

@ry ry referenced this pull request Aug 1, 2019

@piscisaureus piscisaureus force-pushed the piscisaureus:loader_refactor branch from e9b19e5 to 39d6eb6 Aug 7, 2019

core/isolate.rs Outdated Show resolved Hide resolved

@ry ry force-pushed the piscisaureus:loader_refactor branch from 39d6eb6 to 59fc1ec Aug 7, 2019

core/modules.rs Outdated Show resolved Hide resolved
core/isolate.rs Outdated Show resolved Hide resolved
@bartlomieju
Copy link
Contributor

left a comment

Some remarks from me. I need a bit more time to grok modules::State though...

core/dyn_imports.rs Outdated Show resolved Hide resolved
core/isolate.rs Show resolved Hide resolved
core/modules.rs Outdated Show resolved Hide resolved
@bartlomieju
Copy link
Contributor

left a comment

/core/modules.rs became very hard to understand again, but we can surely update it down the road. It's awesome to finally have dynamic imports!

core/modules.rs Show resolved Hide resolved
core/modules.rs Show resolved Hide resolved
@ry

This comment has been minimized.

Copy link
Collaborator

commented Aug 8, 2019

On appveyor the unit tests are failing. No idea why.

Summary for <no permissions>
undefined
Summary for --allow-read
test result: OK. 34 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (58.00ms)
Summary for --allow-net
test result: OK. 23 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (5514.00ms)
Summary for --allow-read --allow-write
test result: OK. 47 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (80.00ms)
Summary for --allow-write
test result: OK. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (20.00ms)
Summary for --allow-env
test result: OK. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (10.00ms)
Summary for --allow-run
test result: OK. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (254.00ms)
Summary for --allow-write --allow-run
test result: OK. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (36.00ms)
Summary for --allow-read --allow-write --allow-run
test result: OK. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (72.00ms)
Summary for --allow-hrtime
test result: OK. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (-0.16ms)
Unit tests failed
FAIL
@piscisaureus

This comment has been minimized.

@ry

This comment has been minimized.

Copy link
Collaborator

commented Aug 8, 2019

It's disabled https://github.com/denoland/deno/pull/2516/files#diff-06291984cb0c2f3e0fad6822ab277aec and not part of the unit tests.

I think we can land without error_014_catch_dynamic_import_error.js working yet.

@ry

ry approved these changes Aug 8, 2019

Copy link
Collaborator

left a comment

LGTM

@piscisaureus piscisaureus force-pushed the piscisaureus:loader_refactor branch from 583467e to 0a56326 Aug 8, 2019

@piscisaureus piscisaureus force-pushed the piscisaureus:loader_refactor branch from 0a56326 to 6fbf2e9 Aug 8, 2019

@piscisaureus piscisaureus merged commit 6fbf2e9 into denoland:master Aug 8, 2019

3 checks passed

Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla Contributor License Agreement is signed.
Details
@piscisaureus piscisaureus referenced this pull request Aug 9, 2019

@piscisaureus piscisaureus deleted the piscisaureus:loader_refactor branch Aug 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.