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

Enforce laziness of deferred libraries in dev_compiler #27776

Closed
munificent opened this issue Nov 7, 2016 · 1 comment
Closed

Enforce laziness of deferred libraries in dev_compiler #27776

munificent opened this issue Nov 7, 2016 · 1 comment

Comments

@munificent
Copy link
Member

@munificent munificent commented Nov 7, 2016

As of 8daf4cf, dev_compiler now supports the loadLibrary() function on deferred libraries. However, it does not validate that you call that before the library is used. This currently runs:

import "something.dart" deferred as something;

main() {
  // No loadLibrary() call.
  something.someFunction();
}

It would be great if dev_compiler threw an error here. Otherwise, users can iterate on programs that work fine in dev_compiler but fail when a production build is run.

@Markzipan
Copy link
Contributor

@Markzipan Markzipan commented Jan 27, 2021

This should be fixed as of https://dart-review.googlesource.com/c/sdk/+/177620!

Loading

@Markzipan Markzipan closed this Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants