Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] New package: rustfmt-1.5.1
@ 2023-03-24 21:14 astralchan
  2023-03-24 21:17 ` [PR PATCH] [Updated] " astralchan
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: astralchan @ 2023-03-24 21:14 UTC (permalink / raw)
  To: ml

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

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

https://github.com/astralchan/void-packages rustfmt
https://github.com/void-linux/void-packages/pull/42987

[WIP] New package: rustfmt-1.5.1
[ci skip]

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

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

Currently failing:

```
   Compiling cargo_metadata v0.14.2
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `ast::Extern::Implicit`
   --> src/utils.rs:141:9
    |
141 |         ast::Extern::Implicit => "C".to_owned(),
    |         ^^^^^^^^^^^^^^^^^^^^^
    |
help: use the tuple variant pattern syntax instead
    |
141 |         ast::Extern::Implicit(/* fields */) => "C".to_owned(),
    |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: consider importing this unit variant instead
    |
1   | use rustc_session::cstore::CrateDepKind::Implicit;
    |
help: if you import `Implicit`, refer to it directly
    |
141 -         ast::Extern::Implicit => "C".to_owned(),
141 +         Implicit => "C".to_owned(),
    |

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> src/lib.rs:1:1
  |
1 | #![feature(rustc_private)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/utils.rs:142:31
    |
142 |         ast::Extern::Explicit(abi) => abi.symbol_unescaped.to_string(),
    |                               ^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
142 |         ast::Extern::Explicit(abi, _) => abi.symbol_unescaped.to_string(),
    |                                  +++

error[E0023]: this pattern has 6 fields, but the corresponding tuple variant has 7 fields
   --> src/utils.rs:482:34
    |
482 |         | ast::ExprKind::Closure(_, _, _, _, ref expr, _)
    |                                  ^  ^  ^  ^  ^^^^^^^^  ^ expected 7 fields, found 6
    |
help: use `_` to explicitly ignore each field
    |
482 |         | ast::ExprKind::Closure(_, _, _, _, ref expr, _, _)
    |                                                         +++

error[E0023]: this pattern has 6 fields, but the corresponding tuple variant has 7 fields
   --> src/closures.rs:315:35
    |
315 |     if let ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _) =
    |                                   ^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^  ^ expected 7 fields, found 6
    |
help: use `_` to explicitly ignore each field
    |
315 |     if let ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _, _) =
    |                                                                                              +++

error[E0023]: this pattern has 6 fields, but the corresponding tuple variant has 7 fields
   --> src/expr.rs:206:32
    |
206 |         ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _) => {
    |                                ^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^  ^ expected 7 fields, found 6
    |
help: use `_` to explicitly ignore each field
    |
206 |         ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _, _) => {
    |                                                                                           +++

error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> src/expr.rs:401:20
    |
401 |         .and_then(|expr_str| {
    |                    ^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `str`
help: function arguments must have a statically known size, borrowed types always have a known size
    |
401 |         .and_then(|&expr_str| {
    |                    +

error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> src/items.rs:151:17
    |
151 |                 ast::Extern::from_abi(fm.abi),
    |                 ^^^^^^^^^^^^^^^^^^^^^-------- an argument of type `Span` is missing
    |
note: associated function defined here
help: provide the argument
    |
151 |                 ast::Extern::from_abi(fm.abi, /* Span */),
    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:685:26
    |
685 |         TokenTree::Token(ref t) => t.clone(),
    |                          ^^^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
685 |         TokenTree::Token(ref t, _) => t.clone(),
    |                               +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:740:35
    |
740 |               Some(TokenTree::Token(Token {
    |  ___________________________________^
741 | |                 kind: TokenKind::Ident(name, _),
742 | |                 ..
743 | |             })) => {
    | |_____________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
743 |             }, _)) => {
    |              +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:780:34
    |
780 |                   TokenTree::Token(Token {
    |  __________________________________^
781 | |                     kind: TokenKind::BinOp(BinOpToken::Plus),
782 | |                     ..
783 | |                 })
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
783 |                 }, _)
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:784:36
    |
784 |                   | TokenTree::Token(Token {
    |  ____________________________________^
785 | |                     kind: TokenKind::Question,
786 | |                     ..
787 | |                 })
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
787 |                 }, _)
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:788:36
    |
788 |                   | TokenTree::Token(Token {
    |  ____________________________________^
789 | |                     kind: TokenKind::BinOp(BinOpToken::Star),
790 | |                     ..
791 | |                 }) => {
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
791 |                 }, _) => {
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:794:34
    |
794 |                 TokenTree::Token(ref t) => {
    |                                  ^^^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
794 |                 TokenTree::Token(ref t, _) => {
    |                                       +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:862:34
    |
862 |                   TokenTree::Token(Token {
    |  __________________________________^
863 | |                     kind: TokenKind::Dollar,
864 | |                     span,
865 | |                 }) => {
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
865 |                 }, _) => {
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:878:34
    |
878 |                   TokenTree::Token(Token {
    |  __________________________________^
879 | |                     kind: TokenKind::Colon,
880 | |                     ..
881 | |                 }) if self.is_meta_var => {
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
881 |                 }, _) if self.is_meta_var => {
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:884:34
    |
884 |                 TokenTree::Token(ref t) => self.update_buffer(t),
    |                                  ^^^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
884 |                 TokenTree::Token(ref t, _) => self.update_buffer(t),
    |                                       +++

error[E0308]: mismatched types
    --> src/macros.rs:1126:42
     |
1126 |         let args = TokenStream::new(vec![(tok, Spacing::Joint)]);
     |                                          ^^^^^^^^^^^^^^^^^^^^^ expected enum `TokenTree`, found tuple
     |
     = note: expected enum `TokenTree`
               found tuple `(TokenTree, Spacing)`

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
    --> src/macros.rs:1128:30
     |
1128 |               TokenTree::Token(Token {
     |  ______________________________^
1129 | |                 kind: TokenKind::FatArrow,
1130 | |                 ..
1131 | |             }) => {}
     | |_____________^ expected 2 fields, found 1
     |
help: use `_` to explicitly ignore each field
     |
1131 |             }, _) => {}
     |              +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
    --> src/macros.rs:1150:38
     |
1150 |           if let Some(TokenTree::Token(Token {
     |  ______________________________________^
1151 | |             kind: TokenKind::Semi,
1152 | |             span,
1153 | |         })) = self.toks.look_ahead(0)
     | |_________^ expected 2 fields, found 1
     |
help: use `_` to explicitly ignore each field
     |
1153 |         }, _)) = self.toks.look_ahead(0)
     |          +++

Some errors have detailed explanations: E0023, E0061, E0277, E0308, E0532, E0554.
For more information about an error, try `rustc --explain E0023`.
error: could not compile `rustfmt-nightly` due to 20 previous errors
warning: build failed, waiting for other jobs to finish...
=> ERROR: rustfmt-1.5.1_1: do_build: '${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}' exited with 101
=> ERROR:   in do_build() at common/build-style/cargo.sh:8
```

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

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

From b0f362034a7ccf89709ade23880f54683564131e Mon Sep 17 00:00:00 2001
From: astral <astral@astralchan.xyz>
Date: Fri, 24 Mar 2023 15:11:31 -0600
Subject: [PATCH] New package: rustfmt-1.5.1

---
 srcpkgs/rustfmt/template | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 srcpkgs/rustfmt/template

diff --git a/srcpkgs/rustfmt/template b/srcpkgs/rustfmt/template
new file mode 100644
index 000000000000..b669316035b4
--- /dev/null
+++ b/srcpkgs/rustfmt/template
@@ -0,0 +1,15 @@
+# Template file for 'rustfmt'
+pkgname=rustfmt
+version=1.5.1
+revision=1
+build_style=cargo
+short_desc="Tool for formatting Rust code according to style guidelines"
+maintainer="astral <astral@astralchan.xyz>"
+license="MIT Apache-2.0"
+homepage="https://github.com/rust-lang/rustfmt"
+distfiles="https://github.com/rust-lang/rustfmt/archive/refs/tags/v${version}.tar.gz"
+checksum=dc29a1c066fe4816e1400655c676d632335d667c3b0231ce344b2a7b02acc267
+
+post_install() {
+	vlicense LICENSE-MIT
+}

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

* Re: [PR PATCH] [Updated] [WIP] New package: rustfmt-1.5.1
  2023-03-24 21:14 [PR PATCH] [WIP] New package: rustfmt-1.5.1 astralchan
@ 2023-03-24 21:17 ` astralchan
  2023-03-26  7:45 ` classabbyamp
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: astralchan @ 2023-03-24 21:17 UTC (permalink / raw)
  To: ml

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

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

https://github.com/astralchan/void-packages rustfmt
https://github.com/void-linux/void-packages/pull/42987

[WIP] New package: rustfmt-1.5.1
[ci skip]

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

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

Currently failing:

```
   Compiling cargo_metadata v0.14.2
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `ast::Extern::Implicit`
   --> src/utils.rs:141:9
    |
141 |         ast::Extern::Implicit => "C".to_owned(),
    |         ^^^^^^^^^^^^^^^^^^^^^
    |
help: use the tuple variant pattern syntax instead
    |
141 |         ast::Extern::Implicit(/* fields */) => "C".to_owned(),
    |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: consider importing this unit variant instead
    |
1   | use rustc_session::cstore::CrateDepKind::Implicit;
    |
help: if you import `Implicit`, refer to it directly
    |
141 -         ast::Extern::Implicit => "C".to_owned(),
141 +         Implicit => "C".to_owned(),
    |

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> src/lib.rs:1:1
  |
1 | #![feature(rustc_private)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/utils.rs:142:31
    |
142 |         ast::Extern::Explicit(abi) => abi.symbol_unescaped.to_string(),
    |                               ^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
142 |         ast::Extern::Explicit(abi, _) => abi.symbol_unescaped.to_string(),
    |                                  +++

error[E0023]: this pattern has 6 fields, but the corresponding tuple variant has 7 fields
   --> src/utils.rs:482:34
    |
482 |         | ast::ExprKind::Closure(_, _, _, _, ref expr, _)
    |                                  ^  ^  ^  ^  ^^^^^^^^  ^ expected 7 fields, found 6
    |
help: use `_` to explicitly ignore each field
    |
482 |         | ast::ExprKind::Closure(_, _, _, _, ref expr, _, _)
    |                                                         +++

error[E0023]: this pattern has 6 fields, but the corresponding tuple variant has 7 fields
   --> src/closures.rs:315:35
    |
315 |     if let ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _) =
    |                                   ^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^  ^ expected 7 fields, found 6
    |
help: use `_` to explicitly ignore each field
    |
315 |     if let ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _, _) =
    |                                                                                              +++

error[E0023]: this pattern has 6 fields, but the corresponding tuple variant has 7 fields
   --> src/expr.rs:206:32
    |
