r-lib / rig

The R Installation Manager
MIT License
663 stars 22 forks source link

R 4.4 retains `devel` alias, even though it has also gained the `release` alias #232

Closed jennybc closed 6 months ago

jennybc commented 6 months ago

The starting state is right before I installed 4.4 for the first time since it became officially released. I already had some R 4.4 installation lying around, from when it was devel. Everything has been installed via rig.

~/.local/share/rstudio % rig list
* name       version    aliases
------------------------------------------
  4.1-arm64  (R 4.1.3)  
* 4.3-arm64  (R 4.3.3)  release
  4.4-arm64  (R 4.4.0)  devel

~/.local/share/rstudio % rig add release
[INFO] Running `sudo` for adding new R versions. This might need your password.
Password:
[INFO] Downloading https://cran.rstudio.com/bin/macosx/big-sur-arm64/base/R-4.4.0-arm64.pkg -> /tmp/rig/arm64-R-4.4.0-arm64.pkg
[INFO] Running installer
[INFO] > installer: Package name is R 4.4.0 for macOS (ARM64)
[INFO] > installer: Installing at base path /
[INFO] > installer: The install was successful.
[INFO] Forgetting installed versions
[INFO] Fixing permissions
[INFO] Updating R-* quick links (as needed)
[INFO] Adding R-release alias to R 4.4-arm64
[INFO] Setting default CRAN mirror
[INFO] Installing pak for R 4.4-arm64 (if not installed yet)

~/.local/share/rstudio % rig list
* name       version    aliases
------------------------------------------
  4.1-arm64  (R 4.1.3)  
* 4.3-arm64  (R 4.3.3)  
  4.4-arm64  (R 4.4.0)  devel, release

It seems odd that 4.4 still has the devel alias.

jennybc commented 6 months ago

And just for good measure, I then did:

~/.local/share/rstudio % rig available
name   version  release date  type
------------------------------------------
4.1.3  4.1.3    2022-03-10    release
4.2.3  4.2.3    2023-03-15    release
4.3.3  4.3.3    2024-02-29    release
4.4.0  4.4.0    2024-04-24    release
next   4.4.0                  patched
devel  4.5.0                  devel

So rig seems aware of the fact that devel is now 4.5.0. Or at least rig available fetches that info.

jennybc commented 6 months ago

The way I rationalized things was to remove the (alleged) devel installation, which removed the Installation Previously Known as Devel (and Release). Then re-installed release.


~/.local/share/rstudio % rig rm devel
[INFO] Running `sudo` for removing R versions. This might need your password.
Password:
[INFO] Removing /Library/Frameworks/R.framework/Versions/4.4-arm64
[INFO] Updating R-* quick links (as needed)

~/.local/share/rstudio % rig list
* name       version    aliases
------------------------------------------
  4.1-arm64  (R 4.1.3)  
* 4.3-arm64  (R 4.3.3)  
* 
~/.local/share/rstudio % rig add release
[INFO] Running `sudo` for adding new R versions. This might need your password.
[INFO] arm64-R-4.4.0-arm64.pkg is cached at /tmp/rig/arm64-R-4.4.0-arm64.pkg
[INFO] Running installer
[INFO] > installer: Package name is R 4.4.0 for macOS (ARM64)
[INFO] > installer: Installing at base path /
[INFO] > installer: The install was successful.
[INFO] Forgetting installed versions
[INFO] Fixing permissions
[INFO] Updating R-* quick links (as needed)
[INFO] Adding R-release alias to R 4.4-arm64
[INFO] Setting default CRAN mirror
[INFO] Installing pak for R 4.4-arm64 (if not installed yet)

~/.local/share/rstudio % rig list
* name       version    aliases
------------------------------------------
  4.1-arm64  (R 4.1.3)  
* 4.3-arm64  (R 4.3.3)  
  4.4-arm64  (R 4.4.0)  release
gaborcsardi commented 6 months ago

THat's as designed. :) Aliases are only set when the corresponding R version is installed. This is to ensure that if you have some tooling that relies on R-devel, that alias will not go away, just because there was an R release in the meanwhile.

If you do rig add devel, devel is moved to the new (real) R-devel.