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

'evaluate-commands' 131:15206: 'def' unknown option '-shell-candidates' #99

Closed
maximbaz opened this issue Oct 8, 2018 · 14 comments
Closed

Comments

@maximbaz
Copy link
Contributor

maximbaz commented Oct 8, 2018

Just updated kakoune and kak-lsp and now this command:

evaluate-commands %sh{kak-lsp --kakoune -s $kak_session}

Throws this error:

'evaluate-commands' 131:15206: 'def' unknown option '-shell-candidates' 

Probably related to mawww/kakoune#2419, but I didn't have time to look into it to verify.

@ul ul closed this as completed in a8e7830 Oct 9, 2018
@ul
Copy link
Collaborator

ul commented Oct 9, 2018

Yes, it is related, thanks for heads up!

@ul ul added the v5.5.1 label Oct 9, 2018
@dpc
Copy link
Contributor

dpc commented Nov 17, 2018

Hi @ul . This check does not seem to work on my NixOs system. My version is 2018.10.27, yet I still hit this error.

@dpc
Copy link
Contributor

dpc commented Nov 17, 2018

I can't figure out how to actually dispaly value of $kak_version

@ul
Copy link
Collaborator

ul commented Nov 17, 2018

Hey @dpc, you can try to execute :echo %val{version} in Kakoune itself, or, to double-check that env var is set, :echo %sh{echo $kak_version}.

@dpc
Copy link
Contributor

dpc commented Nov 17, 2018

2018.10.27

@dpc
Copy link
Contributor

dpc commented Nov 17, 2018

BTW, I don't know if it's of any use, but I don't think :echo %val{version} works. I've used :echo %sh{echo $kak_version} instead.

@ul
Copy link
Collaborator

ul commented Nov 17, 2018

It seems that check fails because your $kak_version is without v prefix (e.g. on my system $kak_version is v2018.10.27-28-g9bc893e7). We can add handling for such case, but I wonder why it's different in the first place. @mawww is there any logic which decides to put or not v prefix to the $kak_version?

@dpc
Copy link
Contributor

dpc commented Nov 17, 2018

@ul
Copy link
Collaborator

ul commented Nov 17, 2018

I'm not sure that Kakoune draws its version from packaging information (and $kak_version is set by Kakoune), and it looks like build script is not patching Kakoune regarding that matter. Am I missing something?

@maximbaz
Copy link
Contributor Author

It is most certainly a fault of the way kakoune is packaged.

Here's how it's defined in kakoune's Makefile: first check what .version file contains (this file exists in release archive), if it doesn't exist, try to run git describe --tags HEAD.

However, you can overwrite this algorithm by passing version as an argument to make, and it seems this is what nixOS package is doing. Needs to be reported to them.

❯ version=aaa make
...                                                                                            
❯ ./kak -version                              
Kakoune aaa

@ul
Copy link
Collaborator

ul commented Nov 17, 2018

Thanks for clarification. It's quite fun that Nix passes version to make implicitly, I didn't expect that.

@maximbaz
Copy link
Contributor Author

Me neither! And I'm not 100% sure this is what happens, but seems very likely 🙂

@dpc
Copy link
Contributor

dpc commented Nov 18, 2018

@utdemir might be able to help (I'm just looking at the history of the file)

@utdemir
Copy link

utdemir commented Nov 18, 2018

Hi. Yes, it looks like Nix automatically adds a version environment variable on the build environment. It is no big deal to make the version start with v, if there's tooling assuming that convention. I raised a PR to do that.

vdemeester pushed a commit to vdemeester/nixpkgs that referenced this issue Nov 20, 2018
* kakoune: Prefix version with 'v' (NixOS#50617)

Turns out there's some tooling parsing the version number and having a
'v' prefix works better in that case.

I tested that it builds & works fine on NixOS.

See: kakoune-lsp/kakoune-lsp#99

* Override 'version' env variable
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

4 participants