[MacPorts] #68364: rust: Update to 1.74.1

MacPorts noreply at macports.org
Sat Dec 30 16:13:05 UTC 2023


#68364: rust: Update to 1.74.1
--------------------------+---------------------------------
  Reporter:  Schamschula  |      Owner:  MarcusCalhoun-Lopez
      Type:  update       |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:  2.8.1
Resolution:               |   Keywords:
      Port:  rust         |
--------------------------+---------------------------------

Comment (by halostatue):

 Those are probably worth adding to the portfiles.

 That said, I think that we *may* want to push this as a couple of
 different releases because there is a hard drop from the Rust side of pre
 10.12 in 1.74.0, and if we can get some level of support for older
 versions (as old as 10.8). I’ve been reading and adding comments to the
 rust PG file to try to make this process easier for others in the future.
 One point in particular that I’m adding is this:

 {{{
 #!tcl
 # default macosx_deployment_target value of Rust function
 macos_default_deployment_target
 # see [1] at 1.74.1 or earlier or [2] at 1.75.0 or later.
 #
 # [1] https://github.com/rust-
 lang/rust/blob/master/compiler/rustc_target/src/spec/apple_base.rs
 # [2] https://github.com/rust-
 lang/rust/blob/master/compiler/rustc_target/src/spec/base/apple/mod.rs
 #
 # The Rust default for aarch64 (Apple Silicon) is 11.0 (`(11, 0)`) siunce
 1.59.0,
 # and the default for x86_64 depends on the Rust version. Before 1.71.0,
 the
 # minimum version is 10.7 (`(10, 7)`). From 1.71.0 to 1.73.0, the support
 is
 # 10.8 (`(10, 8)`) for Haswell boards (x86_64h) and 10.7 for everything
 else.
 # Starting with 1.74.0, the minimum supported version is 10.12 (`(10,
 12)`).
 #
 # x86_64-apple-darwin is considered tier 1; aarch64-appled-darwin is
 considered
 # tier 2 with host tools (and seems likely to end up as a tier 1 in the
 future
 # when there is CI support).
 #
 # See https://doc.rust-lang.org/nightly/rustc/platform-support.html
 default     rust.upstream_deployment_target {[expr {${os.arch} eq "arm" ?
 11.0 : 10.7}]}
 }}}

 So if we can get things together for a 1.73.0 rust installation, then I
 think we can keep the support level we have for those, although we may
 need help from people with access to older hardware to build the bootstrap
 / transition compilers the way that Marcus Calhoun-Lopez did, and that
 will allow us to pin everything below 10.12 to 1.73.0 (not great, but
 unless there are people in the MacPorts community who are as committed to
 keeping Rust for those versions alive as there are for Ruby, I don't see
 much of an option here; I am *not* a compiler or rust language expert, so
 I am mostly useless on this part).

 I think that a couple of things should happen, if possible, but will
 require assistance from the MacPorts organization maintainers on GitHub:

 - We should fork https://github.com/MarcusCalhoun-Lopez/rust into the
 macports organization. We should *also* upload all of the releases from
 that into corresponding releases on the forked repo. Marcus did a release
 of 1.71.1 in August, so I think it would be *correct* to make sure he is
 still also a contributor on the forked version.
 - We should add some documentation (to the wiki and/or the port files) on
 how and what order to submit these in (rust-bootstrap, then rust). Ideally
 this would include when to use `rust-bootstrap-transition`, but I haven't
 been able to figure that part out, and it may have literally been
 something required to *transition* into the new build system which could
 now be deleted since there are bootstraps available for a lot of previous
 versions. (To make this work correctly, we might need to do bootstrap
 builds for 1.72.)
 - We should add a bit more documentation to the rust portfile.
 - We should make `version_m1` and `version_m2` *computed* at all times:


 {{{
 #!tcl
 proc rust.previous_version {version} {
     set list {}
     foreach element [split $version .] {
         if {[scan $element %d%s i trash] != 1} {
             return -code error "invalid version number: \"$version\""
         }

         if {[catch {incr i 0}]} {
             return -code error "invalid version number: \"$version\""
         }

         lappend list $i
     }

     if {[llength $list] > 3} {
         return -code error "invalid version number: \"$version\""
     }

     set list [lreplace $list 2 2 0]
     set list [lreplace $list 1 1 [expr [lindex $list 1] - 1]]

     return [join $list .]
 }

     set version_current         1.71.1
     set version_m1              [rust.previous_version $version_current]
     set version_m2              [rust.previous_version $version_m1]
 }}}

 That might not be the best way to do this, but it would prevent some
 confusion.

-- 
Ticket URL: <https://trac.macports.org/ticket/68364#comment:24>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list