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

HTTPie formula no longer linked when cask also installed #15854

Closed
4 tasks done
jkbrzt opened this issue Aug 10, 2023 · 8 comments
Closed
4 tasks done

HTTPie formula no longer linked when cask also installed #15854

jkbrzt opened this issue Aug 10, 2023 · 8 comments
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age stale No recent activity

Comments

@jkbrzt
Copy link

jkbrzt commented Aug 10, 2023

brew config AND brew doctor output

$ brew doctor
Your system is ready to brew.
$ brew config
HOMEBREW_VERSION: 4.1.4-30-g1a8f1be
ORIGIN: https://github.com/Homebrew/brew
HEAD: 1a8f1be34bed35134ceed285dfaa90b3a82a11c1
Last commit: 16 hours ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 1d968739de1ce43d98e62a11896720c0d40c105c
Core tap last commit: 7 months ago
Core tap branch: master
Core tap JSON: 10 Aug 11:22 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: mvim -v
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: dodeca-core 64-bit arm_blizzard_avalanche
Clang: 14.0.3 build 1403
Git: 2.41.0 => /opt/homebrew/bin/git
Curl: 7.88.1 => /usr/bin/curl
macOS: 13.4.1-arm64
CLT: 14.3.1.0.1.1683849156
Xcode: 14.3.1
Rosetta 2: false

Verification

  • My "brew doctor output" says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

HTTPie has both a formula and a cask:

  1. httpie/desktop is in the httpie cask
  2. httpie/cli is in the httpie formula

I wanted to install both:

  1. brew install --cask httpie
  2. brew install httpie

What happened (include all command output)?

1/ HTTPie Desktop got installed ✅

2/ HTTPie CLI got installed but not linked ❌

$ httpie --version
-bash: httpie: command not found

It’s because:

==> httpie cask is installed, skipping link.

Full output:

$ brew install httpie
Warning: Treating httpie as a formula. For the cask, use homebrew/cask/httpie
==> Fetching httpie
==> Downloading https://ghcr.io/v2/homebrew/core/httpie/manifests/3.2.2_1-1
Already downloaded: /Users/jakub/Library/Caches/Homebrew/downloads/bb5854a02e9fac7da79650872e045c81024c49de88d7cdec295bdd5a726df676--httpie-3.2.2_1-1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:ad6c60de07befbb3c1b87cad3f1032468830cba7886f319
Already downloaded: /Users/jakub/Library/Caches/Homebrew/downloads/b508cef6813471882e0a7ce0a67eb561e01c7bd4bdf2cd9c03c0262fb3620a52--httpie--3.2.2_1.arm64_ventura.bottle.1.tar.gz
==> Pouring httpie--3.2.2_1.arm64_ventura.bottle.1.tar.gz
==> httpie cask is installed, skipping link.
==> Caveats
Bash completion has been installed to:
  /opt/homebrew/etc/bash_completion.d
==> Summary
🍺  /opt/homebrew/Cellar/httpie/3.2.2_1: 483 files, 2.9MB
==> Running `brew cleanup httpie`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

What did you expect to happen?

I expected the HTTPie formula to get linked as always:

$ httpie --version
3.2.2

The formula and cask are entirely independent.

For the record, I find using the same name confusing, as do our users, and would prefer to use different names, but my name change proposal got rejected. I think the best solution would be to have httpie-cli formula and httpie-desktop cask (if renames could be handled gracefully).


Step-by-step reproduction instructions (by running brew commands)

brew install --cask httpie
brew install httpie
httpie --version
@jkbrzt jkbrzt added the bug Reproducible Homebrew/brew bug label Aug 10, 2023
@jkbrzt jkbrzt changed the title HTTPie formula no longer linked on install HTTPie formula no longer linked on install when HTTPie cask also installed Aug 10, 2023
@jkbrzt jkbrzt changed the title HTTPie formula no longer linked on install when HTTPie cask also installed HTTPie formula no longer linked when HTTPie cask also installed Aug 10, 2023
@jkbrzt jkbrzt changed the title HTTPie formula no longer linked when HTTPie cask also installed HTTPie formula no longer linked when cask also installed Aug 10, 2023
@gromgit
Copy link
Member

gromgit commented Aug 11, 2023

That's a fix from 4 years ago to deal with a somewhat different issue.

brew link httpie should fix you right up.

@jkbrzt
Copy link
Author

jkbrzt commented Aug 11, 2023

Thanks for the context.

The problem with requiring brew link httpie— but only sometimes, based on the presence of an independent cask — is confusing to users. People don’t notice the message in the output and write in our Discord that the Homebrew formula doesn’t work.

Two questions:

  1. Is it now possible to rename formulas and/or casks gracefully?
  2. Would a PR introducing an option marking the formula independent of the eponymous cask be accepted?

Something like:

-    if cask_installed_with_formula_name
+    if !formula.independent_of_cask and cask_installed_with_formula_name
       ohai "#{formula.name} cask is installed, skipping link."
       return
     end

@carlocab carlocab transferred this issue from Homebrew/homebrew-core Aug 11, 2023
@MikeMcQuaid
Copy link
Member

  1. Is it now possible to rename formulas and/or casks gracefully?

Both.

2. Would a PR introducing an option marking the formula independent of the eponymous cask be accepted?

Yeh, I think so. Would like clarification from @Homebrew/cask maintainers on what they'd prefer. I'd be fine with either option.

Thanks for the considerate responses @jakubroztocil 🙇🏻

@razvanazamfirei
Copy link
Member

Renaming makes sense in this situation. If we're only renaming, it should be the cask since the formula is more popular.

@github-actions
Copy link

github-actions bot commented Sep 5, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added stale No recent activity and removed stale No recent activity labels Sep 5, 2023
@github-actions
Copy link

github-actions bot commented Oct 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Oct 1, 2023
@MikeMcQuaid
Copy link
Member

Will review a PR for this but closing for now.

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
@MikeMcQuaid
Copy link
Member

Track progress in Homebrew/homebrew-cask#12822

@github-actions github-actions bot added the outdated PR was locked due to age label Nov 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age stale No recent activity
Projects
None yet
Development

No branches or pull requests

5 participants
@MikeMcQuaid @gromgit @jkbrzt @razvanazamfirei and others