Closed adil192 closed 1 month ago
Yep - I've been looking into this for the last hour. @adil192 I suspect you are correct that this has been introduced by a change in a dependency, rather than this library - not to say that it doesnt need to be fixed in this library however.
I rebuilt a previously successful snapshot of my code - the previously successful one now fails. The version of super_native_extensions does not change between the two - lending weight to it being a change in a dependency.
And here you see the error in today's build of the previously successful code
Even though my active toolchain in rustup show
is stable-x86_64-unknown-linux-gnu
, the error message still shows nightly-x86_64-unknown-linux-gnu
. Does this mean it's building with nightly instead of stable, and if so, can I make it use stable?
@adil192 - yep - sounds like it to me.
Looks like your failing build is running under user account "runneradmin", is that the user account you used to run rustup
?
(BTW I've never done anything with Rust before... so I'm just applying some common sense in the hopes it helps - all while I'm trying to blindly solve my failing build in Azure Pipelines)
Looks like the latest nightly rust-src component is broken :-/.
For anyone else coming across this thread, who is using CI such as Azure Pipelines...
The super_native_extensions package will download pre-built Rust binaries during build - hard-coded to use the nightly channel.
I've worked around this issue in Azure Pipelines by forking the tag super_native_extensions-v0.8.18
to change its dependency on the nightly channel, to the stable channel.
I've confirmed all my builds on iOS/Android/Windows/MacOS now succeed.
https://github.com/Adam-Langley/super_native_extensions/tree/defect/should-depend-on-rust-stable
You can use it in your Flutter projects by overriding the dependency:
# temporary workaround for https://github.com/superlistapp/super_native_extensions/issues/411
super_native_extensions:
git:
url: https://github.com/Adam-Langley/super_native_extensions.git
path: super_native_extensions/
ref: defect/should-depend-on-rust-stable
Note, 0.8.19 has been published earlier today.
Thank you @knopp - great work on a fast turnaround.
Do you know whether this change in Rust is a bug, or intended breaking behavior? Concern being - if the latter, this will break again when the change is mainstreamed to stable unless there are plans for super_native_extensions to adapt before then.
Interestingly, I see in the Rust docs, they recommend any dependent CI build stable, and a future release channel (beta?) to catch breaking changes with enough time to rectify.
Thanks again
This is definitely a Rust bug. Super_native_extensions used rust nightly to produce release build since it can achieve slightly smaller binaries when rebuilding the standard library with panic=abort (that requires a nightly flag), unfortunately Rust nightly is too problematic to rely on by default.
Thanks @knopp
For anyone else who has cloned my fork - I'll leave it up for another day or so before deleting it. The latest release (0.8.19) fixes the issue.
My GitHub Actions builds have all failed with my latest release with this error on Linux...
...and the same error on Windows etc...
Maybe this is just an issue with the latest rust nightly, since
the build succeeds on my local machineUpdate: The build fails on my local machine after running
rustup update
which updated rustc from 2024-02-04 to 2024-07-21 (stable) and 2024-08-07 (nightly)