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

Release: rust 0.6.2 and python 0.3.3 #292

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

geonnave
Copy link
Collaborator

includes bug fixes with python wheel distribution
and in turn facilitates integration with libraries that depend on lakers-python, such as aiocoap

actually, the rust side doesn't have updates,
but since the triggers to publish python wheels are on github actions, I am just bumping all the versions

includes bug fixes with python wheel distribution
and in turn facilitates integration with libraries
that depend on lakers-python, such as aiocoap

actually, the rust side doesn't have updates,
but since the triggers to publish python wheels are on github
actions, I am just bumping all the versions
Copy link
Collaborator

@chrysn chrysn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot.

[edit: CI is doing CI things … missed a version?]

@geonnave
Copy link
Collaborator Author

Seems to be something in the Actions environment, tried to re-run 0.6.1 and got the same errors.

@chrysn
Copy link
Collaborator

chrysn commented Jun 24, 2024

I've been trying to reproduce that locally, but that fails for lack of PSA, and GitHub runners are not exactly something to easily run locally.

This:

 error: expected one of `!` or `::`, found keyword `static`
 --> /home/runner/work/lakers/lakers/target/debug/build/psa-crypto-sys-3e14593d80be7147/out/shim_bindings.rs:3:11
  |
3 | rewriting static
  |           ^^^^^^ expected one of `!` or `::`

looks almost like a code generator started spewing debug output into the generated code. But those are generated by bindgen.

As presumably the tests run successfully locally, could you try checking in your Cargo.lock file? By now, that's the default anyway

@geonnave
Copy link
Collaborator Author

Yeah, I had rustc 1.72.0-nightly in my local machine (and it was working), then after updating to rustc 1.81.0-nightly I got the error.

@chrysn
Copy link
Collaborator

chrysn commented Jun 24, 2024

I'm getting completely different errors on the PSA side; updating bindgen could help, trying that.

@chrysn
Copy link
Collaborator

chrysn commented Jun 24, 2024

I've taken the liberty to push a commit onto your branch to run the CI of this PR again with the update from malishav/rust-psa-crypto#1

Unless Mališa is currently on vacation or there's another reason that PR can't go in quickly, I'd rather avoid having that in the released version (so I can delete the branch again) -- but then again, it's a patched crate, and those are not part of what gets to crates.io anyway.

@chrysn
Copy link
Collaborator

chrysn commented Jun 24, 2024

Hrmpf, that fixed my local build, but not the CI case.

At least I know now why it's on line 3: the top lines are /* automatically generated by rust-bindgen 0.69.4 */ / empty; this means that rewritingt static can really no be part of valid Rust. Still no clue where that comes from precisely.

@chrysn
Copy link
Collaborator

chrysn commented Jun 24, 2024

I can now reproduce locally: things worked on stable but broke on nightly.

I'm tempted to just fix this by editing out the "rewriting static" that's clearly a leftover println somewhere where I can't trace it. What I do know so far is that it does affect rust-psa-crypto.

@chrysn
Copy link
Collaborator

chrysn commented Jun 24, 2024

The issue is tracked to bindgen: rust-lang/rust-bindgen#2852

@geonnave
Copy link
Collaborator Author

Wow, and that's a really fresh issue. Thanks for digging and finding it. Let's wait a bit and see if they fix it somewhat fast. Or else I can try to specify a previous rust version in the CI.

@chrysn
Copy link
Collaborator

chrysn commented Jun 24, 2024

… but ultimately came from rust-lang/rustfmt#6210. Rerunning things with a band-aid from malishav/rust-psa-crypto#1 that disables rustfmt.

It is already fixed, but it'll take a day or two to get into the nightlies.

As a whole I think the best way to go is to revert my change (updating rust-psa-crypto's bindgen is still good but not critical for here), pin the nightly instead, and revert that pin after this is out.

Today's nightly has a broken rustfmt; pinning it makes CI work and
avoids users running into similar issues.
@chrysn
Copy link
Collaborator

chrysn commented Jun 24, 2024

All green now; the only change compared to your original branch is now the fixed nightly version, and that the example's nightly version is symlinked to the toolchain version to avoid missing one when changing back.

@geonnave
Copy link
Collaborator Author

Great! Thanks for fixing that.

@geonnave geonnave merged commit 9d20330 into openwsn-berkeley:main Jun 24, 2024
31 checks passed
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

Successfully merging this pull request may close these issues.

2 participants