Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

feature: ability to swap out the default rig #187

Closed
shakefu opened this issue Sep 13, 2021 · 9 comments
Closed

feature: ability to swap out the default rig #187

shakefu opened this issue Sep 13, 2021 · 9 comments
Labels
enhancement New feature or request

Comments

@shakefu
Copy link

shakefu commented Sep 13, 2021

It looks like no matter what it's searching the default "Rig" even if it has been removed. Also it looks like support for Private or SSH based repos doesn't work?
image

If there's any way to configure gofish to use a private Fish Food repository instead of the default, this would be an amazing tool.

@bacongobbler
Copy link
Contributor

bacongobbler commented Sep 13, 2021

Hmm... You should be able specify the rig name as part of the package. This was put in place to ensure that the right package is chosen when two rigs with conflicting packages are added.

In other words: gofish install github.com/shakefu/fish-food/go.

However I think the default rig is hard-coded at this time.

I'd be happy to accept a PR that can either

  1. set a "default" rig, such that gofish install go would lookup under your fork
  2. use the only rig available as the default if no other rigs are installed

Either option should solve your use case.

@bacongobbler bacongobbler changed the title Custom repositories for Fish Food don't work? feature: ability to switch the default rig Sep 13, 2021
@bacongobbler
Copy link
Contributor

Updated the title to reflect the ask.

@bacongobbler bacongobbler added the enhancement New feature or request label Sep 13, 2021
@bacongobbler bacongobbler changed the title feature: ability to switch the default rig feature: ability to swap out the default rig Sep 13, 2021
@shakefu
Copy link
Author

shakefu commented Sep 13, 2021

Even with the default rig enabled gofish search go doesn't show the food in the added rig. Is this the expected behavior without the prefix?

@shakefu
Copy link
Author

shakefu commented Sep 13, 2021

Looks like the default rig is required to be present otherwise it breaks:
image

Searching does return the custom food if a partial prefix is supplied:
image

@bacongobbler
Copy link
Contributor

Worked for me just fine. Here's how I tested:

><> gofish rig remove github.com/fishworks/fish-food
🐠  rigs uninstalled in 1.764489ms
><> gofish rig add https://github.com/bacongobbler/fish-food
🐠  rig constructed in 1.097866964s
><> gofish rig list
NAME                             
github.com/bacongobbler/fish-food
><> gofish install wasmtime
==> Installing github.com/bacongobbler/fish-food/wasmtime...
🐠  wasmtime 0.29.0: installed in 1.130998062s
><> gofish search go | head -n 5
NAME                      	RIG                              	VERSION      
act                       	github.com/bacongobbler/fish-food	0.2.24       
aks-engine                	github.com/bacongobbler/fish-food	0.66.0       
anycable-go               	github.com/bacongobbler/fish-food	1.1.2        
argocd                    	github.com/bacongobbler/fish-food	2.0.5

@bacongobbler
Copy link
Contributor

Check and make sure you're using the latest version of gofish?

@bacongobbler
Copy link
Contributor

bacongobbler commented Sep 13, 2021

It is possible that Gofish may not be purging all of its cached data on a gofish unlink. Try purging any directories that are listed out with gofish tank and try again.

@shakefu
Copy link
Author

shakefu commented Sep 14, 2021

Check and make sure you're using the latest version of gofish?

Just installed following the install script instructions in the documentation a few hours ago.

image

Also I just noticed that go is listed twice in the output from search, but with the same repo:
image

I'll try purging.

@shakefu
Copy link
Author

shakefu commented Feb 4, 2022

Just closing this cause I never got it working but also never went far into debugging why my setup was broken.

@shakefu shakefu closed this as completed Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants