Skip to content

xmind8: Unexpected method 'discontinued' called during caveats on Cask #210213

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

Open
6 tasks done
arturmartins opened this issue Apr 26, 2025 · 14 comments
Open
6 tasks done

Comments

@arturmartins
Copy link
Contributor

Verification

Description of issue

I have used Xmind8 for more than a decade, and I have it installed using Homebrew. Somehow, I started to have the following errors this week:

Error: Unexpected method 'discontinued' called during caveats on Cask xmind8.

I do have the cask file locally:

brew edit xmind8

cask "xmind8" do
  version "8-update9"
  sha256 "120745d98a6122af56f944f666c59a6c3e06099be3838c365e6554e82db19211"
  url "https://dl3.xmind.net/xmind-#{version}-macosx.dmg"
  name "XMind"
  desc "Mind mapping and brainstorming tool"
  homepage "https://www.xmind.net/xmind8-pro/"

  conflicts_with cask: "xmind"

  app "XMind.app"

  zap trash: [
    "~/Library/XMind",
    "~/Library/Saved Application State/org.xmind.cathy.application.savedState",
  ]

  caveats do
    discontinued
  end
end

I noticed that the cask xmind8 doesn't exist anymore in https://github.com/Homebrew/homebrew-cask/tree/master/Casks/x, despite the app still being available to download at https://www.xmind.net/xmind8-pro/

Downloaded the app today and confirmed that sha256sum:

sha256sum /tmp/xmind-8-update9-macosx.dmg
120745d98a6122af56f944f666c59a6c3e06099be3838c365e6554e82db19211  /tmp/xmind-8-update9-macosx.dmg

Workaround:

Comment the discontinued line, and the error goes away.

Question:

Shouldn't this cask be in the https://github.com/Homebrew/homebrew-cask/tree/master/Casks/x ?

Command that failed

brew info xmind8

Output of command with --verbose --debug

/opt/homebrew/Library/Homebrew/brew.rb (Formulary::NullLoader): loading xmind8
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromInstalledPathLoader): loading xmind8
Error: Unexpected method 'discontinued' called during caveats on Cask xmind8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
==> Printing caveats
==> xmind8: 8-update9
https://www.xmind.net/xmind8-pro/
Installed
/opt/homebrew/Caskroom/xmind8/8-update9 (314.9MB)
==> Name
XMind
==> Description
Mind mapping and brainstorming tool
==> Artifacts
XMind.app (App)

Output of brew doctor and brew config

brew config
HOMEBREW_VERSION: 4.4.32-64-g3329aad
ORIGIN: https://github.com/Homebrew/brew
HEAD: 3329aada38aeec4b05159e895acfa2bd5a5052a4
Last commit: 18 hours ago
Branch: master
Core tap JSON: 25 Apr 20:43 UTC
Core cask tap JSON: 25 Apr 20:43 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.TJU1ucuN3f/org.xquartz:0
HOMEBREW_EDITOR: code -w
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_INSTALL_CLEANUP: set
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.4.3 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.3/bin/ruby
CPU: deca-core 64-bit arm_firestorm_icestorm
Clang: 17.0.0 build 1700
Git: 2.49.0 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.4.1-arm64
CLT: 16.3.0.0.1.1742442376
Xcode: N/A
Rosetta 2: false


brew doctor
Error: Unexpected method 'discontinued' called during caveats on Cask xmind8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
Error: Unexpected method 'discontinued' called during caveats on Cask xmind8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have the following deprecated, official taps tapped:
  Homebrew/homebrew-bundle
  Homebrew/homebrew-cask-fonts
  Homebrew/homebrew-services
Untap them with `brew untap`.
Error: Unexpected method 'discontinued' called during caveats on Cask xmind8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs

Output of brew tap

brew tap
aws/tap
buildpacks/tap
buo/cask-upgrade
github/gh
hashicorp/tap
homebrew/bundle
homebrew/cask-fonts
homebrew/services
@SMillerDev
Copy link
Member

@botantony , wasn't this something you were working on?

@botantony
Copy link
Contributor

Hmm... I was working on deprecate! and disable! methods and don't remember touching anything related to caveats or cask-specific.

It was deprecated by Mike McQuaid 7 months ago (before my first contribution to the Homebrew) and removed during preparation to 4.5.0: Homebrew/brew@c9a7b62

@botantony
Copy link
Contributor

botantony commented Apr 26, 2025

Huh, I cannot find any PR related to this cask
Image
git log --all -i --grep='xmind8' on this repository doesn't output anything either. This cask is probably in other repository (not in homebrew/homebrew-cask). @arturmartins can you remove caveats do block and show the output of brew info xmind8?

@arturmartins
Copy link
Contributor Author

Indeed, I couldn't find any PR or commits in this repo related to xmind8.

Removed the caveats do block, and the result is the same as having the deprecated line commented out.

brew info xmind8

==> xmind8: 8-update9
https://www.xmind.net/xmind8-pro/
Installed
/opt/homebrew/Caskroom/xmind8/8-update9 (314.9MB)
==> Name
XMind
==> Description
Mind mapping and brainstorming tool
==> Artifacts
XMind.app (App)

According to my Brewfile, I had to move from xmind to xmind8 on Sep 17, 2023. The brew edit suggests that the cask was part of the homebrew casks on 2023-09-13 10:15:07.102 (see below)

brew edit xmind8
Editing /opt/homebrew/Caskroom/xmind8/.metadata/8-update9/20230913101507.102/Casks/xmind8.rb

Hope this helps.

@arturmartins
Copy link
Contributor Author

arturmartins commented Apr 26, 2025

I just found two related PRs:

It seems that the xmind8 cask missed the repo migration?

@arturmartins
Copy link
Contributor Author

@botantony / @SMillerDev: Happy to submit a PR with the fixed xmind8.rb.

@botantony
Copy link
Contributor

I do not understand, are xmind and xmind8 two different program from the same developer or is it one program with 2 different versions?

@arturmartins
Copy link
Contributor Author

@botantony: Same company (xmind.net), just two different versions:

  • xmind now represents the latest version - mostly a web browser, and it's subscription-based.
  • xmind8 is the legacy app (2006-2019) - java app, works locally, and it's license-based (pay once, use forever)

@bevanjkay
Copy link
Member

xmind8 would not have been migrated to homebrew-cask because it was already marked as discontinued, and we had to set a certain threshold of use to cleanup what was included when the migration happened.

Your best option would be to host the cask in your own tap if you still need to manage the install with Homebrew.

@arturmartins
Copy link
Contributor Author

I wonder how it was considered discontinued if the company still offers the product https://xmind.app/download/xmind8/ and respective licenses https://xmind.app/pricing/xmind8-pro/ today?

By the way, I use the app on an M1 with 15.4.1, and it works as it always has on my old Macs.

@bevanjkay
Copy link
Member

Thanks for the extra info, you are welcome to open a PR to re-add the cask. Note that the token would now need to be xmind@8.

@colindean
Copy link
Contributor

colindean commented Apr 28, 2025

I'm seeing this same error, but with a general brew update operation after doing brew uninstall python@3.10 to debug another (likely unrelated) problem:

Error: Unexpected method 'discontinued' called during caveats on Cask adoptopenjdk8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs

The problem seems to have gone away for the brew update scope but still occurs when I try brew uninstall python@3.10… which does not proceed.

$ brew uninstall adoptopenjdk8
Error: Unexpected method 'discontinued' called during caveats on Cask adoptopenjdk8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
Error: Unexpected method 'discontinued' called during caveats on Cask adoptopenjdk8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
Error: Unexpected method 'discontinued' called during caveats on Cask adoptopenjdk8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
Error: Unexpected method 'discontinued' called during caveats on Cask adoptopenjdk8.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
==> Uninstalling Cask adoptopenjdk8
==> Uninstalling packages with sudo; the password may be necessary:
==> Purging files for version 8,292,b10 of Cask adoptopenjdk8

and I'm able to proceed with other tasks.

@AlekSi
Copy link
Contributor

AlekSi commented Apr 29, 2025

$ brew upgrade
Error: Unexpected method 'discontinued' called during caveats on Cask yubico-yubikey-personalization-gui.

@glebovdev
Copy link

I encountered the same error:
Error: Unexpected method 'discontinued' called during caveats on Cask adoptopenjdk8

Here’s how I solved it:

# Uninstall the cask
$ brew uninstall --cask adoptopenjdk8

# Install Temurin instead - it's the official replacement for adoptopenjdk8
$ brew install --cask temurin

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

No branches or pull requests

7 participants