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

Examples not compiling #181

Closed
ssmid opened this issue Mar 31, 2021 · 5 comments
Closed

Examples not compiling #181

ssmid opened this issue Mar 31, 2021 · 5 comments

Comments

@ssmid
Copy link

ssmid commented Mar 31, 2021

I tried to follow the quick start guide, but tests and compiling failed:

$ cargo test
[...]
   Compiling kas v0.6.0
error[E0391]: cycle detected when computing the bounds for type parameter `V`
  --> src/widget/view/single_view.rs:31:15
   |
31 |     V: Driver<T::Item> = driver::Default,
   |               ^^^^^^^
   |
note: ...which requires computing the bounds for type parameter `T`...
  --> src/widget/view/single_view.rs:30:38
   |
30 |     T: SingleData + UpdatableAll<(), V::Msg> + 'static,
   |                                      ^^^^^^
   = note: ...which again requires computing the bounds for type parameter `V`, completing the cycle
note: cycle used when computing the bounds for type parameter `V`
  --> src/widget/view/single_view.rs:31:5
   |
31 |     V: Driver<T::Item> = driver::Default,
   |     ^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0391`.
error: could not compile `kas`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...

[same error once more, same lines]

error: build failed

I was wondering, because the GitHub CI says all checks passed on the current commit.

Edit: Linux Mint, dependencies installed, quickstart performed line by line, creating a new crate with the contents of the hello example worked just fine (kas from crates.io), so its probably a not yet released commit

@dhardy
Copy link
Collaborator

dhardy commented Apr 1, 2021

I actually noticed this yesterday... it turns out that the nightly and beta compilers can deal with this partial cycle (it's not really a cycle since e.g. V::Msg can be extracted as its own parameter).

Rather than work around it I think it's best just to recommend use of Rust 1.52.0 (beta). (I will try not to depend on beta compilers in the future.)

Note: I don't recommend Rust nightly at the moment since the incremental compilation is broken (workaround: delete the target/debug/incremental dir).

@dhardy
Copy link
Collaborator

dhardy commented Apr 1, 2021

See #179. I'll let you close or ask here if you have more problems.

@ssmid
Copy link
Author

ssmid commented Apr 1, 2021

The beta compiler made my laptop unresponsive and CLion crash, but in the end it worked like a charm. Thank you :)

@ssmid ssmid closed this as completed Apr 1, 2021
@dhardy
Copy link
Collaborator

dhardy commented Apr 1, 2021

Ugh! You have enough RAM? If not using -j to limit the number of build jobs may help.

@ssmid
Copy link
Author

ssmid commented Apr 1, 2021

Seems like it has been the CPU load. I never had this before with the stable toolchain... But a job limit should do the trick. Impressive project by the way, given the number of contributers, so far.

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

No branches or pull requests

2 participants