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

Load tap migration renames from api #17599

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

apainintheneck
Copy link
Contributor

@apainintheneck apainintheneck commented Jun 30, 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?

Alternative approach to #17555 that is simpler and exactly matches the current behavior. The only downside is that the type system wasn't happy and I had to use an escape hatch.

Fixes #17234

These would not get loaded from the API at all meaning these
were not loadable by the old names when the core formula or cask
tap was not installed. We assume that most users don't have those
core taps tapped which means this is broken for most everyone.
Check for the following:
- Tap migration rename to core tap can be loaded by short name
- Tap migration rename to core tap can be loaded by long name
- Tap migration renam that clashes with existing core tap short name
  is ignored in favor of loading the cask/formula from the core tap
@apainintheneck apainintheneck force-pushed the load-tap-migration-renames-from-api branch from 668ac93 to fb3b13e Compare June 30, 2024 20:55
@apainintheneck apainintheneck marked this pull request as ready for review June 30, 2024 20:56
@apainintheneck apainintheneck added the bug Reproducible Homebrew/brew bug label Jun 30, 2024
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.

Looks good thanks @apainintheneck!

@MikeMcQuaid MikeMcQuaid merged commit 484498e into master Jul 1, 2024
25 checks passed
@MikeMcQuaid MikeMcQuaid deleted the load-tap-migration-renames-from-api branch July 1, 2024 07:43
@Logicer16
Copy link

Thanks for helping fix this issue. I've tried the change myself, but it seems the FromAPILoaders are being filtered by these lines.

.select { |tap| tap.path.exist? }

.select { |tap| tap.path.exist? }

@apainintheneck
Copy link
Contributor Author

@Logicer16 Thanks for catching that! I opened a PR that should address the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/brew bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

brew migrate doesn't recognise migrations to API taps
3 participants