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

Remove FromDefaultNameLoader to avoid warning twice. #16839

Merged

Conversation

reitermarkus
Copy link
Member

@reitermarkus reitermarkus commented Mar 6, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

This fixes the duplicate warning when trying to load a migrated formula/cask using a short token.

Note: This does not yet fix the warning being shown when loading both formulae/casks at the same time, despite the migrated-to formula/cask existing.

@reitermarkus reitermarkus force-pushed the remove-from-default-name-loader branch from e3201d2 to a24da6b Compare March 6, 2024 22:14
@bevanjkay
Copy link
Member

Because we aren't (to my knowledge) currently storing what tap a cask/formula is installed from, am I correct in understanding the warnings will show up every time a token is referenced for as long as it exists in a tap_migrations file?

@reitermarkus
Copy link
Member Author

Yes, as long as it is in tap_migrations, it will show a warning.

Currently there is still another bug: For example, brew info go will currently show a cask warning, despite the go formula existing. The cask warning in this case should really only show up when --cask is specified.

@bevanjkay
Copy link
Member

In general, should the warning only show if the migration is not found?

@reitermarkus
Copy link
Member Author

Whether or not it is found doesn't matter. The warning should only show if the user explicitly specified the thing that was migrated, in the go example that would be either

homebrew/cask/go

or

--cask go

but not

go

by itself.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Thanks again @reitermarkus!

@MikeMcQuaid MikeMcQuaid merged commit 4a1746f into Homebrew:master Mar 7, 2024
33 checks passed
@reitermarkus reitermarkus deleted the remove-from-default-name-loader branch March 7, 2024 13:01
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants