Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Deprecate the phylum formula #64

Merged
merged 2 commits into from
Feb 19, 2024
Merged

Deprecate the phylum formula #64

merged 2 commits into from
Feb 19, 2024

Conversation

maxrake
Copy link
Contributor

@maxrake maxrake commented Feb 16, 2024

Adding a deprecate! statement to the formula for the existing version (v6.1.1) does nothing for users who already have this version installed but it does print a warning and allow install when the version is not already installed.

Adding the conflicts_with statement helps to prevent conflicts with the phylum-cli formula in the core Homebrew tap and shows this error:

Error: Cannot install phylum-dev/cli/phylum because conflicting formulae are installed.
  phylum-cli: because both install `phylum` binaries

Please `brew unlink phylum-cli` before continuing.

Unlinking removes a formula's symlinks from /opt/homebrew. You can
link the formula again after the install finishes. You can `--force` this
install, but the build may fail or cause obscure side effects in the
resulting software.

Testing

The changes were tested with locally, with a clone of this repository.
This is what the deprecation message looks like:

❯ brew install phylum
Warning: maxrake/cli/phylum has been deprecated because it is available as `phylum-cli` in core tap!
To migrate:

  brew uninstall phylum
  brew untap phylum-dev/cli
  brew install phylum-cli

!
==> Fetching maxrake/cli/phylum
==> Downloading https://github.com/phylum-dev/homebrew-cli/releases/download/phylum-6.1.1/phylum-6.1.1.arm64_ventura.bottle.tar.gz
Already downloaded: /Users/maxrake/Library/Caches/Homebrew/downloads/be4f71881a6340314c912fe82bbb006936c3add79e1d29e12609e6145de9bcee--phylum-6.1.1.arm64_ventura.bottle.tar.gz
==> Installing phylum from maxrake/cli
==> Pouring phylum-6.1.1.arm64_ventura.bottle.tar.gz
==> Caveats
No official extensions have been installed. For a list of official extensions
with installation instructions, see:
  https://github.com/phylum-dev/cli/tree/main/extensions

zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions
==> Summary
🍺  /opt/homebrew/Cellar/phylum/6.1.1: 11 files, 111.0MB
==> Running `brew cleanup phylum`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

Adding a `deprecate!` statement to the formula for the existing version
(v6.1.1) does nothing for users who already have this version installed
but it does print a warning and allow install when the version is not
already installed.

Adding the `conflicts_with` statement helps to prevent conflicts with
the `phylum-cli` formula in the core Homebrew tap and shows this error:

```
Error: Cannot install phylum-dev/cli/phylum because conflicting formulae are installed.
  phylum-cli: because both install `phylum` binaries

Please `brew unlink phylum-cli` before continuing.

Unlinking removes a formula's symlinks from /opt/homebrew. You can
link the formula again after the install finishes. You can `--force` this
install, but the build may fail or cause obscure side effects in the
resulting software.
```
@maxrake
Copy link
Contributor Author

maxrake commented Feb 16, 2024

This PR is the first step in the proposed transition plan.

It is also worth mentioning that the bottles created by the workflow triggered by this PR should not be published until it is clear that this PR is complete and also ready to be merged.

@maxrake maxrake merged commit e8f02c9 into main Feb 19, 2024
1 check passed
@maxrake maxrake deleted the core_migration branch February 19, 2024 17:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants