Skip to content

sky_engine reexports dart libraries that have missing _embedder.yaml mappings #54793

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

Closed
jcollins-g opened this issue Apr 14, 2020 · 5 comments
Closed
Labels
engine flutter/engine repository. See also e: labels.

Comments

@jcollins-g
Copy link
Contributor

jcollins-g commented Apr 14, 2020

@Hixie @stereotype441

I first saw this while debugging dart-lang/dartdoc#2143. The example I found is in dart:html, whose source code is copied directly from: https://github.com/dart-lang/sdk/blob/master/sdk/lib/html/dart2js/html_dart2js.dart. It reexports promiseToFuture from dart:html_common, which isn't available in sky_engine.

I do not understand how Flutter can possibly work under these conditions (Why are there no compilation errors? Why are all analysis errors here always squelched?) but it clearly does.... so I'm filing this issue in part to ask:

  1. Is this an actual problem (meaning, it is a bug that all of our tools seem to ignore this situation), or are situations like this considered "normal"?
  2. If it isn't a problem, is ignoring this situation in tools the correct way to handle it? Or should we be working around this in a different way?

For example, a combination of factors tend to result in dartdoc and the analyzer ignoring this under most circumstances and just silently hiding things. You'll notice that in the documentation for dart:html at https://api.dart.dev/dev/2.8.0-dev.20.0/dart-html/dart-html-library.html includes promiseToFuture, but https://api.flutter.dev/flutter/dart-html/dart-html-library.html does not.

@jonahwilliams
Copy link
Member

I believe the reason this works is because sky_engine isn't actually used by anything besides the analyzer and dartdocs. The actual platform code is already present in the platform dill file produced by the engine, and the supported dart libraries are defined in https://github.com/flutter/engine/blob/master/lib/snapshot/libraries.json

@VladyslavBondarenko VladyslavBondarenko added the engine flutter/engine repository. See also e: labels. label Apr 15, 2020
@jcollins-g
Copy link
Contributor Author

@jonahwilliams @devoncarew That makes sense. Though, why is dart:html available in sky_engine but not the platform file?

@jonahwilliams
Copy link
Member

Flutter and Flutter for Web are different platforms with different available sets of dart SDK libraries. dart:html was added to sky engine because the web team wants web plugin authors to be able to get analysis results.

There is more context in #39998

@jcollins-g
Copy link
Contributor Author

Thanks. From reading this my general approach will be to continue to ignore and/or bypass analysis errors generated from sky_engine in dartdoc, and I'll follow up in #39998 if need be.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
engine flutter/engine repository. See also e: labels.
Projects
None yet
Development

No branches or pull requests

3 participants