-
Notifications
You must be signed in to change notification settings - Fork 64
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
Switch from Rust nightly to Rust stable #1218
Conversation
This retains functionality that for now is only available via Rust Nightly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Do you have an idea why the rust tests fail though? We have a lot of errors like this: "/home/runner/work/lingua-franca/lingua-franca/test/Rust/src-gen/ReactionLabels/target/debug/reaction_labels: The source file doesn't exist." in the log.
I have no clue why this is failing. Looking at how the code generation is reported, it should be building the binaries at exactly the place where it reports no file exists. |
Another possibility that I have eliminated: I thought it might be that this is because CI jobs are run with Rust Nightly exclusively, but with Nightly as default it still works on my machine. |
On my end also everything works fine with both the stable and nightly toolchains. I am not sure what is happening here and its a pain to debug these CI jobs. I guess our best shot is to add a few |
d9bd230
to
219adbc
Compare
Looking at the Windows tests failing, I hadn't considered that on Windows compilation produces .EXE files. |
Ah, ok so that was the issue with Windows. OK :) So I found that somehow the checked in Cargo.toml in src-gen broke the compilation setup. I don't fully understand why, but removing it fixes the problem. I could actually reproduce the original problem locally when the Cargo.toml is checked out. I think if we want to use the top-level Cargo.toml, we should probably code generate it and find a general solution. |
Okay, I'll keep that in mind. Thank you for debugging! I will fix up this PR tomorrow so that we can finally merge it. |
Looks like the Windows job runs out of disk space... I guess we will have to fix the Cargo.toml that I deleted so that reactor-rs is not build X times. But I don't know where the problem lies with the original Cargo.toml |
I think I understand what the problem is here, the root of a workspace is usually where the target directory is put when building. As it says in the Cargo book:
I have an idea how to fix this issue. Cargo exposes several environment variables when building, which can also be got via |
The Rust tests are passing now on every platform. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for fixing everything!
The only reason remaining why we use Rust nightly is because only on this release channel cargo supports setting an output dir. This was previously discussed here: https://github.com/lf-lang/reactor-rust/issues/15
I have implemented the functionality in Kotlin code by copying the generated binary to the designated output dir. This allows us to get rid of the Rust nightly requirement.