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

error-stack UI tests fail under nightly-2022-07-20 #897

Closed
indietyp opened this issue Aug 6, 2022 · 3 comments · Fixed by #904
Closed

error-stack UI tests fail under nightly-2022-07-20 #897

indietyp opened this issue Aug 6, 2022 · 3 comments · Fixed by #904
Assignees
Labels
area/libs > error-stack Affects the `error-stack` crate (library)

Comments

@indietyp
Copy link
Member

indietyp commented Aug 6, 2022

nightly-2022-07-20 (rust 1.64 stable) introduced rust-lang/rust#98320, which means that the UI and acceptance tests for the macro errors fail on toolchains newer than that.

= note: this error originates in the macro `$crate::report` (in Nightly builds, run with -Z macro-backtrace for more info)

This is changed to:

= note: this error originates in the macro `$crate::report` which comes from the expansion of the macro `bail` (in Nightly builds, run with -Z macro-backtrace for more info)

= note: this error originates in the macro `$crate::report` (in Nightly builds, run with -Z macro-backtrace for more info)

This is changed to:

= note: this error originates in the macro `$crate::report` which comes from the expansion of the macro `ensure` (in Nightly builds, run with -Z macro-backtrace for more info)

The which comes from the expansion of the macro `...` part is new.

@indietyp
Copy link
Member Author

indietyp commented Aug 6, 2022

To fix this, we could either

  1. update the tests and CI (single PR) - because we already only compiletest on nightly
  2. use rustversion to conditionally emit additional code on toolchains that are newer than 2022-07-20

(from the logs of #892 it also seems like the code to fetch the nightly toolchain version seems broken)

@TimDiekmann what do you think?

@vilkinsons vilkinsons added the area/libs > error-stack Affects the `error-stack` crate (library) label Aug 7, 2022
@vilkinsons vilkinsons changed the title error-stack ui tests fail under nightly-2022-07-20 error-stack UI tests fail under nightly-2022-07-20 Aug 7, 2022
@TimDiekmann
Copy link
Member

TimDiekmann commented Aug 7, 2022

Thanks for filing this!

I think the easiest way is to simply bump the nightly version used in CI, this will also fix #898. I will do this tomorrow.

(from the logs of #892 it also seems like the code to fetch the nightly toolchain version seems broken)

Currently, it uses the first rust-toolchain.toml file it finds in the repository to determine the nightly version, this is why we currently try to keep the nightly versions on par between the different projects (package/engine, packages/libs/error-stack and packages/graph(on dev/graph) ). Probably there is a better way to this, but I haven't investigated this yet.

@indietyp
Copy link
Member Author

indietyp commented Aug 7, 2022

What I specifically mean is the error:

Run nightly=$(cat $(find . -name rust-toolchain.toml) | grep channel | cut -d\" -f2)
parse error: Invalid literal at line 2, column 0
use toolchains: 

Which turns up in the CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/libs > error-stack Affects the `error-stack` crate (library)
Development

Successfully merging a pull request may close this issue.

3 participants