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

Strip the enclosing package's lower-case name from a library's dir name #3883

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

srawlins
Copy link
Member

@srawlins srawlins commented Sep 15, 2024

Fixes #3882

I wish I could write a unit test for this fix but it would be a lot of work, and I fear making too small a unit test (like literally just mocking out a package name to be 'Flutter' and basically just testing toLowerCase) would be unhelpful. To make a less mock-y test, with a real SDK-provided 'Flutter' package, and documenting dependencies, and running dartdoc how Flutter does, would be fragile and very complex.

In any case, I did manually check this fix:

  1. Run dart tool/task.dart doc flutter; see that the generated HTML has the flutter/widgets/widgets-library.html path for the widgets library.
  2. Edit the flutter checkout that the above command created, in a temp space, to have an unnamed library.
  3. Re-run the create_api_docs.dart command that is printed out in the first step; see that the generated HTML still has the correct path.

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@srawlins
Copy link
Member Author

Ready for review, @dart-lang/analyzer-team

@srawlins srawlins merged commit 526dbd5 into dart-lang:main Sep 16, 2024
7 checks passed
@srawlins srawlins deleted the lower-case-package-name branch September 16, 2024 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Names of anonymous libraries in 'Flutter' package are not stripped of 'package' prefix
2 participants