-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Allow "part of" to refer to its parent library by URI instead of name. #20792
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
Comments
Maybe. Added Accepted label. |
Set owner to @gbracha. |
+1 This change would be the perfect complement to the "library name defaults to empty" change. It would allow us to drop library statements altogether and still use part files when needed. This would be particularly helpful for source_gen since it relies on parts for generated code. https://github.com/dart-lang/source_gen |
+1 |
FYI - we also have a DEP for it - we had discussed it, but I forgot to file it under the DEP repo, so I just did here. |
+1 |
+1 |
+1 ... this would allow analysis of part files to be more efficient. |
Any update on this, please? |
@floitschG can you please provide an update? |
This feature is accepted by the language team. |
We need this flag for now until #20792 is resolved. [email protected], [email protected] BUG= Review URL: https://codereview.chromium.org/2459573005 .
Status update: |
This issue is now blocked by #28522 |
Seems like dart_style needs to support this too? dart-lang/dart_style#615 |
This has been implemented. |
Currently a library part must start with:
part of some.library.name;
The is supposed to give a hint about which library the part is part of, but it doesn't give a direct way to find the file. It might require a global search to actually find the file starting with "library some.library.name;" that includes the part.
If it was possible to instead write:
then tools could simply and immediately find the library from the part.
See dart-archive/dart_enhancement_proposals#45
The text was updated successfully, but these errors were encountered: