-
Notifications
You must be signed in to change notification settings - Fork 222
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
fix: support old Rust versions #1561
Conversation
I was quite excited when I discovered this syntactic sugar, because it simplified quite a few code blocks. But it's not a big burden to merge this, especially knowing that once CRAN builders & Debian support So if this is the only obstacle which blocks releasing to CRAN, we can merge and lower MSRV. Btw, do you know which rust version are they using? |
Thanks for the reply! Sorry, I am not sure of the exact Rust version. Probably 1.63 on Debian (testing)? However, when I submitted prqlr a month ago (PRQL/prqlc-r#26) and was rejected1, they were able to build prql-compiler v0.3.1 without any problems. Footnotes
|
This reverts commit 996a783.
If they are using 1.61 (May 2022) and |
For now, I pushed 996a783 to be able to install from GitHub. This should at least make the R-universe build work....... |
Ah, we are also using workspace inheritance quite a lot. @max-sixty are we willing to sacrifice it for support of 1.61.0? |
Thanks to changes on this branch, the builds for R-universe (Rust 1.61 on https://eitsupi.r-universe.dev/ui#package:prqlr The build for Windows failed, but this is the same as for prql-compiler 0.3.1 and has nothing to do with this issue (still unknown cause......). Except that I'm not happy that the source code uses my fork's URL instead of this repository (the old Cargo seems to have no choice but to use my fork's URL to refer to commits on this PR......), so I figure maybe I can submit this to CRAN. |
I'm happy to extend our supported versions beyond n-1 going forward (defined here) — the new features are often nice, but not revolutionary... Rolling back the workspace versioning would be quite a dreary task, so if we can avoid it, that would be very preferable. But if we really have to, 🫡 ! (and it's not difficult per se, would just be dreary work). Do we need to roll back to get this working or are we OK? FWIW I've seen some vigorous debate in the rust about this; I can find the threads if anyone is interested (I remember One issue to consider is that we are at the mercy of dependencies, and it's not considered a breaking change to increasing the min version. And we have no tests that we build at anything but the version in our |
(and thank you very much @eitsupi for both uploading to CRAN and this PR) |
Our dependencies support is such:
Fortunately, os_str_bytes, serde_yaml, clap_lex, clap & clap_derive are not dependencies of prql-compiler (but only the cli), so 1.56.0 is the minimum we could support. As I said, I do think we could live a 6 months old Rust, if this means we can support CRAN. |
Added to CI: #1566 |
So it sounds like there's some initial consensus on running at whatever CRAN allows. (And I'm guessing "upgrade rust" is not allowed in the build steps!) Is there consensus on pausing upgrades and letting us catch up, rather than downgrading now? @eitsupi are there any references we can link to for their policy? |
Yeah, pause is ok too. In this case this PR can remain until CRAN catches up to 1.65.0. |
I really appreciate you considering this.
If I understand correctly, this is not a problem when installing packages from crates.io, right? If so, and if it is possible to install from crates.io, then installing from GitHub should not be a problem even if it does not work.
CRAN build machines can be found here. Linux machines are Fedora and Debian. Fedora seems to be quickly getting Rust releases in, while Debian testing seems to be about 3 or 4 months behind. So perhaps a 4 month old version of Rust (3 releases ago?) would seem to be able to successfully build on the CRAN builder. When I look into Ubuntu LTS, used on the R-universe, it appears to be lagging behind by up to 8 months, since it is only updated about once every 4 months and the release frequency is also about once every 4 months. |
Great, let's do that. So we'll be on 1.65 until 1.69 comes out, and which point we'll upgrade to 1.66
I think that's right. If so, we can release to CRAN by either a) merging this to roll back the Does that make sense to everyone? |
I submitted prqlr that installs 2513cfe (https://github.com/eitsupi/prqlr/blob/a76602e9809f9ffb6a04de87e359818e7680291c/src/rust/Cargo.toml#L14-L15) to CRAN this morning, and it appears to have been accepted! The interval between submissions to CRAN should be no less than one month, so the next submission could coincide almost with the time when the Debian Rust version reaches 1.65. |
Super @eitsupi ! Thanks for pushing that through. Let me know if there's anything I can do. You're welcome to leave the PR open or close it and then reopen if needed. |
Can I keep this open until prqlr can switch to installing prql-compiler from crates.io? |
…nd 1.64" This reverts commit 7b36611.
Contrary to expectations, the Rust version of Debian testing is still 1.63! |
We'll freeze on 1.65 until it catches up! Even if it takes longer than we expected... |
Thanks! |
prql 0.2.0 installs c9a1233 is now on CRAN. |
prqlr 0.3.0, based on cf4603d, is now on CRAN. |
Hmmm......Due to the stuck Rust version of Debian, the time has come to update to 1.66 before it can be built on Debian default Rust....... (#2478) It seems I still need to continue to maintain this branch to build prqlr....... |
As long as Debian is slightly behind, happy to wait — we can push the requirement to latest+4! If Debian is locked on 1.5x for a long time, then I guess we need to move on, but surely that's not the case? |
Thanks!
Looking at https://tracker.debian.org/pkg/rustc, Debian testing's Rust version was bumped to 1.63 at 2022-12-13. Debian experimental, which is upstream of testing (experimental -> unstable -> testing -> stable), is currently at 1.65 and work appears to be underway to update it to 1.66. I am not sure why no updates have come down from experimental to testing for such a long period. |
…rsion" This reverts commit cf4603d.
c9480ca
to
a384174
Compare
prqlr 0.4.0 which installs from prql-compiler 0.8.1 from a384174 was released on CRAN. |
`rust-analyzer` is now raising mistaken errors for 1.65, as they only support the latest version rust-lang/rust-analyzer#12751 (comment) We don't want to bump the required version because of PRQL#1561, but I think this approach: - Lets us work on an updated version - Tests `prql-compiler` & `prqlc` to ensure they don't fail to support 1.65 - Doesn't let us use any new features in `prql-compiler` or `prqlc` until we bump the required version, but that's completely fine (is there even _anything_ we'd use?)
It appears that Debian's Rust upgrade process is underway. |
@eitsupi should we close this now? |
I was thinking of waiting until prqlr 0.5.0 is released, but since I don't think it will probably be rejected because of the Rust version, I don't see a problem with closing this now. |
While preparing to submit prqlr to CRAN, I noticed that prql-compiler 0.4.0 could not be built on older Rust versions.
The CRAN builders and the R-universe builders that emulate them do not yet support
let-else
on Linux because they use the distribution standard Rust.Fortunately, there seemed to be quite a few things that needed to be changed, so I made the changes and am testing to see if the build succeeds by referencing this branch.
I do not want this branch merged because I think the developer experience will be degraded if
let-else
is not available.I simply wanted to have the changes I made recorded in the form of a Pull Request.
(By the way, obviously my commit message is confusing, sorry.)