Closed chenrui333 closed 7 months ago
master build error with rustc 1.69.0 (84c898d65 2023-04-16)
Compiling gluon v0.18.1 (.../3rdpary/gluon)
Compiling gluon_parser v0.18.0 (.../3rdpary/gluon/parser)
error[E0106]: missing lifetime specifier
--> src/query.rs:808:57
|
808 | pub(crate) fn env(env: &(dyn Compilation + '_)) -> Env<&'_ CompilerDatabase> {
| ----------------------- ^^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of `env`'s 2 lifetimes it is borrowed from
help: consider introducing a named lifetime parameter
|
808 | pub(crate) fn env<'a>(env: &'a (dyn Compilation + 'a)) -> Env<&'a CompilerDatabase> {
| ++++ ++ ~~ ~~
For more information about this error, try `rustc --explain E0106`.
error: could not compile `gluon` due to previous error
Reported the ICE upstream at https://github.com/rust-lang/rust/issues/112832
in the meantime can there be a rust-toolchain
file in the source tree
FWIW, using Gluon on a project with Rust 1.71 does not compile either (though no compiler panics at least):
error[E0308]: mismatched types
--> /home/sergio/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gluon_base-0.18.0/src/types/mod.rs:1042:24
|
1042 | const _: [(); 8 * 6] = [(); std::mem::size_of::<Type<Symbol, ArcType>>()];
| ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an array with a fixed size of 48 elements, found one with 40 elements
| |
| help: consider specifying the actual array length: `40`
any update on this thread?
Workaround:
Sticking to the specific rust-compiler version 1.69, the code compiles
Add the following file to the project root ./rust-toolchain.toml
[toolchain]
channel = "1.69"
seems to work on current nightly ? both the gluon-repl package and the head of this repository build just fine on 1.76
Gluon compiles on newer versions of rust again, I just forgot to close this one out
While upgrading rust to 1.70.0, we found that fselect has some build issue with it, see the following build failure
full build log, https://github.com/Homebrew/homebrew-core/actions/runs/5164912796/jobs/9305636134 some regression test log in here as well, https://github.com/chenrui333/github-action-test/actions/runs/5269091593/jobs/9526714893