Closed lilyball closed 3 years ago
Thank you, @lilyball. The language was definitely incorrect. I went ahead and updated the release notes accordingly.
Also I think the broken plugin warning should be brought back for plugins that don't install any files.
Who would benefit from this and why are people still creating Fish plugins with top-level .fish
files?
Who would benefit from this and why are people still creating Fish plugins with top-level
.fish
files?
It wouldn’t be for people creating new plugins, it would be for people trying to install older plugins that haven’t been updated for Fisher 4.x.
In fact, the README still advertises “ Oh My Fish! plugin support” but this isn’t true anymore. The top-level init/uninstall/key_bindings files comes from that and they aren’t supported anymore. I haven’t gone looking at existing OMF plugins but any that rely on this support will be broken.
https://github.com/jorgebucaran/fisher/issues/651 actually prompted the OMF maintainers to update plugins that had files living outside the prescribed directories, and even migrate init
files to configuration snippets! 😄
The Fisher 4.0.0 release notes mentions deprecating
init.fish
anduninstall.fish
, but it makes no mention ofkey_bindings.fish
. Similarly, the Fisher 4.2.0 release notes says "Remove support for.fish
files outside afunctions
directory".What's more, Fisher 4.0.0 dropped the
init.fish
,uninstall.fish
, andkey_bindings.fish
support without emitting any warnings, and instead of simply ignoring the files, it started copying them into thefunctions/
dir instead. This isn't "deprecating" them, this is breaking them entirely and causing unwanted behavior. It wasn't until Fisher 4.2.0 when support for files outside of subdirs was dropped that we got warnings, and Fisher 4.3.0 removed the warnings anyway.Which is to say, I have two plugins of mine that just have a top-level
key_bindings.fish
file and I had no idea they were broken, because Fisher orphaned the oldconf.d/$plugin.key_bindings.fish
files so they continued to work in my setup. But I also ended up with afunctions/key_bindings.fish
file that I didn't realize (which is a copy of the file from whichever of the two plugins was installed last). Even when updating to Fisher 4.2.0 I didn't realize they were broken, because Fisher doesn't re-invoke its own updated version to do an install and I had no reason to re-runfisher install
until updating to Fisher 4.3.0, at which point I thankfully got the warning during that install (but re-running it no longer shows that warning, I just have to notice that it didn't list any installed files).All of this to say, the documentation for Fisher 4.x never mentioned that a top-level
key_bindings.fish
was no longer supported (and the upgrade was botched as described above in terms of Fisher 4.0/4.1 installing this into the functions dir). Which made it very confusing for me to figure out what's going on. It's too late to fix the botched upgrade, but here's what you can do:key_bindings.fish
(and replace "Deprecate" with "Remove support for")..fish
files" as the current wording suggests all files must be infunctions
when there are three supported locations.Also I think the broken plugin warning should be brought back for plugins that don't install any files. This could be because it has only top-level fish files, or it could be because the repo isn't a fish plugin at all. This wouldn't be "Support for .fish files outside a functions directory is deprecated", but instead emit something like the following:
If the plugin has at least one file to install then no warning would be emitted.