206 |         ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _) => {
    |                                ^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^  ^ expected 7 fields, found 6
    |
help: use `_` to explicitly ignore each field
    |
206 |         ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _, _) => {
    |                                                                                           +++

error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> src/expr.rs:401:20
    |
401 |         .and_then(|expr_str| {
    |                    ^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `str`
help: function arguments must have a statically known size, borrowed types always have a known size
    |
401 |         .and_then(|&expr_str| {
    |                    +

error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> src/items.rs:151:17
    |
151 |                 ast::Extern::from_abi(fm.abi),
    |                 ^^^^^^^^^^^^^^^^^^^^^-------- an argument of type `Span` is missing
    |
note: associated function defined here
help: provide the argument
    |
151 |                 ast::Extern::from_abi(fm.abi, /* Span */),
    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:685:26
    |
685 |         TokenTree::Token(ref t) => t.clone(),
    |                          ^^^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
685 |         TokenTree::Token(ref t, _) => t.clone(),
    |                               +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:740:35
    |
740 |               Some(TokenTree::Token(Token {
    |  ___________________________________^
741 | |                 kind: TokenKind::Ident(name, _),
742 | |                 ..
743 | |             })) => {
    | |_____________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
743 |             }, _)) => {
    |              +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:780:34
    |
780 |                   TokenTree::Token(Token {
    |  __________________________________^
781 | |                     kind: TokenKind::BinOp(BinOpToken::Plus),
782 | |                     ..
783 | |                 })
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
783 |                 }, _)
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:784:36
    |
784 |                   | TokenTree::Token(Token {
    |  ____________________________________^
785 | |                     kind: TokenKind::Question,
786 | |                     ..
787 | |                 })
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
787 |                 }, _)
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:788:36
    |
788 |                   | TokenTree::Token(Token {
    |  ____________________________________^
789 | |                     kind: TokenKind::BinOp(BinOpToken::Star),
790 | |                     ..
791 | |                 }) => {
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
791 |                 }, _) => {
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:794:34
    |
794 |                 TokenTree::Token(ref t) => {
    |                                  ^^^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
794 |                 TokenTree::Token(ref t, _) => {
    |                                       +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:862:34
    |
862 |                   TokenTree::Token(Token {
    |  __________________________________^
863 | |                     kind: TokenKind::Dollar,
864 | |                     span,
865 | |                 }) => {
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
865 |                 }, _) => {
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:878:34
    |
878 |                   TokenTree::Token(Token {
    |  __________________________________^
879 | |                     kind: TokenKind::Colon,
880 | |                     ..
881 | |                 }) if self.is_meta_var => {
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
881 |                 }, _) if self.is_meta_var => {
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:884:34
    |
884 |                 TokenTree::Token(ref t) => self.update_buffer(t),
    |                                  ^^^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
884 |                 TokenTree::Token(ref t, _) => self.update_buffer(t),
    |                                       +++

error[E0308]: mismatched types
    --> src/macros.rs:1126:42
     |
1126 |         let args = TokenStream::new(vec![(tok, Spacing::Joint)]);
     |                                          ^^^^^^^^^^^^^^^^^^^^^ expected enum `TokenTree`, found tuple
     |
     = note: expected enum `TokenTree`
               found tuple `(TokenTree, Spacing)`

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
    --> src/macros.rs:1128:30
     |
1128 |               TokenTree::Token(Token {
     |  ______________________________^
1129 | |                 kind: TokenKind::FatArrow,
1130 | |                 ..
1131 | |             }) => {}
     | |_____________^ expected 2 fields, found 1
     |
help: use `_` to explicitly ignore each field
     |
1131 |             }, _) => {}
     |              +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
    --> src/macros.rs:1150:38
     |
1150 |           if let Some(TokenTree::Token(Token {
     |  ______________________________________^
1151 | |             kind: TokenKind::Semi,
1152 | |             span,
1153 | |         })) = self.toks.look_ahead(0)
     | |_________^ expected 2 fields, found 1
     |
help: use `_` to explicitly ignore each field
     |
1153 |         }, _)) = self.toks.look_ahead(0)
     |          +++

Some errors have detailed explanations: E0023, E0061, E0277, E0308, E0532, E0554.
For more information about an error, try `rustc --explain E0023`.
error: could not compile `rustfmt-nightly` due to 20 previous errors
warning: build failed, waiting for other jobs to finish...
=> ERROR: rustfmt-1.5.1_1: do_build: '${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}' exited with 101
=> ERROR:   in do_build() at common/build-style/cargo.sh:8
```

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

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

From dff29939c4ce6d44326d8e13db04e67f145cbd32 Mon Sep 17 00:00:00 2001
From: astral <astral@astralchan.xyz>
Date: Fri, 24 Mar 2023 15:11:31 -0600
Subject: [PATCH] New package: rustfmt-1.5.1

---
 srcpkgs/rustfmt/template | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 srcpkgs/rustfmt/template

diff --git a/srcpkgs/rustfmt/template b/srcpkgs/rustfmt/template
new file mode 100644
index 000000000000..ccbfb230a537
--- /dev/null
+++ b/srcpkgs/rustfmt/template
@@ -0,0 +1,15 @@
+# Template file for 'rustfmt'
+pkgname=rustfmt
+version=1.5.1
+revision=1
+build_style=cargo
+short_desc="Tool for formatting Rust code according to style guidelines"
+maintainer="astral <astral@astralchan.xyz>"
+license="MIT, Apache-2.0"
+homepage="https://github.com/rust-lang/rustfmt"
+distfiles="https://github.com/rust-lang/rustfmt/archive/refs/tags/v${version}.tar.gz"
+checksum=dc29a1c066fe4816e1400655c676d632335d667c3b0231ce344b2a7b02acc267
+
+post_install() {
+	vlicense LICENSE-MIT
+}

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

* Re: [WIP] New package: rustfmt-1.5.1
  2023-03-24 21:14 [PR PATCH] [WIP] New package: rustfmt-1.5.1 astralchan
  2023-03-24 21:17 ` [PR PATCH] [Updated] " astralchan
@ 2023-03-26  7:45 ` classabbyamp
  2023-03-26 15:25 ` astralchan
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: classabbyamp @ 2023-03-26  7:45 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/42987#issuecomment-1484022225

Comment:
> To install from source **(nightly required)**

(emphasis mine)

I don't think this is packageable. the only other distro that packages it is nix and they use nightly rust. the right way to get this tool is `rustup`, imo

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

* Re: [WIP] New package: rustfmt-1.5.1
  2023-03-24 21:14 [PR PATCH] [WIP] New package: rustfmt-1.5.1 astralchan
  2023-03-24 21:17 ` [PR PATCH] [Updated] " astralchan
  2023-03-26  7:45 ` classabbyamp
@ 2023-03-26 15:25 ` astralchan
  2023-03-26 15:25 ` [PR PATCH] [Closed]: " astralchan
  2023-03-26 15:31 ` classabbyamp
  4 siblings, 0 replies; 6+ messages in thread
From: astralchan @ 2023-03-26 15:25 UTC (permalink / raw)
  To: ml

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

New comment by astralchan on void-packages repository

https://github.com/void-linux/void-packages/pull/42987#issuecomment-1484130716

Comment:
> > To install from source **(nightly required)**
> 
> (emphasis mine)
> 
> I don't think this is packageable. the only other distro that packages it is nix and they use nightly rust. the right way to get this tool is `rustup`, imo

Ah, okay. I'm a little new to rust - I've been using the `rust` and `cargo` packages. Should I use the `rustup` package instead or just run the online script? Thanks for the heads up.

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

* Re: [PR PATCH] [Closed]: [WIP] New package: rustfmt-1.5.1
  2023-03-24 21:14 [PR PATCH] [WIP] New package: rustfmt-1.5.1 astralchan
                   ` (2 preceding siblings ...)
  2023-03-26 15:25 ` astralchan
@ 2023-03-26 15:25 ` astralchan
  2023-03-26 15:31 ` classabbyamp
  4 siblings, 0 replies; 6+ messages in thread
From: astralchan @ 2023-03-26 15:25 UTC (permalink / raw)
  To: ml

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

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

[WIP] New package: rustfmt-1.5.1
https://github.com/void-linux/void-packages/pull/42987

Description:
[ci skip]

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

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

Currently failing:

```
   Compiling cargo_metadata v0.14.2
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `ast::Extern::Implicit`
   --> src/utils.rs:141:9
    |
