Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] neovim: remove alternatives.
@ 2022-03-15 22:15 atweiden
  2022-03-16  5:44 ` atweiden
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: atweiden @ 2022-03-15 22:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

There is a new pull request by atweiden against master on the void-packages repository

https://github.com/atweiden/void-packages neovim
https://github.com/void-linux/void-packages/pull/36165

neovim: remove alternatives.
Closes #36164

#### Testing the changes
- I tested the changes in this PR: **YES**

A patch file from https://github.com/void-linux/void-packages/pull/36165.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-neovim-36165.patch --]
[-- Type: text/x-diff, Size: 1175 bytes --]

From 8c4fde7084afc83b111487485c33874905fbf0d7 Mon Sep 17 00:00:00 2001
From: Andy Weidenbaum <atweiden@ioiojo.com>
Date: Wed, 16 Mar 2022 09:03:57 +1100
Subject: [PATCH] neovim: remove alternatives.

closes #36164
---
 srcpkgs/neovim/template | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/srcpkgs/neovim/template b/srcpkgs/neovim/template
index 28cbc7e363cb..2855af09f669 100644
--- a/srcpkgs/neovim/template
+++ b/srcpkgs/neovim/template
@@ -1,7 +1,7 @@
 # Template file for 'neovim'
 pkgname=neovim
 version=0.6.1
-revision=1
+revision=2
 build_style=cmake
 build_helper="qemu"
 configure_args="-DCMAKE_BUILD_TYPE=Release"
@@ -16,14 +16,6 @@ homepage="https://neovim.io"
 distfiles="https://github.com/neovim/neovim/archive/v${version}.tar.gz"
 checksum=dd882c21a52e5999f656cae3f336b5fc702d52addd4d9b5cd3dc39cfff35e864
 
-alternatives="
- vi:vi:/usr/bin/nvim
- vi:vi.1:/usr/share/man/man1/nvim.1
- vi:view:/usr/bin/nvim
- vi:view.1:/usr/share/man/man1/nvim.1
- vim:vim:/usr/bin/nvim
- vim:vim.1:/usr/share/man/man1/nvim.1"
-
 pre_configure() {
 	vsed -i runtime/CMakeLists.txt \
 		-e "s|\".*/bin/nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
@ 2022-03-16  5:44 ` atweiden
  2022-03-16  6:29 ` Duncaen
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: atweiden @ 2022-03-16  5:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

New comment by atweiden on void-packages repository

https://github.com/void-linux/void-packages/pull/36165#issuecomment-1068754834

Comment:
> If we have bash as sh and vim as vi

If Neovim can be Vim, Bash can be Dash.

```bash
# Template file for 'dash'
alternatives="
 sh:sh:/usr/bin/dash
 sh:sh.1:/usr/share/man/man1/dash.1"

# Template file for 'bash'
alternatives="
 sh:sh:/usr/bin/bash
 sh:sh.1:/usr/share/man/man1/bash.1"

# Template file for 'neovim'
alternatives="
  vi:vi:/usr/bin/nvim
  vi:vi.1:/usr/share/man/man1/nvim.1
```

The above would be logically consistent.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
  2022-03-16  5:44 ` atweiden
@ 2022-03-16  6:29 ` Duncaen
  2022-03-16  6:33 ` Duncaen
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Duncaen @ 2022-03-16  6:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/36165#issuecomment-1068782911

Comment:
Making dash bash breaks all scripts with bash shebang, installing nvim before vim makes it the default provider for the vim alternative group which you can easily fix and doesn't break half the system, all it does is make the cursor werid on your system.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
  2022-03-16  5:44 ` atweiden
  2022-03-16  6:29 ` Duncaen
@ 2022-03-16  6:33 ` Duncaen
  2022-03-16  6:34 ` Duncaen
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Duncaen @ 2022-03-16  6:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/36165#issuecomment-1068782911

