Skip to content

Prefer package-local canonicalization and warn on reexported private API across packages #1684

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

Merged
merged 1 commit into from
May 2, 2018

Conversation

jcollins-g
Copy link
Contributor

Fixes a small bug in canonicalization when cross-linking packages, where we sometimes might pick the wrong package as canonical when reexporting is going on. Provide a specific warning if a reexport of private APIs makes canonicalization unreliable.

@googlebot googlebot added the cla: yes Google CLA check succeeded. label May 1, 2018
testDartdocFlutterPlugin() async {
WarningsCollection warnings = await _buildDartdocFlutterPluginDocs();
if (!warnings.warningKeyCounts.isEmpty) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a warnings.hasWarnings getter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we're referencing warningKeyCounts to print it immediately after this, I think it's clearer to not have an extra getter.

@jcollins-g jcollins-g merged commit 711e52c into master May 2, 2018
@jcollins-g jcollins-g deleted the linking-refinements+restrict-canonicalization branch May 2, 2018 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants