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

Allow "part of" to refer to its parent library by URI instead of name. #20792

Closed
5 of 7 tasks
lrhn opened this issue Sep 3, 2014 · 15 comments
Closed
5 of 7 tasks

Allow "part of" to refer to its parent library by URI instead of name. #20792

lrhn opened this issue Sep 3, 2014 · 15 comments
Assignees
Labels
area-language Deprecated: New language issues should be filed at https://github.com/dart-lang/language area-meta type-enhancement

Comments

@lrhn
Copy link
Member

lrhn commented Sep 3, 2014

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:

part of "./thelibrary.dart";

then tools could simply and immediately find the library from the part.

See dart-archive/dart_enhancement_proposals#45

@gbracha
Copy link
Contributor

gbracha commented Dec 23, 2014

Maybe.


Added Accepted label.

@gbracha
Copy link
Contributor

gbracha commented Dec 23, 2014

Set owner to @gbracha.

@lrhn lrhn added Type-Enhancement area-language Deprecated: New language issues should be filed at https://github.com/dart-lang/language labels Dec 23, 2014
@davidmorgan
Copy link
Contributor

davidmorgan commented Feb 25, 2016

+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

@rkj
Copy link

rkj commented Feb 25, 2016

+1

@sigmundch
Copy link
Member

sigmundch commented Feb 25, 2016

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.

@zzzev
Copy link

zzzev commented Feb 26, 2016

+1

@BlackHC
Copy link
Contributor

BlackHC commented Mar 7, 2016

+1

@danrubel
Copy link

danrubel commented Mar 7, 2016

+1 ... this would allow analysis of part files to be more efficient.

@davidmorgan
Copy link
Contributor

davidmorgan commented Jun 21, 2016

Any update on this, please?

@floitschG floitschG added this to the 1.50 milestone Oct 10, 2016
@floitschG floitschG mentioned this issue Oct 10, 2016
16 tasks
@floitschG floitschG assigned floitschG and unassigned gbracha Oct 10, 2016
@dgrove
Copy link
Contributor

dgrove commented Oct 20, 2016

@floitschG can you please provide an update?

@floitschG
Copy link
Contributor

floitschG commented Oct 24, 2016

This feature is accepted by the language team.
The spec hasn't been updated yet, but the DEP for it is ready.
Afaik no implementation has started work on it.

scheglov added a commit that referenced this issue Oct 31, 2016
We need this flag for now until #20792
is resolved.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2459573005 .
@floitschG floitschG removed this from the 1.50 milestone Nov 2, 2016
@floitschG
Copy link
Contributor

floitschG commented Nov 2, 2016

Status update:
This is still an accepted feature, but we won't implement it for 1.50.

@floitschG
Copy link
Contributor

floitschG commented Mar 30, 2017

This issue is now blocked by #28522

@davidmorgan
Copy link
Contributor

davidmorgan commented Apr 11, 2017

Seems like dart_style needs to support this too? dart-lang/dart_style#615

@floitschG
Copy link
Contributor

floitschG commented Jul 28, 2017

This has been implemented.
We might want to change our own codebase, but that's an independent task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Deprecated: New language issues should be filed at https://github.com/dart-lang/language area-meta type-enhancement
Projects
None yet
Development

No branches or pull requests