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

Calling plist_options in brew is deprecated; use service.require_root instead #1619

Closed
jayson-bunnell opened this issue Feb 9, 2023 · 17 comments

Comments

@jayson-bunnell
Copy link

in file/line koekeishiya/homebrew-formulae/yabai.rb:42, homebrew raises a warning on the deprecation of plist_options.

Exact Warning:
Warning: Calling plist_options is deprecated! Use service.require_root instead.

@Italia38
Copy link

Seeing the same issue here.

@timharek
Copy link

Someone has already submitted a PR for this here:
koekeishiya/homebrew-formulae#25

@jorpilo
Copy link

jorpilo commented Mar 7, 2023

We have replaced the PR by koekeishiya/homebrew-formulae#31
Ready to be merged but not sure who needs to merge it.

If you want in the meantime you can tap my fork and install it from there.
If you have the formulae installed, you can temporary change the origin of the tap until this has been merged.

cd $(brew --prefix)/Library/Taps/koekeishiya/homebrew-formulae
git remote set-url origin https://github.com/jorpilo/homebrew-formulae.git
brew update

@koekeishiya
Copy link
Owner

Maybe I'll just add a launchd integration directly in yabai instead of relying on the brew services thingy.

@koekeishiya
Copy link
Owner

koekeishiya commented Mar 22, 2023

^
Deprecating a feature to change their API without providing an adequate replacement (in the new API) that provides the same functionality (when it simply maps to a capability that is provided in launchd), is just dumb.

@pyinto
Copy link

pyinto commented Apr 4, 2023

any updates? The issue is still present

@jmadan
Copy link

jmadan commented Apr 5, 2023

any updates?

@schnattiba1
Copy link

Am seeing the same issue too while trying to upgrade node

@arkosno
Copy link

arkosno commented Apr 13, 2023

same here yabai works great though 👍

@aliaksandrsen
Copy link

is progress expected?

@koekeishiya
Copy link
Owner

koekeishiya commented Apr 13, 2023

is progress expected?

No.
The new homebrew service API does not support the ability to set the properties that the yabai plist currently uses.

On the master branch I've added commands directly to yabai that manages a launchd integration.
If homebrew has not fixed their API within the time I do a new release for yabai I will probably remove brew services integration and change installation instructions to use the yabai commands instead. Instead of running brew services <action> yabai you just run yabai --<action>-service instead. All of the following commands are simply proxies for launchctl commands.

# installs a user-specific launchd service plist file into ~/Library/LaunchAgents/com.koekeishiya.yabai.plist
# the program path used is the executable path of the invoked yabai command that installs the service
# the PATH env is set to the $PATH currently available to the invoked yabai command that installs the service
yabai --install-service

# removes launchd service file
yabai --uninstall-service

# loads the service, causing yabai to start running immediately, as well as upon login
# will attempt to install service automatically if it is not already installed, so --install-service is not really necessary to run manually
yabai --start-service

# restart the yabai service immediately
yabai --restart-service

# unload service, causing yabai to terminate immediately f it is running, and stop launching upon login
yabai --stop-service

@parikshith078
Copy link

I too use yabai 😅

@rafi
Copy link

rafi commented May 1, 2023

Has anyone found a quick fix to silence the annoying "Warning: Calling plist_options is deprecated!" messages spewing out even during auto-completing brew subcommands? It's driving me nuts.

@koekeishiya
Copy link
Owner

Removed homebrew services integration in v5.0.4 and updated docs.

@hungvx-dev
Copy link

@koekeishiya Please update for the skhd. Thank you

@koekeishiya
Copy link
Owner

skhd is already updated to work the same way.

@hungvx-dev
Copy link

Thank @koekeishiya . I saw that

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