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 compiling #39

Open
akunito opened this issue Mar 19, 2024 · 3 comments
Open

error compiling #39

akunito opened this issue Mar 19, 2024 · 3 comments

Comments

@akunito
Copy link

akunito commented Mar 19, 2024

Hi, I tried to install it by cargo and I got next errors

Compiling wgpu_text v0.8.6 Compiling watershot v0.2.2 (/home/akunito/Downloads/watershot) warning:&without an explicit lifetime name cannot be used here --> src/rendering.rs:790:26 | 790 | const RECT_VERTICES: &[Self] = &[ | ^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010> = note:#[warn(elided_lifetimes_in_associated_constant)]on by default help: use the'static` lifetime
|
790 | const RECT_VERTICES: &'static [Self] = &[
| +++++++

error[E0308]: arguments to this method are incorrect
--> src/rendering.rs:360:29
|
360 | rendering.brush.queue(device, queue, vec![section]).unwrap();
| ^^^^^ ------ ----- expected wgpu::Queue, found a different wgpu::Queue
| |
| expected wgpu::Device, found a different wgpu::Device
|
= note: wgpu::Device and wgpu::Device have similar names, but are actually distinct types
note: wgpu::Device is defined in crate wgpu
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.17.2/src/lib.rs:160:1
|
160 | pub struct Device {
| ^^^^^^^^^^^^^^^^^
note: wgpu::Device is defined in crate wgpu
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/lib.rs:224:1
|
224 | pub struct Device {
| ^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate wgpu are being used?
= note: wgpu::Queue and wgpu::Queue have similar names, but are actually distinct types
note: wgpu::Queue is defined in crate wgpu
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.17.2/src/lib.rs:884:1
|
884 | pub struct Queue {
| ^^^^^^^^^^^^^^^^
note: wgpu::Queue is defined in crate wgpu
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/lib.rs:1020:1
|
1020 | pub struct Queue {
| ^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate wgpu are being used?
note: method defined here
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu_text-0.8.6/src/brush.rs:41:12
|
41 | pub fn queue<'a, S>(
| ^^^^^

error[E0308]: mismatched types
--> src/rendering.rs:375:34
|
375 | rendering.brush.draw(&mut render_pass);
| ---- ^^^^^^^^^^^^^^^^ expected wgpu::RenderPass<'_>, found a different wgpu::RenderPass<'_>
| |
| arguments to this method are incorrect
|
= note: wgpu::RenderPass<'_> and wgpu::RenderPass<'_> have similar names, but are actually distinct types
note: wgpu::RenderPass<'_> is defined in crate wgpu
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.17.2/src/lib.rs:774:1
|
774 | pub struct RenderPass<'a> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: wgpu::RenderPass<'_> is defined in crate wgpu
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/lib.rs:920:1
|
920 | pub struct RenderPass<'a> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate wgpu are being used?
note: method defined here
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu_text-0.8.6/src/brush.rs:136:12
|
136 | pub fn draw<'pass>(&'pass self, rpass: &mut wgpu::RenderPass<'pass>) {
| ^^^^

error[E0308]: arguments to this method are incorrect
--> src/rendering.rs:526:84
|
526 | let brush = wgpu_text::BrushBuilder::using_font(runtime_data.font.clone()).build(
| ^^^^^
527 | &runtime_data.device,
| -------------------- expected wgpu::Device, found a different wgpu::Device
...
530 | format,
| ------ expected wgpu_types::TextureFormat, found TextureFormat
|
= note: wgpu::Device and wgpu::Device have similar names, but are actually distinct types
note: wgpu::Device is defined in crate wgpu
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.17.2/src/lib.rs:160:1
|
160 | pub struct Device {
| ^^^^^^^^^^^^^^^^^
note: wgpu::Device is defined in crate wgpu
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/lib.rs:224:1
|
224 | pub struct Device {
| ^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate wgpu are being used?
= note: TextureFormat and wgpu_types::TextureFormat have similar names, but are actually distinct types
note: TextureFormat is defined in crate wgpu_types
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-types-0.17.0/src/lib.rs:1940:1
|
1940 | pub enum TextureFormat {
| ^^^^^^^^^^^^^^^^^^^^^^
note: wgpu_types::TextureFormat is defined in crate wgpu_types
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-types-0.19.2/src/lib.rs:2286:1
|
2286 | pub enum TextureFormat {
| ^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate wgpu_types are being used?
note: method defined here
--> /home/akunito/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu_text-0.8.6/src/brush.rs:274:12
|
274 | pub fn build(
| ^^^^^

For more information about this error, try rustc --explain E0308.
warning: watershot (bin "watershot") generated 1 warning
error: could not compile watershot (bin "watershot") due to 3 previous errors; 1 warning emitted
error: failed to compile watershot v0.2.2 (/home/akunito/Downloads/watershot), intermediate artifacts can be found at /home/akunito/Downloads/watershot/target.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.`

@raman08
Copy link

raman08 commented Mar 30, 2024

Got the same error.... Any solution u found?

@Kirottu
Copy link
Owner

Kirottu commented Apr 3, 2024

The problem with cargo install is that it does not respect the lockfile, you should rather use cargo build --release and either package the resulting binary or copy it to a suitable location manually.

@Syndelis
Copy link
Contributor

The problem with cargo install is that it does not respect the lockfile, you should rather use cargo build --release and either package the resulting binary or copy it to a suitable location manually.

Alternatively, cargo install --locked will respect the lockfile

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

4 participants