* Specifying rust version [not found] <9HPT231QhmBHf-sXMAX0HcaUXokVCH-pKqntxd3QLQ4aH53EYk4soFhngqkdfsasYo-0g7JFk8zZhMInQgGwQBRsd19OWvc1y1PadBYTjlg=@protonmail.com> @ 2022-12-26 9:00 ` phodina via 2022-12-27 6:53 ` Efraim Flashner 0 siblings, 1 reply; 5+ messages in thread From: phodina via @ 2022-12-26 9:00 UTC (permalink / raw) To: help-guix; +Cc: Maxim Cournoyer, Efraim Flashner Hi, the documentation for 'cargo-build-system' [1] refers to parameter '#:rust' which allows user to specify the Rust compiler version. However, I've found this commit 9635119a61a9ab1b023558727fcdf1816fdc7fc6 from Maxim which makes all 'rust-.*' definitions private. Is there a way to specify newer Rust compiler? Something like 'rust-next'? The package requires version 1.62 but the current is 1.60. Also both version are already defined. What's missing is just way to select them. [1] https://guix.gnu.org/manual/en/html_node/Build-Systems.html EDIT: Add help-guix@gnu.org to list of recipients. ---- Petr ------- Forwarded Message ------- From: phodina <phodina@protonmail.com> Date: On Monday, December 26th, 2022 at 9:39 AM Subject: Specifying rust version To: Maxim Cournoyer <maxim.cournoyer@gmail.com>, Efraim Flashner <efraim@flashner.co.il> > Hi, > > the documentation for 'cargo-build-system' [1] refers to parameter '#:rust' which allows user to specify the Rust compiler version. > > However, I've found this commit 9635119a61a9ab1b023558727fcdf1816fdc7fc6 from Maxim which makes all 'rust-.*' definitions private. > > Is there a way to specify newer Rust compiler? Something like 'rust-next'? > > The package requires version 1.62 but the current is 1.60. Also both version are already defined. What's missing is just way to select them. > > [1] https://guix.gnu.org/manual/en/html_node/Build-Systems.html > > ---- > Petr ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Specifying rust version 2022-12-26 9:00 ` Specifying rust version phodina via @ 2022-12-27 6:53 ` Efraim Flashner 2022-12-27 14:40 ` Maxim Cournoyer 0 siblings, 1 reply; 5+ messages in thread From: Efraim Flashner @ 2022-12-27 6:53 UTC (permalink / raw) To: phodina; +Cc: help-guix, Maxim Cournoyer [-- Attachment #1: Type: text/plain, Size: 1498 bytes --] On Mon, Dec 26, 2022 at 09:00:40AM +0000, phodina wrote: > Hi, > > the documentation for 'cargo-build-system' [1] refers to parameter > '#:rust' which allows user to specify the Rust compiler version. > However, I've found this commit > 9635119a61a9ab1b023558727fcdf1816fdc7fc6 from Maxim which makes all > 'rust-.*' definitions private. Is there a way to specify newer Rust > compiler? Something like 'rust-next'? The package requires version > 1.62 but the current is 1.60. Also both version are already defined. > What's missing is just way to select them. > > [1] https://guix.gnu.org/manual/en/html_node/Build-Systems.html > I checked gnu/packages/rust.scm and it looks like the rust packages aren't hidden but actually not exported. If they were just hidden then you could still do `#:rust ,rust-1.62`. Since they're actually not exported you need to use the not-really-supported `@@` to refer to that variable, so you'd have to use something like: #:rust ,(@@ (gnu packages rust) rust-1.62) Given how it would be useful to have access to newer rust versions I think it'd be worthwhile to make a post in guix-devel about making the newer versions of rust use define-public but be hidden, so they can be used as expected for the #:rust keyword. -- Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Specifying rust version 2022-12-27 6:53 ` Efraim Flashner @ 2022-12-27 14:40 ` Maxim Cournoyer 2022-12-27 16:00 ` phodina 0 siblings, 1 reply; 5+ messages in thread From: Maxim Cournoyer @ 2022-12-27 14:40 UTC (permalink / raw) To: phodina; +Cc: help-guix Hello, Efraim Flashner <efraim@flashner.co.il> writes: > On Mon, Dec 26, 2022 at 09:00:40AM +0000, phodina wrote: >> Hi, >> >> the documentation for 'cargo-build-system' [1] refers to parameter >> '#:rust' which allows user to specify the Rust compiler version. >> However, I've found this commit >> 9635119a61a9ab1b023558727fcdf1816fdc7fc6 from Maxim which makes all >> 'rust-.*' definitions private. Is there a way to specify newer Rust >> compiler? Something like 'rust-next'? The package requires version >> 1.62 but the current is 1.60. Also both version are already defined. >> What's missing is just way to select them. >> >> [1] https://guix.gnu.org/manual/en/html_node/Build-Systems.html >> > > I checked gnu/packages/rust.scm and it looks like the rust packages > aren't hidden but actually not exported. If they were just hidden then > you could still do `#:rust ,rust-1.62`. Since they're actually not > exported you need to use the not-really-supported `@@` to refer to that > variable, so you'd have to use something like: > #:rust ,(@@ (gnu packages rust) rust-1.62) Normally only the newest released Rust version is supported by upstream, so what we should do is add a newer rust and use it by default. The reasons previous rust versions are not exported is because they aren't intended to be used by applications; they are built using '--stage=1' to speed up compilation, which creates slower binaries and may expose ABI stability problems (*if I remember the rust people's explanation correctly). When adding new version of rust, we move all the tests and final rust version specifics to the leaf (last) rust version, and keep the intermediary rusts minimal (no test, no tools, stage=1, etc.) > Given how it would be useful to have access to newer rust versions I > think it'd be worthwhile to make a post in guix-devel about making the > newer versions of rust use define-public but be hidden, so they can be > used as expected for the #:rust keyword. It's typical that build system or services expose a way for the user to use a variant of a package, but in the case of rust, I don't think it should be advertised as a way to use different rust versions (given only the last version is supported by upstream, e.g. sometimes fixing CVEs). -- Thanks, Maxim ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Specifying rust version 2022-12-27 14:40 ` Maxim Cournoyer @ 2022-12-27 16:00 ` phodina 2022-12-27 17:34 ` Maxim Cournoyer 0 siblings, 1 reply; 5+ messages in thread From: phodina @ 2022-12-27 16:00 UTC (permalink / raw) To: help-guix; +Cc: Maxim Cournoyer, Efraim Flashner Hi, >> the documentation for 'cargo-build-system' [1] refers to parameter >> '#:rust' which allows user to specify the Rust compiler version. >> However, I've found this commit >> 9635119a61a9ab1b023558727fcdf1816fdc7fc6 from Maxim which makes all >> 'rust-.*' definitions private. Is there a way to specify newer Rust >> compiler? Something like 'rust-next'? The package requires version >> 1.62 but the current is 1.60. Also both version are already defined. >> What's missing is just way to select them. >> >> [1] https://guix.gnu.org/manual/en/html_node/Build-Systems.html >> > > I checked gnu/packages/rust.scm and it looks like the rust packages > aren't hidden but actually not exported. If they were just hidden then > you could still do `#:rust ,rust-1.62`. Since they're actually not > exported you need to use the not-really-supported `@@` to refer to that > variable, so you'd have to use something like: > #:rust ,(@@ (gnu packages rust) rust-1.62) Thanks Efraim, this is exactly what I've been looking for atm as temporary hack. > Given how it would be useful to have access to newer rust versions I > think it'd be worthwhile to make a post in guix-devel about making the > newer versions of rust use define-public but be hidden, so they can be > used as expected for the #:rust keyword. It would be definitely great to have access to the latest packaged version of rust. However, I understand this will trigger a lot of rebuilds. > > > > > > the documentation for 'cargo-build-system' [1] refers to parameter > > > '#:rust' which allows user to specify the Rust compiler version. > > > However, I've found this commit > > > 9635119a61a9ab1b023558727fcdf1816fdc7fc6 from Maxim which makes all > > > 'rust-.*' definitions private. Is there a way to specify newer Rust > > > compiler? Something like 'rust-next'? The package requires version > > > 1.62 but the current is 1.60. Also both version are already defined. > > > What's missing is just way to select them. > > > > > > [1] https://guix.gnu.org/manual/en/html_node/Build-Systems.html > > > > I checked gnu/packages/rust.scm and it looks like the rust packages > > aren't hidden but actually not exported. If they were just hidden then > > you could still do `#:rust ,rust-1.62`. Since they're actually not > > exported you need to use the not-really-supported `@@` to refer to that > > variable, so you'd have to use something like: > > #:rust ,(@@ (gnu packages rust) rust-1.62) > > > Normally only the newest released Rust version is supported by upstream, > so what we should do is add a newer rust and use it by default. > > The reasons previous rust versions are not exported is because they > aren't intended to be used by applications; they are built using > '--stage=1' to speed up compilation, which creates slower binaries and > may expose ABI stability problems (*if I remember the rust people's > explanation correctly). > > When adding new version of rust, we move all the tests and final rust > version specifics to the leaf (last) rust version, and keep the > intermediary rusts minimal (no test, no tools, stage=1, etc.) > > > Given how it would be useful to have access to newer rust versions I > > think it'd be worthwhile to make a post in guix-devel about making the > > newer versions of rust use define-public but be hidden, so they can be > > used as expected for the #:rust keyword. > > > It's typical that build system or services expose a way for the user to > use a variant of a package, but in the case of rust, I don't think it > should be advertised as a way to use different rust versions (given only > the last version is supported by upstream, e.g. sometimes fixing CVEs). I have to agree with you that this is just an anti-pattern and the #:rust should not be advertised. The best approach would be to add new rust version and switch to it. So do you think Maxim the `#:rust` parameter should be dropped and the documentation also removed? I guess same approach would apply for antioxidant-build-system, right? [1] 1 https://notabug.org/maximed/cargoless-rust-experiments ---- Petr ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Specifying rust version 2022-12-27 16:00 ` phodina @ 2022-12-27 17:34 ` Maxim Cournoyer 0 siblings, 0 replies; 5+ messages in thread From: Maxim Cournoyer @ 2022-12-27 17:34 UTC (permalink / raw) To: phodina; +Cc: help-guix, Efraim Flashner Hi, phodina <phodina@protonmail.com> writes: [...] >> It's typical that build system or services expose a way for the user to >> use a variant of a package, but in the case of rust, I don't think it >> should be advertised as a way to use different rust versions (given only >> the last version is supported by upstream, e.g. sometimes fixing CVEs). > > I have to agree with you that this is just an anti-pattern and the #:rust > should not be advertised. > > The best approach would be to add new rust version and switch to it. > > So do you think Maxim the `#:rust` parameter should be dropped and the > documentation also removed? I don't think it needs to be dropped, as it can be useful for experimentation. Sometimes, newer rust may be needed and the work to update the entire collection (with the risks it entails or the build time) deferred, in which case it could be used. It's preferable though to do the work to package the latest and greatest rust and rebuild the whole collection with it, on a branch though. I hope that helps, -- Thanks, Maxim ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-12-27 17:34 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <9HPT231QhmBHf-sXMAX0HcaUXokVCH-pKqntxd3QLQ4aH53EYk4soFhngqkdfsasYo-0g7JFk8zZhMInQgGwQBRsd19OWvc1y1PadBYTjlg=@protonmail.com> 2022-12-26 9:00 ` Specifying rust version phodina via 2022-12-27 6:53 ` Efraim Flashner 2022-12-27 14:40 ` Maxim Cournoyer 2022-12-27 16:00 ` phodina 2022-12-27 17:34 ` Maxim Cournoyer
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.