Comment:
Making dash bash breaks all scripts with bash shebang, installing nvim before vim makes it the default provider for the vim alternative group which you can easily fix with xbps-alternatives, avoid by installing vim first (instead of alphabetically sorting xbps-install arguments or by just not installing nvim. It also doesn't break half the system, all it does is make the cursor werid on your system.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
                   ` (2 preceding siblings ...)
  2022-03-16  6:33 ` Duncaen
@ 2022-03-16  6:34 ` Duncaen
  2022-03-16  8:50 ` atweiden
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Duncaen @ 2022-03-16  6:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/36165#issuecomment-1068782911

Comment:
Making dash bash breaks all scripts with bash shebang, installing nvim before vim makes it the default provider for the vim alternative group which you can easily fix with xbps-alternatives, avoid by installing vim first (instead of alphabetically sorting xbps-install arguments or by just not installing nvim. It also doesn't break half the system, all it does is make the cursor werid on your system.

There would be no point in alternatives, if the requirement would be that they are 100% compatible, some things have stricter requirements than others, like shells, while other more interactive programs don't.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
                   ` (3 preceding siblings ...)
  2022-03-16  6:34 ` Duncaen
@ 2022-03-16  8:50 ` atweiden
  2022-03-16  9:19 ` paper42
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: atweiden @ 2022-03-16  8:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 848 bytes --]

New comment by atweiden on void-packages repository

https://github.com/void-linux/void-packages/pull/36165#issuecomment-1068878584

Comment:
> There would be no point in alternatives, if the requirement would be that they are 100% compatible

That’s fair, but what if we just did away with the symlink to `vim`? Neovim can have the `vi` symlink, and the result would be equal to how `alternatives` is handled in the shells.

It violates user expectation for `vim`, when typed out on any terminal in any circumstance, to *ever* result in Neovim being opened, unless the environment is specifically configured for such a thing.

IIRC, Void isn’t the only distro which symlinks `dash` to `/bin/sh`. Void, however, *is* (literally) the only distro which symlinks `nvim` to `vim`. It makes about as much sense as symlinking `bash` to `dash`.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
                   ` (4 preceding siblings ...)
  2022-03-16  8:50 ` atweiden
@ 2022-03-16  9:19 ` paper42
  2022-03-17  1:05 ` [PR PATCH] [Updated] " atweiden
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paper42 @ 2022-03-16  9:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/36165#issuecomment-1068903816

Comment:
> > There would be no point in alternatives, if the requirement would be that they are 100% compatible
> 
> That’s fair, but what if we just did away with the symlink to `vim`? Neovim can have the `vi` symlink, and the result would be equal to how `alternatives` is handled in the shells.

I already explained in https://github.com/void-linux/void-packages/issues/36164#issuecomment-1068583988 why this is not without a problem. Having vim point to nvim can only happen in specific circumstances:
a) you manually modified alternatives
b) you installed neovim first

`b` can be a bit surprising, but it doesn't matter, people often don't even notice they are using nvim and not vim. 

> It violates user expectation for `vim`, when typed out on any terminal in any circumstance, to _ever_ result in Neovim being opened, unless the environment is specifically configured for such a thing.

And as we already discussed, it doesn't matter to regular users. neovim and vim are basically drop in replacements of each other.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
                   ` (5 preceding siblings ...)
  2022-03-16  9:19 ` paper42
@ 2022-03-17  1:05 ` atweiden
  2022-03-17  1:07 ` atweiden
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: atweiden @ 2022-03-17  1:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

There is an updated pull request by atweiden against master on the void-packages repository

https://github.com/atweiden/void-packages neovim
https://github.com/void-linux/void-packages/pull/36165

neovim: remove alternatives.
Closes #36164

#### Testing the changes
- I tested the changes in this PR: **YES**

A patch file from https://github.com/void-linux/void-packages/pull/36165.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-neovim-36165.patch --]
[-- Type: text/x-diff, Size: 1046 bytes --]

From 3fd93c3d4080d2bfe7f0ed15757233fe6beeef13 Mon Sep 17 00:00:00 2001
From: Andy Weidenbaum <atweiden@ioiojo.com>
Date: Wed, 16 Mar 2022 09:03:57 +1100
Subject: [PATCH] neovim: remove alternatives.

closes #36164
---
 srcpkgs/neovim/template | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/neovim/template b/srcpkgs/neovim/template
index 28cbc7e363cb..8137a88f9ef8 100644
--- a/srcpkgs/neovim/template
+++ b/srcpkgs/neovim/template
@@ -1,7 +1,7 @@
 # Template file for 'neovim'
 pkgname=neovim
 version=0.6.1
-revision=1
+revision=2
 build_style=cmake
 build_helper="qemu"
 configure_args="-DCMAKE_BUILD_TYPE=Release"
@@ -18,11 +18,7 @@ checksum=dd882c21a52e5999f656cae3f336b5fc702d52addd4d9b5cd3dc39cfff35e864
 
 alternatives="
  vi:vi:/usr/bin/nvim
- vi:vi.1:/usr/share/man/man1/nvim.1
- vi:view:/usr/bin/nvim
- vi:view.1:/usr/share/man/man1/nvim.1
- vim:vim:/usr/bin/nvim
- vim:vim.1:/usr/share/man/man1/nvim.1"
+ vi:vi.1:/usr/share/man/man1/nvim.1"
 
 pre_configure() {
 	vsed -i runtime/CMakeLists.txt \

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
                   ` (6 preceding siblings ...)
  2022-03-17  1:05 ` [PR PATCH] [Updated] " atweiden
@ 2022-03-17  1:07 ` atweiden
  2022-03-17  1:07 ` atweiden
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: atweiden @ 2022-03-17  1:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 961 bytes --]

New comment by atweiden on void-packages repository

https://github.com/void-linux/void-packages/pull/36165#issuecomment-1069799662

