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
lrhn opened this issue Sep 3, 2014 · 15 comments
Closed

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

lrhn opened this issue Sep 3, 2014 · 15 comments

Comments

@lrhn
Copy link
Member

@lrhn 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 gbracha commented Dec 23, 2014

Maybe.


Added Accepted label.

@gbracha
Copy link
Contributor

@gbracha gbracha commented Dec 23, 2014

Set owner to @gbracha.

@davidmorgan
Copy link
Contributor

@davidmorgan 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 rkj commented Feb 25, 2016

+1

@sigmundch
Copy link
Member

@sigmundch 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 zzzev commented Feb 26, 2016

+1

@kevmoo kevmoo added type-enhancement and removed accepted labels Feb 29, 2016
@BlackHC
Copy link
Contributor

@BlackHC BlackHC commented Mar 7, 2016

+1

@danrubel
Copy link
Contributor

@danrubel danrubel commented Mar 7, 2016

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

@davidmorgan
Copy link
Contributor

@davidmorgan 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
4 of 16 tasks complete
@floitschG floitschG assigned floitschG and unassigned gbracha Oct 10, 2016
@dgrove
Copy link
Member

@dgrove dgrove commented Oct 20, 2016

@floitschG can you please provide an update?

@floitschG
Copy link
Contributor

@floitschG 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 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 floitschG commented Mar 30, 2017

This issue is now blocked by #28522

@davidmorgan
Copy link
Contributor

@davidmorgan davidmorgan commented Apr 11, 2017

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

@floitschG
Copy link
Contributor

@floitschG floitschG commented Jul 28, 2017

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

@floitschG floitschG closed this Jul 28, 2017
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
You can’t perform that action at this time.