141 |         ast::Extern::Implicit => "C".to_owned(),
    |         ^^^^^^^^^^^^^^^^^^^^^
    |
help: use the tuple variant pattern syntax instead
    |
141 |         ast::Extern::Implicit(/* fields */) => "C".to_owned(),
    |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: consider importing this unit variant instead
    |
1   | use rustc_session::cstore::CrateDepKind::Implicit;
    |
help: if you import `Implicit`, refer to it directly
    |
141 -         ast::Extern::Implicit => "C".to_owned(),
141 +         Implicit => "C".to_owned(),
    |

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> src/lib.rs:1:1
  |
1 | #![feature(rustc_private)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/utils.rs:142:31
    |
142 |         ast::Extern::Explicit(abi) => abi.symbol_unescaped.to_string(),
    |                               ^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
142 |         ast::Extern::Explicit(abi, _) => abi.symbol_unescaped.to_string(),
    |                                  +++

error[E0023]: this pattern has 6 fields, but the corresponding tuple variant has 7 fields
   --> src/utils.rs:482:34
    |
482 |         | ast::ExprKind::Closure(_, _, _, _, ref expr, _)
    |                                  ^  ^  ^  ^  ^^^^^^^^  ^ expected 7 fields, found 6
    |
help: use `_` to explicitly ignore each field
    |
482 |         | ast::ExprKind::Closure(_, _, _, _, ref expr, _, _)
    |                                                         +++

error[E0023]: this pattern has 6 fields, but the corresponding tuple variant has 7 fields
   --> src/closures.rs:315:35
    |
315 |     if let ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _) =
    |                                   ^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^  ^ expected 7 fields, found 6
    |
help: use `_` to explicitly ignore each field
    |
315 |     if let ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _, _) =
    |                                                                                              +++

error[E0023]: this pattern has 6 fields, but the corresponding tuple variant has 7 fields
   --> src/expr.rs:206:32
    |
