-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Need a way to re-export elements from imported library #760
Comments
Added this to the Release1.0 milestone. |
Making typedef work as a general type alias is something we plan to do. I agree that would address this issue. Set owner to @gbracha. |
Issue #1185 has been merged into this issue. |
Marked this as blocking #2901. |
Removed this from the Release1.0 milestone. |
We will be discussing a proposal for explicit re-export support at the Monday language meeting. |
Fixed in spec 0.1 Added Done label. |
And issue #3083 for the analyzer. |
Marked this as blocking #2901. |
…ions) https://dart.googlesource.com/protobuf/+log/1d175bef6043..ba29983968de 2022-10-18 [email protected] protoc_plugin: Reword some of the documentation (#766) 2022-10-18 [email protected] protoc_plugin: Improve "is map field" check (#765) 2022-10-18 [email protected] Update CHANGELOG: mention #751 2022-10-18 [email protected] Add CHANGELOG entry for #760, #763 2022-10-18 [email protected] Fix `null` handling in proto3 JSON deserializer (#763) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-protobuf-dart-sdk Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Dart Protobuf Support: https://github.com/dart-lang/protobuf/issues To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Tbr: [email protected] Change-Id: I5502c8ee170701888956534cbd92473a24435fea Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264664 Reviewed-by: Nate Bosch <[email protected]> Commit-Queue: Nate Bosch <[email protected]>
We need to be able to re-export imports for ~100 type definitions (classes or interfaces) that should be common between dart:dom and dart:html.
(1) dart:dom defines the class, e.g CanvasPixelArray.
(2) html:dart imports dart:dom as an implementation library.
(3) The user imports dart:html only and expects to have CanvasPixelArray. The user does not import dart:dom as that is discouraged - it would be mixing library layers.
Today we have to create a new html.CanvasPixelArray that wraps the dom.CanvasPixelArray. In cases where dart:html is adding significant functionality, that is OK, but there are ~100 classes where there is no value-add.
I propose that typedef can be used to introduce a new name for an existing type, not just to name a function type.
That new name is exported just like any other name (i.e. if not library-private).
library('dart:html');
import('dart:dom', prefix:'dom');
typedef dom.CanvasPixelArray CanvasPixelArray;
I have put this at high priority since we are currently maintaining ~100 inefficient wrapper classes to 're-export'. As we fill out the DOM we have a huge tax maintaining both.
The text was updated successfully, but these errors were encountered: