Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow "part of" to refer to its parent library by URI instead of name. #20792
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.
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