206 |         ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _) => {
    |                                ^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^  ^ expected 7 fields, found 6
    |
help: use `_` to explicitly ignore each field
    |
206 |         ast::ExprKind::Closure(capture, ref is_async, movability, ref fn_decl, ref body, _, _) => {
    |                                                                                           +++

error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> src/expr.rs:401:20
    |
401 |         .and_then(|expr_str| {
    |                    ^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `str`
help: function arguments must have a statically known size, borrowed types always have a known size
    |
401 |         .and_then(|&expr_str| {
    |                    +

error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> src/items.rs:151:17
    |
151 |                 ast::Extern::from_abi(fm.abi),
    |                 ^^^^^^^^^^^^^^^^^^^^^-------- an argument of type `Span` is missing
    |
note: associated function defined here
help: provide the argument
    |
151 |                 ast::Extern::from_abi(fm.abi, /* Span */),
    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:685:26
    |
685 |         TokenTree::Token(ref t) => t.clone(),
    |                          ^^^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
685 |         TokenTree::Token(ref t, _) => t.clone(),
    |                               +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:740:35
    |
740 |               Some(TokenTree::Token(Token {
    |  ___________________________________^
741 | |                 kind: TokenKind::Ident(name, _),
742 | |                 ..
743 | |             })) => {
    | |_____________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
743 |             }, _)) => {
    |              +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:780:34
    |
780 |                   TokenTree::Token(Token {
    |  __________________________________^
781 | |                     kind: TokenKind::BinOp(BinOpToken::Plus),
782 | |                     ..
783 | |                 })
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
783 |                 }, _)
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:784:36
    |
784 |                   | TokenTree::Token(Token {
    |  ____________________________________^
785 | |                     kind: TokenKind::Question,
786 | |                     ..
787 | |                 })
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
787 |                 }, _)
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:788:36
    |
788 |                   | TokenTree::Token(Token {
    |  ____________________________________^
789 | |                     kind: TokenKind::BinOp(BinOpToken::Star),
790 | |                     ..
791 | |                 }) => {
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
791 |                 }, _) => {
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:794:34
    |
794 |                 TokenTree::Token(ref t) => {
    |                                  ^^^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
794 |                 TokenTree::Token(ref t, _) => {
    |                                       +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:862:34
    |
862 |                   TokenTree::Token(Token {
    |  __________________________________^
863 | |                     kind: TokenKind::Dollar,
864 | |                     span,
865 | |                 }) => {
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
865 |                 }, _) => {
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:878:34
    |
878 |                   TokenTree::Token(Token {
    |  __________________________________^
879 | |                     kind: TokenKind::Colon,
880 | |                     ..
881 | |                 }) if self.is_meta_var => {
    | |_________________^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
881 |                 }, _) if self.is_meta_var => {
    |                  +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
   --> src/macros.rs:884:34
    |
884 |                 TokenTree::Token(ref t) => self.update_buffer(t),
    |                                  ^^^^^ expected 2 fields, found 1
    |
help: use `_` to explicitly ignore each field
    |
884 |                 TokenTree::Token(ref t, _) => self.update_buffer(t),
    |                                       +++

error[E0308]: mismatched types
    --> src/macros.rs:1126:42
     |
1126 |         let args = TokenStream::new(vec![(tok, Spacing::Joint)]);
     |                                          ^^^^^^^^^^^^^^^^^^^^^ expected enum `TokenTree`, found tuple
     |
     = note: expected enum `TokenTree`
               found tuple `(TokenTree, Spacing)`

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
    --> src/macros.rs:1128:30
     |
1128 |               TokenTree::Token(Token {
     |  ______________________________^
1129 | |                 kind: TokenKind::FatArrow,
1130 | |                 ..
1131 | |             }) => {}
     | |_____________^ expected 2 fields, found 1
     |
help: use `_` to explicitly ignore each field
     |
1131 |             }, _) => {}
     |              +++

error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
    --> src/macros.rs:1150:38
     |
1150 |           if let Some(TokenTree::Token(Token {
     |  ______________________________________^
1151 | |             kind: TokenKind::Semi,
1152 | |             span,
1153 | |         })) = self.toks.look_ahead(0)
     | |_________^ expected 2 fields, found 1
     |
help: use `_` to explicitly ignore each field
     |
1153 |         }, _)) = self.toks.look_ahead(0)
     |          +++

Some errors have detailed explanations: E0023, E0061, E0277, E0308, E0532, E0554.
For more information about an error, try `rustc --explain E0023`.
error: could not compile `rustfmt-nightly` due to 20 previous errors
warning: build failed, waiting for other jobs to finish...
=> ERROR: rustfmt-1.5.1_1: do_build: '${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}' exited with 101
=> ERROR:   in do_build() at common/build-style/cargo.sh:8
```

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

* Re: [WIP] New package: rustfmt-1.5.1
  2023-03-24 21:14 [PR PATCH] [WIP] New package: rustfmt-1.5.1 astralchan
                   ` (3 preceding siblings ...)
  2023-03-26 15:25 ` [PR PATCH] [Closed]: " astralchan
@ 2023-03-26 15:31 ` classabbyamp
  4 siblings, 0 replies; 6+ messages in thread
From: classabbyamp @ 2023-03-26 15:31 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/42987#issuecomment-1484132469

Comment:
imo, the proper way to use rust for development on void on most archs is to install the rustup package and use that to manage toolchain versions

this won't work for all archs because rustup doesn't have binaries for all the targets void supports but for most people it works 

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

end of thread, other threads:[~2023-03-26 15:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 21:14 [PR PATCH] [WIP] New package: rustfmt-1.5.1 astralchan
2023-03-24 21:17 ` [PR PATCH] [Updated] " astralchan
2023-03-26  7:45 ` classabbyamp
2023-03-26 15:25 ` astralchan
2023-03-26 15:25 ` [PR PATCH] [Closed]: " astralchan
2023-03-26 15:31 ` classabbyamp

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