Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust version of Linux builder seems older than CRAN builders #227

Closed
eitsupi opened this issue Jan 22, 2023 · 5 comments
Closed

Rust version of Linux builder seems older than CRAN builders #227

eitsupi opened this issue Jan 22, 2023 · 5 comments

Comments

@eitsupi
Copy link

eitsupi commented Jan 22, 2023

In the process of submitting prqlr to CRAN, I ran into the 'Minimum Supported Rust Version' issue (PRQL/prqlc-r#37, PRQL/prql#1561).

The Linux builders in CRAN and R-universe all seem to use the distribution standard Rust, with the difference that the minimum Rust version in CRAN is Debian testing, while in R-universe it is Ubuntu LTS.
https://github.com/r-universe-org/base-image/blob/1b7e197353497469aaaf77e51ce3339ff83fd73d/Dockerfile#L15

Checking the Debian testing history, it appears that they are using a version that is approximately 4 months behind the Rust release.1
Ubuntu LTS appears to be later than that.2

This would indicate that packages that can be released in CRAN may not be released in R-universe.
So, is it possible to change the installation method of cargo to follow Debian testing?
Of course, it is not necessary that they match exactly, but it seems that the versions may be about 3 apart and this seems like a big difference.

Footnotes

  1. https://tracker.debian.org/pkg/rustc

  2. https://packages.ubuntu.com/jammy/rustc

jeroen added a commit to r-universe-org/base-image that referenced this issue Jan 22, 2023
@jeroen
Copy link
Member

jeroen commented Jan 22, 2023

I will try to add a more recent rust to the ubuntu image. But I would still recommend trying to make your code portable: https://github.com/r-rust/faq#which-cargo--rustc-version-to-target

jeroen added a commit to r-universe-org/base-image that referenced this issue Jan 22, 2023
@jeroen
Copy link
Member

jeroen commented Jan 22, 2023

The build image should now have the latest version from ubuntu-mozilla-security/rust-next. Can you test if this solves your issues?

@jeroen jeroen closed this as completed Jan 22, 2023
@eitsupi
Copy link
Author

eitsupi commented Jan 22, 2023

Thank you for your quick support.
As you point out, this is definitely a headache for Linux users who do source installations.
Maybe this problem also occurs in RSPM...

prqlr is currently able to build with Rust 1.61, so I am not experiencing any problems, but at the tradeoff of installing the Rust package from GitHub (my fork) instead of from crates.io.
I feel that it is a difficult question as to which should be prioritized, support for old Rust or official installation from crates.io...

@jeroen
Copy link
Member

jeroen commented Jan 22, 2023

In the gifski package I faced a similar problem, and I created it such that it checks the version of rust and uses an older cargo.toml on older versions of rust: https://github.com/r-rust/gifski/blob/master/configure#L12-L20

@eitsupi
Copy link
Author

eitsupi commented Jan 22, 2023

In the gifski package I faced a similar problem, and I created it such that it checks the version of rust and uses an older cargo.toml on older versions of rust: r-rust/gifski@master/configure

Thanks again, that seems super useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants