Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] rustup: generate shell completions for cargo
@ 2022-02-22 11:28 tranzystorek-io
  2022-02-22 17:00 ` Duncaen
                   ` (29 more replies)
  0 siblings, 30 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-02-22 11:28 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rustup-cargo-completions
https://github.com/void-linux/void-packages/pull/35768

rustup: generate shell completions for cargo
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rustup-cargo-completions-35768.patch --]
[-- Type: text/x-diff, Size: 1238 bytes --]

From e0c1b659886aafbe3a3533a084142e4df7eb61ba Mon Sep 17 00:00:00 2001
From: Marcin Puc <marcin.e.puc@gmail.com>
Date: Tue, 22 Feb 2022 11:49:40 +0100
Subject: [PATCH] rustup: generate shell completions for cargo

---
 srcpkgs/rustup/template | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template
index b55cbe09d868..6c5ad1e20f55 100644
--- a/srcpkgs/rustup/template
+++ b/srcpkgs/rustup/template
@@ -1,7 +1,7 @@
 # Template file for 'rustup'
 pkgname=rustup
 version=1.24.3
-revision=1
+revision=2
 # rustup doesn't recognize this target
 archs="~armv*-musl"
 build_style=cargo
@@ -31,6 +31,10 @@ post_build() {
 	vtargetrun ./rustup completions zsh >rustup.zsh
 	vtargetrun ./rustup completions bash >rustup.bash
 	vtargetrun ./rustup completions fish >rustup.fish
+
+	# generate cargo completions
+	vtargetrun ./rustup completions bash cargo >cargo.bash
+	vtargetrun ./rustup completions zsh cargo >cargo.zsh
 }
 
 do_install() {
@@ -40,6 +44,9 @@ do_install() {
 	vcompletion rustup.fish fish
 	vcompletion rustup.zsh zsh
 
+	vcompletion cargo.bash bash cargo
+	vcompletion cargo.zsh zsh cargo
+
 	vdoc README.md
 	vlicense LICENSE-APACHE
 	vlicense LICENSE-MIT

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
@ 2022-02-22 17:00 ` Duncaen
  2022-02-22 17:59 ` tranzystorek-io
                   ` (28 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2022-02-22 17:00 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1048011478

Comment:
This would conflict with the `cargo` package. Wouldn't it be better anyways to generate them using the selected toolchain on your system?

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
  2022-02-22 17:00 ` Duncaen
@ 2022-02-22 17:59 ` tranzystorek-io
  2022-02-23  5:37 ` [PR PATCH] [Updated] " tranzystorek-io
                   ` (27 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-02-22 17:59 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1048065383

Comment:
Aside from the fact that it's surprising that rustup doesn't conflict with cargo and rustc already, I think it's cumbersome to manually create completion scripts and configure the paths.

For reference, arch does this with success and just declares rustup as conflicting with rust and cargo

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

* Re: [PR PATCH] [Updated] rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
  2022-02-22 17:00 ` Duncaen
  2022-02-22 17:59 ` tranzystorek-io
@ 2022-02-23  5:37 ` tranzystorek-io
  2022-02-27 13:40 ` tranzystorek-io
                   ` (26 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-02-23  5:37 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rustup-cargo-completions
https://github.com/void-linux/void-packages/pull/35768

rustup: generate shell completions for cargo
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rustup-cargo-completions-35768.patch --]
[-- Type: text/x-diff, Size: 1605 bytes --]

From 37446570eb4bba17bacf18e46572bd4dbeb80c3f Mon Sep 17 00:00:00 2001
From: Marcin Puc <marcin.e.puc@gmail.com>
Date: Tue, 22 Feb 2022 11:49:40 +0100
Subject: [PATCH] rustup: generate shell completions for cargo

---
 srcpkgs/rustup/template | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template
index b55cbe09d868..d16d8fc26f4b 100644
--- a/srcpkgs/rustup/template
+++ b/srcpkgs/rustup/template
@@ -1,7 +1,7 @@
 # Template file for 'rustup'
 pkgname=rustup
 version=1.24.3
-revision=1
+revision=2
 # rustup doesn't recognize this target
 archs="~armv*-musl"
 build_style=cargo
@@ -23,6 +23,12 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
+post_patch() {
+	# fix for https://github.com/void-linux/void-packages/issues/34889
+	cargo update --package autocfg:1.0.1 --precise 1.1.0
+	cargo update --package autocfg:0.1.7 --precise 0.1.8
+}
+
 post_build() {
 	RUSTUP="target/${RUST_TARGET}/release/rustup-init"
 	ln -sf "$RUSTUP" rustup
@@ -31,6 +37,10 @@ post_build() {
 	vtargetrun ./rustup completions zsh >rustup.zsh
 	vtargetrun ./rustup completions bash >rustup.bash
 	vtargetrun ./rustup completions fish >rustup.fish
+
+	# generate cargo completions
+	vtargetrun ./rustup completions bash cargo >cargo.bash
+	vtargetrun ./rustup completions zsh cargo >cargo.zsh
 }
 
 do_install() {
@@ -40,6 +50,9 @@ do_install() {
 	vcompletion rustup.fish fish
 	vcompletion rustup.zsh zsh
 
+	vcompletion cargo.bash bash cargo
+	vcompletion cargo.zsh zsh cargo
+
 	vdoc README.md
 	vlicense LICENSE-APACHE
 	vlicense LICENSE-MIT

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

* Re: [PR PATCH] [Updated] rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (2 preceding siblings ...)
  2022-02-23  5:37 ` [PR PATCH] [Updated] " tranzystorek-io
@ 2022-02-27 13:40 ` tranzystorek-io
  2022-03-04 15:28 ` tranzystorek-io
                   ` (25 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-02-27 13:40 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rustup-cargo-completions
https://github.com/void-linux/void-packages/pull/35768

rustup: generate shell completions for cargo
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rustup-cargo-completions-35768.patch --]
[-- Type: text/x-diff, Size: 1605 bytes --]

From b49011365de1dd7b0ed1025a95c2602562534b22 Mon Sep 17 00:00:00 2001
From: Marcin Puc <marcin.e.puc@gmail.com>
Date: Tue, 22 Feb 2022 11:49:40 +0100
Subject: [PATCH] rustup: generate shell completions for cargo

---
 srcpkgs/rustup/template | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template
index b55cbe09d868..d16d8fc26f4b 100644
--- a/srcpkgs/rustup/template
+++ b/srcpkgs/rustup/template
@@ -1,7 +1,7 @@
 # Template file for 'rustup'
 pkgname=rustup
 version=1.24.3
-revision=1
+revision=2
 # rustup doesn't recognize this target
 archs="~armv*-musl"
 build_style=cargo
@@ -23,6 +23,12 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
+post_patch() {
+	# fix for https://github.com/void-linux/void-packages/issues/34889
+	cargo update --package autocfg:1.0.1 --precise 1.1.0
+	cargo update --package autocfg:0.1.7 --precise 0.1.8
+}
+
 post_build() {
 	RUSTUP="target/${RUST_TARGET}/release/rustup-init"
 	ln -sf "$RUSTUP" rustup
@@ -31,6 +37,10 @@ post_build() {
 	vtargetrun ./rustup completions zsh >rustup.zsh
 	vtargetrun ./rustup completions bash >rustup.bash
 	vtargetrun ./rustup completions fish >rustup.fish
+
+	# generate cargo completions
+	vtargetrun ./rustup completions bash cargo >cargo.bash
+	vtargetrun ./rustup completions zsh cargo >cargo.zsh
 }
 
 do_install() {
@@ -40,6 +50,9 @@ do_install() {
 	vcompletion rustup.fish fish
 	vcompletion rustup.zsh zsh
 
+	vcompletion cargo.bash bash cargo
+	vcompletion cargo.zsh zsh cargo
+
 	vdoc README.md
 	vlicense LICENSE-APACHE
 	vlicense LICENSE-MIT

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (3 preceding siblings ...)
  2022-02-27 13:40 ` tranzystorek-io
@ 2022-03-04 15:28 ` tranzystorek-io
  2022-03-08 13:49 ` [PR PATCH] [Updated] " tranzystorek-io
                   ` (24 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-03-04 15:28 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1048065383

Comment:
Aside from the fact that it's surprising that rustup doesn't conflict with cargo and rustc already, I think it's cumbersome to manually create completion scripts and configure the paths.

For reference, arch does this with success and just declares rustup as conflicting with rust and cargo

EDIT: @Duncaen could you respond to what I said above?

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

* Re: [PR PATCH] [Updated] rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (4 preceding siblings ...)
  2022-03-04 15:28 ` tranzystorek-io
@ 2022-03-08 13:49 ` tranzystorek-io
  2022-03-08 14:21 ` Duncaen
                   ` (23 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-03-08 13:49 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rustup-cargo-completions
https://github.com/void-linux/void-packages/pull/35768

rustup: generate shell completions for cargo
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rustup-cargo-completions-35768.patch --]
[-- Type: text/x-diff, Size: 1605 bytes --]

From 04edf150f815efd48e671c8b761337d3a8093cb7 Mon Sep 17 00:00:00 2001
From: Marcin Puc <marcin.e.puc@gmail.com>
Date: Tue, 22 Feb 2022 11:49:40 +0100
Subject: [PATCH] rustup: generate shell completions for cargo

---
 srcpkgs/rustup/template | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template
index b55cbe09d868..d16d8fc26f4b 100644
--- a/srcpkgs/rustup/template
+++ b/srcpkgs/rustup/template
@@ -1,7 +1,7 @@
 # Template file for 'rustup'
 pkgname=rustup
 version=1.24.3
-revision=1
+revision=2
 # rustup doesn't recognize this target
 archs="~armv*-musl"
 build_style=cargo
@@ -23,6 +23,12 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
+post_patch() {
+	# fix for https://github.com/void-linux/void-packages/issues/34889
+	cargo update --package autocfg:1.0.1 --precise 1.1.0
+	cargo update --package autocfg:0.1.7 --precise 0.1.8
+}
+
 post_build() {
 	RUSTUP="target/${RUST_TARGET}/release/rustup-init"
 	ln -sf "$RUSTUP" rustup
@@ -31,6 +37,10 @@ post_build() {
 	vtargetrun ./rustup completions zsh >rustup.zsh
 	vtargetrun ./rustup completions bash >rustup.bash
 	vtargetrun ./rustup completions fish >rustup.fish
+
+	# generate cargo completions
+	vtargetrun ./rustup completions bash cargo >cargo.bash
+	vtargetrun ./rustup completions zsh cargo >cargo.zsh
 }
 
 do_install() {
@@ -40,6 +50,9 @@ do_install() {
 	vcompletion rustup.fish fish
 	vcompletion rustup.zsh zsh
 
+	vcompletion cargo.bash bash cargo
+	vcompletion cargo.zsh zsh cargo
+
 	vdoc README.md
 	vlicense LICENSE-APACHE
 	vlicense LICENSE-MIT

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (5 preceding siblings ...)
  2022-03-08 13:49 ` [PR PATCH] [Updated] " tranzystorek-io
@ 2022-03-08 14:21 ` Duncaen
  2022-03-08 15:26 ` tranzystorek-io
                   ` (22 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2022-03-08 14:21 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1061829280

Comment:
I don't see a reason to add a conflict between rust and rustup just for "wrong" (as they don't match the executables) bash completions.

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (6 preceding siblings ...)
  2022-03-08 14:21 ` Duncaen
@ 2022-03-08 15:26 ` tranzystorek-io
  2022-03-08 16:15 ` Duncaen
                   ` (21 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-03-08 15:26 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1061898404

Comment:
@Duncaen to be precise, the completion script generated by `rustup completion <shell> cargo` isn't tied to any fixed cargo version, but dynamically sources the script provided by the **current** default toolchain, so in that understanding it's not wrong.

Let's imagine a situation where the `cargo` and `rustup` packages are installed alongside. What is the expected workflow? Should the currently used toolchain depend on the PATH (whether it points to the `$HOME/.cargo/bin`)?

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (7 preceding siblings ...)
  2022-03-08 15:26 ` tranzystorek-io
@ 2022-03-08 16:15 ` Duncaen
  2022-03-08 16:23 ` Duncaen
                   ` (20 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2022-03-08 16:15 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1061951646

Comment:
> @Duncaen to be precise, the completion script generated by rustup completion <shell> cargo isn't tied to any fixed cargo version, but dynamically sources the script provided by the current default toolchain, so in that understanding it's not wrong.

Ok, makes sense.

> Let's imagine a situation where the cargo and rustup packages are installed alongside. What is the expected workflow? Should the currently used toolchain depend on the PATH (whether it points to the $HOME/.cargo/bin)?

IMHO yes, having rustup installed for one user does not mean another user is using it or is having it setup.

Not sure if there is a good solution to this, but making rustup and rust/cargo conflict is not it.

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (8 preceding siblings ...)
  2022-03-08 16:15 ` Duncaen
@ 2022-03-08 16:23 ` Duncaen
  2022-03-08 16:47 ` tranzystorek-io
                   ` (19 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2022-03-08 16:23 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1061959499

Comment:
Maybe we could use our own wrapper script that is loaded after  `/usr/share/bash-completion/completions/cargo` and will overwrite the completions if `rustc --print sysroot` is not `/usr`?

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (9 preceding siblings ...)
  2022-03-08 16:23 ` Duncaen
@ 2022-03-08 16:47 ` tranzystorek-io
  2022-06-28  2:15 ` [WIP] " github-actions
                   ` (18 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-03-08 16:47 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1061984246

Comment:
Seems like whatever this wrapper would be, it would probably have to be independent from the `rustup` or `cargo` packages, like (spitballing) a separate package altogether

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

* Re: [WIP] rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (10 preceding siblings ...)
  2022-03-08 16:47 ` tranzystorek-io
@ 2022-06-28  2:15 ` github-actions
  2022-06-28  5:06 ` [PR PATCH] [Updated] " tranzystorek-io
                   ` (17 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: github-actions @ 2022-06-28  2:15 UTC (permalink / raw)
  To: ml

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

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1168136632

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

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

* Re: [PR PATCH] [Updated] [WIP] rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (11 preceding siblings ...)
  2022-06-28  2:15 ` [WIP] " github-actions
@ 2022-06-28  5:06 ` tranzystorek-io
  2022-06-28  5:22 ` tranzystorek-io
                   ` (16 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-06-28  5:06 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rustup-cargo-completions
https://github.com/void-linux/void-packages/pull/35768

[WIP] rustup: generate shell completions for cargo
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rustup-cargo-completions-35768.patch --]
[-- Type: text/x-diff, Size: 1605 bytes --]

From de04a533d92b8b6246b362d30aa319adade23e40 Mon Sep 17 00:00:00 2001
From: Marcin Puc <marcin.e.puc@gmail.com>
Date: Tue, 22 Feb 2022 11:49:40 +0100
Subject: [PATCH] rustup: generate shell completions for cargo

---
 srcpkgs/rustup/template | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template
index b55cbe09d868..d16d8fc26f4b 100644
--- a/srcpkgs/rustup/template
+++ b/srcpkgs/rustup/template
@@ -1,7 +1,7 @@
 # Template file for 'rustup'
 pkgname=rustup
 version=1.24.3
-revision=1
+revision=2
 # rustup doesn't recognize this target
 archs="~armv*-musl"
 build_style=cargo
@@ -23,6 +23,12 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
+post_patch() {
+	# fix for https://github.com/void-linux/void-packages/issues/34889
+	cargo update --package autocfg:1.0.1 --precise 1.1.0
+	cargo update --package autocfg:0.1.7 --precise 0.1.8
+}
+
 post_build() {
 	RUSTUP="target/${RUST_TARGET}/release/rustup-init"
 	ln -sf "$RUSTUP" rustup
@@ -31,6 +37,10 @@ post_build() {
 	vtargetrun ./rustup completions zsh >rustup.zsh
 	vtargetrun ./rustup completions bash >rustup.bash
 	vtargetrun ./rustup completions fish >rustup.fish
+
+	# generate cargo completions
+	vtargetrun ./rustup completions bash cargo >cargo.bash
+	vtargetrun ./rustup completions zsh cargo >cargo.zsh
 }
 
 do_install() {
@@ -40,6 +50,9 @@ do_install() {
 	vcompletion rustup.fish fish
 	vcompletion rustup.zsh zsh
 
+	vcompletion cargo.bash bash cargo
+	vcompletion cargo.zsh zsh cargo
+
 	vdoc README.md
 	vlicense LICENSE-APACHE
 	vlicense LICENSE-MIT

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

* Re: [WIP] rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (12 preceding siblings ...)
  2022-06-28  5:06 ` [PR PATCH] [Updated] " tranzystorek-io
@ 2022-06-28  5:22 ` tranzystorek-io
  2022-07-15  6:00 ` [PR PATCH] [Updated] " tranzystorek-io
                   ` (15 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-06-28  5:22 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1168236738

Comment:
@Duncaen I tried to give this a bit more thought, what if we added cargo completion as a `rustup-cargo-completion` subpackage, and made that subpackage conflict with `cargo`?

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

* Re: [PR PATCH] [Updated] [WIP] rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (13 preceding siblings ...)
  2022-06-28  5:22 ` tranzystorek-io
@ 2022-07-15  6:00 ` tranzystorek-io
  2022-07-15  6:31 ` tranzystorek-io
                   ` (14 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-07-15  6:00 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rustup-cargo-completions
https://github.com/void-linux/void-packages/pull/35768

[WIP] rustup: generate shell completions for cargo
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rustup-cargo-completions-35768.patch --]
[-- Type: text/x-diff, Size: 1238 bytes --]

From a5131051408a4f6e21eb8d251aaf8492288c6585 Mon Sep 17 00:00:00 2001
From: Marcin Puc <marcin.e.puc@gmail.com>
Date: Tue, 22 Feb 2022 11:49:40 +0100
Subject: [PATCH] rustup: generate shell completions for cargo

---
 srcpkgs/rustup/template | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template
index da9d2751ba4f..4497605a6ad0 100644
--- a/srcpkgs/rustup/template
+++ b/srcpkgs/rustup/template
@@ -1,7 +1,7 @@
 # Template file for 'rustup'
 pkgname=rustup
 version=1.25.1
-revision=1
+revision=2
 # rustup doesn't recognize this target
 archs="~armv*-musl"
 build_style=cargo
@@ -31,6 +31,10 @@ post_build() {
 	vtargetrun ./rustup completions zsh >rustup.zsh
 	vtargetrun ./rustup completions bash >rustup.bash
 	vtargetrun ./rustup completions fish >rustup.fish
+
+	# generate cargo completions
+	vtargetrun ./rustup completions bash cargo >cargo.bash
+	vtargetrun ./rustup completions zsh cargo >cargo.zsh
 }
 
 do_install() {
@@ -40,6 +44,9 @@ do_install() {
 	vcompletion rustup.fish fish
 	vcompletion rustup.zsh zsh
 
+	vcompletion cargo.bash bash cargo
+	vcompletion cargo.zsh zsh cargo
+
 	vdoc README.md
 	vlicense LICENSE-APACHE
 	vlicense LICENSE-MIT

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

* Re: [PR PATCH] [Updated] [WIP] rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (14 preceding siblings ...)
  2022-07-15  6:00 ` [PR PATCH] [Updated] " tranzystorek-io
@ 2022-07-15  6:31 ` tranzystorek-io
  2022-07-15  6:46 ` tranzystorek-io
                   ` (13 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-07-15  6:31 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rustup-cargo-completions
https://github.com/void-linux/void-packages/pull/35768

[WIP] rustup: generate shell completions for cargo
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rustup-cargo-completions-35768.patch --]
[-- Type: text/x-diff, Size: 1683 bytes --]

From 1ba5638dff302da820061eb6cfc861259deb7a7c Mon Sep 17 00:00:00 2001
From: Marcin Puc <marcin.e.puc@gmail.com>
Date: Tue, 22 Feb 2022 11:49:40 +0100
Subject: [PATCH] New package: rustup-cargo-completion-1.25.1

---
 srcpkgs/rustup-cargo-completion |  1 +
 srcpkgs/rustup/template         | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)
 create mode 120000 srcpkgs/rustup-cargo-completion

diff --git a/srcpkgs/rustup-cargo-completion b/srcpkgs/rustup-cargo-completion
new file mode 120000
index 000000000000..14748877257e
--- /dev/null
+++ b/srcpkgs/rustup-cargo-completion
@@ -0,0 +1 @@
+rustup
\ No newline at end of file
diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template
index da9d2751ba4f..765958c8f45e 100644
--- a/srcpkgs/rustup/template
+++ b/srcpkgs/rustup/template
@@ -1,7 +1,7 @@
 # Template file for 'rustup'
 pkgname=rustup
 version=1.25.1
-revision=1
+revision=2
 # rustup doesn't recognize this target
 archs="~armv*-musl"
 build_style=cargo
@@ -31,6 +31,10 @@ post_build() {
 	vtargetrun ./rustup completions zsh >rustup.zsh
 	vtargetrun ./rustup completions bash >rustup.bash
 	vtargetrun ./rustup completions fish >rustup.fish
+
+	# generate cargo completions
+	vtargetrun ./rustup completions bash cargo >cargo.bash
+	vtargetrun ./rustup completions zsh cargo >cargo.zsh
 }
 
 do_install() {
@@ -44,3 +48,13 @@ do_install() {
 	vlicense LICENSE-APACHE
 	vlicense LICENSE-MIT
 }
+
+rustup-cargo-completion_package() {
+	short_desc+=" - cargo completion scripts"
+	depends="${sourcepkg}-${version}_${revision}"
+	conflicts="cargo"
+	pkg_install() {
+		vcompletion cargo.bash bash cargo
+		vcompletion cargo.zsh zsh cargo
+	}
+}

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

* Re: [WIP] rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (15 preceding siblings ...)
  2022-07-15  6:31 ` tranzystorek-io
@ 2022-07-15  6:46 ` tranzystorek-io
  2022-07-15 10:40 ` jcgruenhage
                   ` (12 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-07-15  6:46 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1185231354

Comment:
Decided to go this way since I don't see any other solution for the conflict, @Duncaen @jcgruenhage could you see if this makes sense?

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

* Re: [WIP] rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (16 preceding siblings ...)
  2022-07-15  6:46 ` tranzystorek-io
@ 2022-07-15 10:40 ` jcgruenhage
  2022-07-17 20:57 ` CameronNemo
                   ` (11 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: jcgruenhage @ 2022-07-15 10:40 UTC (permalink / raw)
  To: ml

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

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1185418273

Comment:
LGTM now, would be happy to use this :)

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (17 preceding siblings ...)
  2022-07-15 10:40 ` jcgruenhage
@ 2022-07-17 20:57 ` CameronNemo
  2022-07-17 21:14 ` CameronNemo
                   ` (10 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: CameronNemo @ 2022-07-17 20:57 UTC (permalink / raw)
  To: ml

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

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1186605807

Comment:
Makes sense to me. If someone finds a good way to get the completions in the rustup main package without conflicts, it should not be a challenge making the subpackage a dummy.

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (18 preceding siblings ...)
  2022-07-17 20:57 ` CameronNemo
@ 2022-07-17 21:14 ` CameronNemo
  2022-07-17 21:14 ` CameronNemo
                   ` (9 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: CameronNemo @ 2022-07-17 21:14 UTC (permalink / raw)
  To: ml

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

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1186608319

Comment:
We could vendor this (in files) to replace the generated cargo.bash, and name the completion cargo-rustup:

```
if command -v rustc >/dev/null 2>&1; then
	if [ "/usr" != "$(rustc --print sysroot)" ]; then
		source "$(rustc --print sysroot)"/etc/bash_completion.d/cargo
	fi
fi
```

Ideally we would monitor the generated code with a checksum...

But that is a lot of effort compared to asking users to install a subpackage.

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (19 preceding siblings ...)
  2022-07-17 21:14 ` CameronNemo
@ 2022-07-17 21:14 ` CameronNemo
  2022-07-18  7:15 ` jcgruenhage
                   ` (8 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: CameronNemo @ 2022-07-17 21:14 UTC (permalink / raw)
  To: ml

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

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1186608319

Comment:
We could vendor this (in files) to replace the generated cargo.bash, and name the completion cargo-rustup:

```
if command -v rustc >/dev/null 2>&1; then
	if [ "/usr" != "$(rustc --print sysroot)" ]; then
		source "$(rustc --print sysroot)"/etc/bash_completion.d/cargo
	fi
fi
```

Ideally we would monitor the generated completions with a checksum...

But that is a lot of effort compared to asking users to install a subpackage.

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (20 preceding siblings ...)
  2022-07-17 21:14 ` CameronNemo
@ 2022-07-18  7:15 ` jcgruenhage
  2022-07-18 22:29 ` [PR PATCH] [Updated] " tranzystorek-io
                   ` (7 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: jcgruenhage @ 2022-07-18  7:15 UTC (permalink / raw)
  To: ml

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

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1186847089

Comment:
Considering this has been moving since Feb, I'd say we can merge this as is with the subpackage and if someone wants to build a replacement that doesn't need a subpackage, we can deal with that later. The state as is right now is already an improvement over what we have right now.

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

* Re: [PR PATCH] [Updated] rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (21 preceding siblings ...)
  2022-07-18  7:15 ` jcgruenhage
@ 2022-07-18 22:29 ` tranzystorek-io
  2022-07-20 15:27 ` ahesford
                   ` (6 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-07-18 22:29 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rustup-cargo-completions
https://github.com/void-linux/void-packages/pull/35768

rustup: generate shell completions for cargo
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rustup-cargo-completions-35768.patch --]
[-- Type: text/x-diff, Size: 1683 bytes --]

From 3c6bfc778963170938617f9e61197ee006437318 Mon Sep 17 00:00:00 2001
From: Marcin Puc <marcin.e.puc@gmail.com>
Date: Tue, 22 Feb 2022 11:49:40 +0100
Subject: [PATCH] New package: rustup-cargo-completion-1.25.1

---
 srcpkgs/rustup-cargo-completion |  1 +
 srcpkgs/rustup/template         | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)
 create mode 120000 srcpkgs/rustup-cargo-completion

diff --git a/srcpkgs/rustup-cargo-completion b/srcpkgs/rustup-cargo-completion
new file mode 120000
index 000000000000..14748877257e
--- /dev/null
+++ b/srcpkgs/rustup-cargo-completion
@@ -0,0 +1 @@
+rustup
\ No newline at end of file
diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template
index da9d2751ba4f..765958c8f45e 100644
--- a/srcpkgs/rustup/template
+++ b/srcpkgs/rustup/template
@@ -1,7 +1,7 @@
 # Template file for 'rustup'
 pkgname=rustup
 version=1.25.1
-revision=1
+revision=2
 # rustup doesn't recognize this target
 archs="~armv*-musl"
 build_style=cargo
@@ -31,6 +31,10 @@ post_build() {
 	vtargetrun ./rustup completions zsh >rustup.zsh
 	vtargetrun ./rustup completions bash >rustup.bash
 	vtargetrun ./rustup completions fish >rustup.fish
+
+	# generate cargo completions
+	vtargetrun ./rustup completions bash cargo >cargo.bash
+	vtargetrun ./rustup completions zsh cargo >cargo.zsh
 }
 
 do_install() {
@@ -44,3 +48,13 @@ do_install() {
 	vlicense LICENSE-APACHE
 	vlicense LICENSE-MIT
 }
+
+rustup-cargo-completion_package() {
+	short_desc+=" - cargo completion scripts"
+	depends="${sourcepkg}-${version}_${revision}"
+	conflicts="cargo"
+	pkg_install() {
+		vcompletion cargo.bash bash cargo
+		vcompletion cargo.zsh zsh cargo
+	}
+}

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (22 preceding siblings ...)
  2022-07-18 22:29 ` [PR PATCH] [Updated] " tranzystorek-io
@ 2022-07-20 15:27 ` ahesford
  2022-07-20 15:34 ` Duncaen
                   ` (5 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: ahesford @ 2022-07-20 15:27 UTC (permalink / raw)
  To: ml

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

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1190429836

Comment:
Unless I'm misunderstanding things, I'm opposed to the subpackage or attempting to manage cargo completions in the rustup package. The whole point of rustup is to fetch one or more versions of the rust toolchain, including cargo, into a local (per-user) environment. We shouldn't be shipping completions for commands that aren't provided expliclty by the package. The completions aren't even guaranteed to be right if the cargo command syntax changes from one version of cargo to the next.

People using rustup can just as easily invoke `rustup completions <shell> cargo` in their shells. There's no reason to do that here.

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (23 preceding siblings ...)
  2022-07-20 15:27 ` ahesford
@ 2022-07-20 15:34 ` Duncaen
  2022-07-20 16:48 ` ahesford
                   ` (4 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2022-07-20 15:34 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1190437277

Comment:
> The whole point of rustup is to fetch one or more versions of the rust toolchain, including cargo, into a local (per-user) environment. We shouldn't be shipping completions for commands that aren't provided expliclty by the package.

This was my concern too, but it just generates a stub completions file that sources the actual completions from the choosen rust toolchain. (see https://github.com/void-linux/void-packages/pull/35768#issuecomment-1061898404)

https://github.com/rust-lang/rustup/blob/feec94b6e0203cb6ad023b1e2c953d058e5c3acd/src/cli/rustup_mode.rs#L1687-L1720

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (24 preceding siblings ...)
  2022-07-20 15:34 ` Duncaen
@ 2022-07-20 16:48 ` ahesford
  2022-07-20 16:48 ` ahesford
                   ` (3 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: ahesford @ 2022-07-20 16:48 UTC (permalink / raw)
  To: ml

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

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1190516788

Comment:
I think we can make this work for zsh without conflicts. Leave the completions in the cargo package `cargo`. In the `rustup` package, ship this file as `/usr/share/zsh/site-functions/_rustup_cargo`:
```sh
#compdef cargo

if command -v rustc >/dev/null 2>&1; then
	_rust_sysroot=$(rustc --print sysroot)

	if [ "$_rust_sysroot" != "/usr" ]; then
		_rust_cargo_comp="${_rust_sysroot}/share/zsh/site-functions/_cargo"
		[ -r "$_rust_cargo_comp" ] && source "$_rust_cargo_comp"
		unset _rust_cargo_comp
	fi
	unset _rust_sysroot
fi
```
If `cargo` is installed, the system `/usr/share/zsh/site-functions/_cargo` file will be processed first. I believe zsh will ignore the definition in `_rustup_cargo` because it seems to pick only the first `#compdef cargo` definition. If `cargo` is not installed, this file will be processed and do the right thing for `rustup` users.

As for bash, I don't really understand the completion system. Even with a custom script, I can't seem to get it to properly complete because the scripts seem to be sourced before the local environment defines the right path to `rustc`.

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (25 preceding siblings ...)
  2022-07-20 16:48 ` ahesford
@ 2022-07-20 16:48 ` ahesford
  2022-10-19  2:14 ` github-actions
                   ` (2 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: ahesford @ 2022-07-20 16:48 UTC (permalink / raw)
  To: ml

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

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1190516788

Comment:
I think we can make this work for zsh without conflicts. Leave the completions in the `cargo` package. In the `rustup` package, ship this file as `/usr/share/zsh/site-functions/_rustup_cargo`:
```sh
#compdef cargo

if command -v rustc >/dev/null 2>&1; then
	_rust_sysroot=$(rustc --print sysroot)

	if [ "$_rust_sysroot" != "/usr" ]; then
		_rust_cargo_comp="${_rust_sysroot}/share/zsh/site-functions/_cargo"
		[ -r "$_rust_cargo_comp" ] && source "$_rust_cargo_comp"
		unset _rust_cargo_comp
	fi
	unset _rust_sysroot
fi
```
If `cargo` is installed, the system `/usr/share/zsh/site-functions/_cargo` file will be processed first. I believe zsh will ignore the definition in `_rustup_cargo` because it seems to pick only the first `#compdef cargo` definition. If `cargo` is not installed, this file will be processed and do the right thing for `rustup` users.

As for bash, I don't really understand the completion system. Even with a custom script, I can't seem to get it to properly complete because the scripts seem to be sourced before the local environment defines the right path to `rustc`.

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (26 preceding siblings ...)
  2022-07-20 16:48 ` ahesford
@ 2022-10-19  2:14 ` github-actions
  2022-10-19 18:13 ` tranzystorek-io
  2022-10-19 18:13 ` [PR PATCH] [Closed]: " tranzystorek-io
  29 siblings, 0 replies; 31+ messages in thread
From: github-actions @ 2022-10-19  2:14 UTC (permalink / raw)
  To: ml

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

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1283292980

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

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

* Re: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (27 preceding siblings ...)
  2022-10-19  2:14 ` github-actions
@ 2022-10-19 18:13 ` tranzystorek-io
  2022-10-19 18:13 ` [PR PATCH] [Closed]: " tranzystorek-io
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-10-19 18:13 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/35768#issuecomment-1284396094

Comment:
I've decided to close due to no apparent consensus.

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

* Re: [PR PATCH] [Closed]: rustup: generate shell completions for cargo
  2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
                   ` (28 preceding siblings ...)
  2022-10-19 18:13 ` tranzystorek-io
@ 2022-10-19 18:13 ` tranzystorek-io
  29 siblings, 0 replies; 31+ messages in thread
From: tranzystorek-io @ 2022-10-19 18:13 UTC (permalink / raw)
  To: ml

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

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

rustup: generate shell completions for cargo
https://github.com/void-linux/void-packages/pull/35768

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

end of thread, other threads:[~2022-10-19 18:13 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 11:28 [PR PATCH] rustup: generate shell completions for cargo tranzystorek-io
2022-02-22 17:00 ` Duncaen
2022-02-22 17:59 ` tranzystorek-io
2022-02-23  5:37 ` [PR PATCH] [Updated] " tranzystorek-io
2022-02-27 13:40 ` tranzystorek-io
2022-03-04 15:28 ` tranzystorek-io
2022-03-08 13:49 ` [PR PATCH] [Updated] " tranzystorek-io
2022-03-08 14:21 ` Duncaen
2022-03-08 15:26 ` tranzystorek-io
2022-03-08 16:15 ` Duncaen
2022-03-08 16:23 ` Duncaen
2022-03-08 16:47 ` tranzystorek-io
2022-06-28  2:15 ` [WIP] " github-actions
2022-06-28  5:06 ` [PR PATCH] [Updated] " tranzystorek-io
2022-06-28  5:22 ` tranzystorek-io
2022-07-15  6:00 ` [PR PATCH] [Updated] " tranzystorek-io
2022-07-15  6:31 ` tranzystorek-io
2022-07-15  6:46 ` tranzystorek-io
2022-07-15 10:40 ` jcgruenhage
2022-07-17 20:57 ` CameronNemo
2022-07-17 21:14 ` CameronNemo
2022-07-17 21:14 ` CameronNemo
2022-07-18  7:15 ` jcgruenhage
2022-07-18 22:29 ` [PR PATCH] [Updated] " tranzystorek-io
2022-07-20 15:27 ` ahesford
2022-07-20 15:34 ` Duncaen
2022-07-20 16:48 ` ahesford
2022-07-20 16:48 ` ahesford
2022-10-19  2:14 ` github-actions
2022-10-19 18:13 ` tranzystorek-io
2022-10-19 18:13 ` [PR PATCH] [Closed]: " tranzystorek-io

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).