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

Deprecate --new-formula/--new-cask options. #16297

Merged

Conversation

reitermarkus
Copy link
Member

@reitermarkus reitermarkus commented Dec 5, 2023

  • 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?

See Homebrew/homebrew-cask#161724.

Both --new-formula as well as --new-cask do the same thing as --new, so they're not needed anymore.

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 @reitermarkus, looking good so far. A few suggestions so we can get this deprecated sooner rather than later.

Library/Homebrew/dev-cmd/audit.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/audit.rb Outdated Show resolved Hide resolved
Comment on lines +114 to +117
new_cask = args.new? || args.new_cask?
new_formula = args.new? || args.new_formula?
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
new_cask = args.new? || args.new_cask?
new_formula = args.new? || args.new_formula?
new_cask = args.new?
if args.new_cask?
# odeprecated "brew audit --new-cask"
new_cask = true
end
new_formula = args.new?
if args.new_formula?
# odeprecated "brew audit --new-formula"
new_formula = true
end

Copy link
Member

Choose a reason for hiding this comment

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

@reitermarkus Still think this would be good to do so we delete and print deprecation messages on usage.

Copy link
Member Author

Choose a reason for hiding this comment

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

odeprecated is automatically done by CLI::Parser once the replacements are uncommented on the switch calls.

Copy link
Member

Choose a reason for hiding this comment

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

Yup but we're reliant on the commenting and changing of odeprecated to odisabled process to get this code removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I already added a odeprecated comment above on the switch calls. Once the switch calls use disable: true, calling args.new_formula?/args.new_cask? here will fail CI anyways.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also added a comment and disable: false to make it greppable.

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 ecb302c into Homebrew:master Dec 6, 2023
26 checks passed
@reitermarkus reitermarkus deleted the deprecate-new-formula-new-cask branch December 6, 2023 20:32
0xdevalias added a commit to 0xdevalias/dotfiles that referenced this pull request Dec 13, 2023
@github-actions github-actions bot added the outdated PR was locked due to age label Jan 6, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 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.

None yet

2 participants