facebook / sapling

A Scalable, User-Friendly Source Control System.
https://sapling-scm.com
GNU General Public License v2.0
6.13k stars 280 forks source link

repolock fails to build on RHEL 9 #275

Open davide125 opened 1 year ago

davide125 commented 1 year ago

On RHEL 9 (which uses rust 1.62.1) I have this build failure:

   Compiling repolock v0.1.0 (/builddir/build/BUILD/sapling-0.1.20221118-210929-cfbb68aa/eden/scm/lib/repolock)
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
  --> lib/repolock/src/lib.rs:73:27
   |
73 |                 .get_or::<f64>("devel", "lock_backoff", || 1.0)?
   |                           ^^^ explicit generic argument not allowed
   |
   = note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information

error[E0658]: use of unstable library feature 'nonzero_ops'
   --> lib/repolock/src/lib.rs:147:41
    |
147 |             store_lock.1 = store_lock.1.checked_add(1).unwrap();
    |                                         ^^^^^^^^^^^
    |
    = note: see issue #84186 <https://github.com/rust-lang/rust/issues/84186> for more information

error[E0658]: use of unstable library feature 'nonzero_ops'
   --> lib/repolock/src/lib.rs:167:35
    |
167 |             wc_lock.1 = wc_lock.1.checked_add(1).unwrap();
    |                                   ^^^^^^^^^^^
    |
    = note: see issue #84186 <https://github.com/rust-lang/rust/issues/84186> for more information

Some errors have detailed explanations: E0632, E0658.
For more information about an error, try `rustc --explain E0632`.
error: could not compile `repolock` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: compilation of Rust target 'hgmain' failed
make: *** [Makefile:75: oss] Error 1
sggutier commented 1 year ago

Could you try a more recent version of Rust? 1.64 or later seems to work

akushner commented 1 year ago

Hey @davide125, nice to see you trying Sapling. Feel free to use the internal Sapling workchat group if you have questions.

Are you doing testing on your own or upstream, or is the RHEL9 work related?

davide125 commented 1 year ago

Could you try a more recent version of Rust? 1.64 or later seems to work

This isn't an option for RHEL 9 at the moment, as the distribution ships with 1.62 as of RHEL 9.1. CentOS Stream 9 does carry 1.64, so so once RHEL 9.2 comes out (which will happen sometime next year) it'll likely be buildable there too. In practice, this means we can target EPEL-next for now (which will make this available for CentOS Stream), and switch to EPEL proper once 9.2 is out next year (which will make it available for RHEL proper too).

Hey @davide125, nice to see you trying Sapling. Feel free to use the internal Sapling workchat group if you have questions.

Will do! I've been filing public issues so far as I want something to reference in the spec file while it's being worked on.

Are you doing testing on your own or upstream, or is the RHEL9 work related?

Both. Linux Userspace is interested in potentially leveraging this internally to simplify some of our workflows. I'm personally interested in trying sapling out as a git alternative for OSS work (both work related and not). Some of our community partners within Fedora and CentOS are also interested in it, for similar reasons. To this end, I've started working on packaging for Fedora and EPEL in https://copr.fedorainfracloud.org/coprs/dcavalca/sapling/ but at the moment #143 is a blocker to inclusion in distros in any official capacity.

akushner commented 1 year ago

Thanks for all the details, @davide125!

Do you know the primary reasons why the Fedora and CentOS partners are interested in Sapling? I ask in case there are things we can do to better support their use cases. I'm sure @bolinfest would be interested in knowing more about these partners.

Also, I'll check with my team regarding #143.