circumflex icon indicating copy to clipboard operation
circumflex copied to clipboard

Make compatible with go install

Open shtirlic opened this issue 2 years ago • 6 comments

Is it possible to install via

go install github.com/bensadeh/circumflex@latest

now it's error with

go install github.com/bensadeh/circumflex@latest                                                                 1 ↵
go: downloading github.com/bensadeh/circumflex v0.0.0-20221014062858-feb512648702
go: github.com/bensadeh/circumflex@latest: github.com/bensadeh/[email protected]: parsing go.mod:
        module declares its path as: clx
                but was required as: github.com/bensadeh/circumflex

shtirlic avatar Oct 14 '22 07:10 shtirlic

This is something I'd like to add, but as far as I understand this issue is currently blocking it.

Since clx is the binary name (as opposed to circumflex), go install currently does not offer a way to rename the binary on install.

bensadeh avatar Oct 16 '22 06:10 bensadeh

Is it an option to settle with either clx or circumflex as the binary name?

The current instructions to install from source appear to be building and running instead of installing clx. This can be confusing for ones not familiar with golang (like myself). If we wait on https://github.com/golang/go/issues/44469 we might be in for a long long time.

Also, solving this would make it easy for me to install clx using asdf-vm. I use asdf-golang plugin to install go packages. This way I can just add the repo URL to my .default-golang-pkgs file and not have to think about it.

These are mere suggestions so please take them with a grain of salt.

krmbzds avatar Oct 21 '22 12:10 krmbzds

I am not sure what you mean by settle on either clx or circumflex as the binary name. clx is the binary name for running circumflex (same as rg is the binary name for running ripgrep).

I agree that the installation instructions are a bit confusing for running from source, I will update it to use go install locally, which will put the clx binary in $GOPATH/bin.

bensadeh avatar Oct 22 '22 05:10 bensadeh

I've posted and pinned #37 which I hope can be a good workaround for users looking for simple ways to install circumflex until we can use go install.

bensadeh avatar Oct 22 '22 05:10 bensadeh

Thanks for updating the instructions https://github.com/bensadeh/circumflex/commit/5c4176c7488cdca8b4640f060f4ed835f8817959. It's less confusing now. I installed circumflex using go install from source and clx is in my path. :+1:

krmbzds avatar Oct 22 '22 09:10 krmbzds

@krmbzds Great! :)

Hope in the future that installing circumlex will be easier and simpler.

bensadeh avatar Oct 23 '22 07:10 bensadeh