Fisher: New fisher v3 only copies .fish files

Created on 6 Oct 2018  路  21Comments  路  Source: jorgebucaran/fisher

With the new v3 only .fish files are copied to the fish/functions/.

Someone has raised an issue on my repo
https://github.com/FabioAntunes/fish-nvm/issues/27

The problem is that bass has a python file that needs to be moved/symlinked into the fish/functions/ folder

enhancement

Most helpful comment

Fixed in 3.0.4 7850f78. 馃帀

To upgrade to 3.0.4 use:

fisher self-update

All 21 comments

@FabioAntunes Yes, same as https://github.com/jorgebucaran/fisher/issues/452. In V3 only .fish files are copied to the installation path.

Well in this case there's no way to put a .py file inside a .fish file? any specific reason for not doing symlinks anymore?

@FabioAntunes This has nothing to do with symbolic links. We could copy the file alright. I'd be happy to find another way to solve this, that doesn't involve copying more files into $fisher_path.

@FabioAntunes We could as well if the file was copied to $fisher_path. Symbolic links, hard links, either would work.

it was just a way to prevent copying .py to the /functions folder

@FabioAntunes I know what it is, didn't I implement it? I'm missing your point.

Now, wouldn't it be more logical if bass was split into bass.py a python utility which you can install on your system using a traditional package manager and bass.fish a fish-shell package which you can add to your fish configuration using fisher, etc?

I am happy to discuss an alternative to creating hard links (copying the file) / creating symbolic links in $fisher_path.

Where do we draw the line? What if a fish package decides to include an executable binary file and run it on shell startup via configuration snippets?

@FabioAntunes You posted the same comment twice.

V2 used to copy .py and .awk files from conf.d/ and functions/ to $fisher_path.

https://github.com/jorgebucaran/fisher/blob/766bd093a1b0be65b62d62080fbf9fe029b19c1d/fisher.fish#L928-L936

But why only .py or .awk? What about .bas, .cpp and .hs? Should we extend this to include any other files in the top-level directory?

What would be the right thing to do?

It depends on what you are trying to achieve here. Bass is meant to be installed either using omf fundle and fisher. Right now installing with fisher v3 isn't possible. If the idea is to have packages that are able to work independent of the package manager then somehow fisher should be able to provide a way to solve this, either by allowing hard links or symlinks.

There might be much more plugins with external dependencies

@FabioAntunes We're discussing two different things. Your focus is on whether the package works or not. bass doesn't work with V3 out of the box because I removed the ability to copy/move .py/.awk files to $fisher_path. I am fully aware of this. This is mentioned in the release notes.

My focus is on whether it would be considered a good idea for a fish package manager to copy non-.fish files to its target directory. It smells like a security risk. Or is it just my imagination.

The goal of this discussion is to make a decision. A decision can have a positive outcome, i.e., the feature will be added back to fisher or another means developed. Or it can have a negative outcome, not change taking place.

So, what do you think? what is the correct course of action?

some other failures/warnings I experience with v3 (unrelated to bass.py or symlinks, I think):

  • working after install, but not after restarting terminal (reinstalling starts this loop again, works until terminal restart) --> fzf
  • could not find package because there was no github account prefix, example done not found since it should be fisherman/done

@rmi7

could not find package because there was no github account prefix, example done not found since it should be fisherman/done

Use fisherman/done or whatever the package prefix is. The fisherman organization will be dissolved (see #446). So, I expect the prefix to change again when the repo is transferred back to its owner @franciscolourenco.

working after install, but not after restarting terminal (reinstalling starts this loop again, works until terminal restart) --> fzf

fzf key bindings need to be fixed to work with V3's new streamlined approach to key bindings #448.

@jethrokuan I'm happy to send you a PR.

@jorgebucaran

regarding fisherman/done: yes I did manage to install successfully but then every time I install another package I get this fisher overview output which shows me these warnings, cannot find done, same goes for humanize_duration, also missing prefix so fisher tells me it can't find it.

I can however use these plugins, it's just that I keep getting these warnings

@rmi7 Manually open your fishfile, find the invalid entry and replace it with the correct one. If you don't know what that is I kindly suggest you invest a bit more time to learn about your package manager! 馃槃

atom ~/.config/fish/fishfile
- done
+ fisherman/done



md5-932e2b21d82c7fbebd9129f372bda002



fisher

Or do it interactively using the rm command.

See it's not that I really am bothered by the warnings, just thought I'd mention it here so that maybe you can one day fix them :)

Decided to downgrade to fisher 2.13.0 because of fish-nvm trouble, which I really need to work and I want to use fish shell so easy way out was to downgrade.

@rmi7 In V3 all packages must have a prefix. The correct package specifier for humanize_duration at this moment is fisherman/humanize_duration.

atom ~/.config/fish/fishfile
- humanize_duration
+ fisherman/humanize_duration



md5-932e2b21d82c7fbebd9129f372bda002



fisher

@rmi7 You can just copy __bass.py to your $fisher_path until this issue is resolved, which I expect to be soon. I don't recommend downgrading.

Responding to @jorgebucaran's request for comments:

Where do we draw the line? What if a fish package decides to include an executable binary file and run it on shell startup via configuration snippets?

It can do that anyway! The package could also copy the file itself, or even curl something else.

There is no additional security risk by allowing other languages.

There is an argument to be made that only allowing .fish files is "cleaner", but it seems like that train left the station when bass decided to depend on python.

Now, wouldn't it be more logical if bass was split into bass.py a python utility which you can install on your system using a traditional package manager and bass.fish a fish-shell package which you can add to your fish configuration using fisher, etc

Would that help in any way? Both are developed together and only useful together, so why even make it possible to install/upgrade/remove them separately, involving yet another thing (the system package manager) in the mix?

But why only .py or .awk? What about .bas, .cpp and .hs? Should we extend this to include any other files in the top-level directory?

Why not? If a package wants to suck, it'll find a way to suck.

@jorgebucaran the package works, it just doesn't work with fisher v3.

That's why I said it depends on what you are trying to achieve with this v3, if you want to achieve a simplified version of fisher but with inter operability between different package managers and support existing packages then somehow the hardlink or symlink feature needs to be added.

If you want to be strict with your decision that packages should be fish only, or they should be handling their own dependencies somehow then we move that responsibility to package authors.

My opinion is that by doing symlinking you will still be only doing .fish files only inside fish/functions but allowing package authors to introduce external dependencies and let them manage their stuff.

@faho Thank you!

@FabioAntunes The more files we copy/symlink the slower fisher installs the package, so let's stick only to files inside functions and conf.d like we used to. As for specific extensions, instead of only .py and .awk, let's just copy everything. It's unlikely there will be other files inside those two directories like there is in the top-level directory (README, LICENSE, etc).

Fixed in 3.0.4 7850f78. 馃帀

To upgrade to 3.0.4 use:

fisher self-update
Was this page helpful?
0 / 5 - 0 ratings