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

implement deferred libraries #27343

Closed
jmesserly opened this issue Sep 14, 2016 · 5 comments

Comments

@jmesserly
Copy link
Contributor

commented Sep 14, 2016

From @jmesserly on August 31, 2015 16:14

Copied from original issue: dart-archive/dev_compiler#305

@jmesserly

This comment has been minimized.

Copy link
Contributor Author

commented Sep 14, 2016

@vsmenon just hit this

@vsmenon

This comment has been minimized.

Copy link
Member

commented Oct 6, 2016

@jmesserly - can you help @munificent get started on this? will we need any hooks in the module layer for this?

Note, we can break this into:

  • Support the syntax (lib.loadLibrary().then(...)) (P1)
  • Enforce laziness - a deferred library cannot be used until loadLibrary is invoked (P2, #27776)
  • Actual defer code loading (e.g., require on demand) (P3, #27777)

Only the first is P1.

@jmesserly

This comment has been minimized.

Copy link
Contributor Author

commented Oct 6, 2016

If you don't want to make it actually lazy, you shouldn't need anything but supporting the syntax.

@vsmenon

This comment has been minimized.

Copy link
Member

commented Oct 6, 2016

That sounds like a great step 1. Ideally, we'd enforce the laziness as well. Let me refine the list above.

munificent added a commit that referenced this issue Nov 7, 2016
Get the basics of deferred libraries working.
References to loadLibrary on a library prefix are compiled to a
helper function that returns a Future that always completes
successfully.

The deferred libraries aren't actually deferred, but code that uses
loadLibrary() now doesn't barf.

BUG=#27343
R=vsm@google.com

Review URL: https://codereview.chromium.org/2477673006 .
@munificent

This comment has been minimized.

Copy link
Member

commented Nov 7, 2016

The P1 is done. Filed separate tracking bugs for the other two parts of this, #27776 and #27777.

@munificent munificent closed this Nov 7, 2016

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