Comment:
Yesterday, I suggested [doing](https://github.com/void-linux/void-packages/pull/36165#issuecomment-1068754834):

```bash
# Template file for 'dash'
alternatives="
 sh:sh:/usr/bin/dash
 sh:sh.1:/usr/share/man/man1/dash.1"

# Template file for 'bash'
alternatives="
 sh:sh:/usr/bin/bash
 sh:sh.1:/usr/share/man/man1/bash.1"

# Template file for 'neovim'
alternatives="
  vi:vi:/usr/bin/nvim
  vi:vi.1:/usr/share/man/man1/nvim.1
```

I’ve updated the PR accordingly, to minimize any confusion.

I simply don’t recognize any level of logical consistency in the way Neovim is allowed to easily override `vim` on Void systems. There is no logical difference between allowing this and allowing `bash` to override `dash`. It’s simply not what most users want or expect, edge cases from Debian aside.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
                   ` (7 preceding siblings ...)
  2022-03-17  1:07 ` atweiden
@ 2022-03-17  1:07 ` atweiden
  2022-03-17  1:11 ` [PR PATCH] [Closed]: " Duncaen
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: atweiden @ 2022-03-17  1:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 961 bytes --]

New comment by atweiden on void-packages repository

https://github.com/void-linux/void-packages/pull/36165#issuecomment-1069799662

Comment:
Yesterday, I suggested [doing](https://github.com/void-linux/void-packages/pull/36165#issuecomment-1068754834):

```bash
# Template file for 'dash'
alternatives="
 sh:sh:/usr/bin/dash
 sh:sh.1:/usr/share/man/man1/dash.1"

# Template file for 'bash'
alternatives="
 sh:sh:/usr/bin/bash
 sh:sh.1:/usr/share/man/man1/bash.1"

# Template file for 'neovim'
alternatives="
  vi:vi:/usr/bin/nvim
  vi:vi.1:/usr/share/man/man1/nvim.1
```

I’ve updated the PR accordingly, to minimize any confusion.

I simply don’t recognize any level of logical consistency in the way Neovim is allowed to easily override `vim` on Void systems. There is no logical difference between allowing this and allowing `bash` to override `dash`. It’s simply not what most users want or expect, edge cases from Debian aside.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Closed]: neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
                   ` (8 preceding siblings ...)
  2022-03-17  1:07 ` atweiden
@ 2022-03-17  1:11 ` Duncaen
  2022-03-27 18:28 ` [RFC] " Vaelatern
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Duncaen @ 2022-03-17  1:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 247 bytes --]

There's a closed pull request on the void-packages repository

neovim: remove alternatives.
https://github.com/void-linux/void-packages/pull/36165

Description:
Closes #36164

#### Testing the changes
- I tested the changes in this PR: **YES**

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
                   ` (9 preceding siblings ...)
  2022-03-17  1:11 ` [PR PATCH] [Closed]: " Duncaen
@ 2022-03-27 18:28 ` Vaelatern
  2022-03-27 20:35 ` paper42
  2022-03-27 20:35 ` [PR PATCH] [Closed]: " paper42
  12 siblings, 0 replies; 14+ messages in thread
From: Vaelatern @ 2022-03-27 18:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

New comment by Vaelatern on void-packages repository

https://github.com/void-linux/void-packages/pull/36165#issuecomment-1079989675

Comment:
I think this is wrong. :+1: for closing.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
                   ` (10 preceding siblings ...)
  2022-03-27 18:28 ` [RFC] " Vaelatern
@ 2022-03-27 20:35 ` paper42
  2022-03-27 20:35 ` [PR PATCH] [Closed]: " paper42
  12 siblings, 0 replies; 14+ messages in thread
From: paper42 @ 2022-03-27 20:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/36165#issuecomment-1080014046

Comment:
I agree with @Vaelatern and because there 3 team members agree on this, I am closing this PR.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Closed]: [RFC] neovim: remove alternatives.
  2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
                   ` (11 preceding siblings ...)
  2022-03-27 20:35 ` paper42
@ 2022-03-27 20:35 ` paper42
  12 siblings, 0 replies; 14+ messages in thread
From: paper42 @ 2022-03-27 20:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

There's a closed pull request on the void-packages repository

[RFC] neovim: remove alternatives.
https://github.com/void-linux/void-packages/pull/36165

Description:
Closes #36164

#### Testing the changes
- I tested the changes in this PR: **YES**

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-03-27 20:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15 22:15 [PR PATCH] neovim: remove alternatives atweiden
2022-03-16  5:44 ` atweiden
2022-03-16  6:29 ` Duncaen
2022-03-16  6:33 ` Duncaen
2022-03-16  6:34 ` Duncaen
2022-03-16  8:50 ` atweiden
2022-03-16  9:19 ` paper42
2022-03-17  1:05 ` [PR PATCH] [Updated] " atweiden
2022-03-17  1:07 ` atweiden
2022-03-17  1:07 ` atweiden
2022-03-17  1:11 ` [PR PATCH] [Closed]: " Duncaen
2022-03-27 18:28 ` [RFC] " Vaelatern
2022-03-27 20:35 ` paper42
2022-03-27 20:35 ` [PR PATCH] [Closed]: " paper42

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).