vim-nixhash icon indicating copy to clipboard operation
vim-nixhash copied to clipboard

chore: use nix3 hash conversion interface

Open bbjubjub2494 opened this issue 1 year ago • 2 comments

on Nix 2.22.3, nix-hash outputs a deprecation warning. The last line in the output is still the converted hash, but this breaks the vim.fn.split parser.

warning: The old format conversion sub commands of `nix hash` where deprecated in favor of `nix hash convert`.

Unfortunately, Lix 2.90 does not provide nix hash convert so there is a compatibility issue. It may be better to keep the old command and split by line terminators instead.

bbjubjub2494 avatar Aug 15 '24 19:08 bbjubjub2494

I don't have --extra-experimental-flags on my system so this fails. Also nix 2.3 does not have this command, and I have had people contribute fixes when I unintentionally nix 2.3 compat in another project of mine, so I think this matters. Since you also mention lix does not support the new command I think this change breaks too many setups.

The right way would be to ignore stderr, and apparently using vim.system instead of vim.fn.system supports that.

Note that I'll be unresponsive on github for a few weeks. Thank you for your patience.

symphorien avatar Aug 15 '24 21:08 symphorien

I don't have --extra-experimental-flags on my system so this fails. Also nix 2.3 does not have this command, and I have had people contribute fixes when I unintentionally nix 2.3 compat in another project of mine, so I think this matters. Since you also mention lix does not support the new command I think this change breaks too many setups.

The right way would be to ignore stderr, and apparently using vim.system instead of vim.fn.system supports that.

Note that I'll be unresponsive on github for a few weeks. Thank you for your patience.

You're right, I will implement that.

bbjubjub2494 avatar Aug 16 '24 07:08 bbjubjub2494

done in https://github.com/symphorien/vim-nixhash/commit/3b4d3f2742b168decc2281033b9c5c2c700c9ceb

symphorien avatar Nov 22 '24 21:11 symphorien