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

v1.6.1 fails to build on Linux #190

Closed
ForceBru opened this issue Sep 29, 2024 · 3 comments · Fixed by #192
Closed

v1.6.1 fails to build on Linux #190

ForceBru opened this issue Sep 29, 2024 · 3 comments · Fixed by #192

Comments

@ForceBru
Copy link

I ran cargo install vl-convert with cargo v1.81.0 and got this build error:

   Compiling vl-convert-rs v1.2.3
   Compiling vl-convert v1.6.1
error[E0061]: this method takes 3 arguments but 2 arguments were supplied
    --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/vl-convert-1.6.1/src/main.rs:1255:10
     |
1255 |           .vega_to_pdf(
     |  __________^^^^^^^^^^^-
1256 | |             vg_spec,
1257 | |             VgOpts {
1258 | |                 allowed_base_urls,
...    |
1261 | |             },
1262 | |         )
     | |_________- argument #3 of type `Option<f32>` is missing
     |
note: method defined here
    --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/vl-convert-rs-1.2.3/src/converter.rs:1322:18
     |
1322 |     pub async fn vega_to_pdf(
     |                  ^^^^^^^^^^^
help: provide the argument
     |
1255 ~         .vega_to_pdf(vg_spec, VgOpts {
1256 +                 allowed_base_urls,
1257 +                 format_locale,
1258 +                 time_format_locale,
1259 +             }, /* Option<f32> */)
     |
 
error[E0061]: this method takes 3 arguments but 2 arguments were supplied
    --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/vl-convert-1.6.1/src/main.rs:1519:10
     |
1519 |           .vegalite_to_pdf(
     |  __________^^^^^^^^^^^^^^^-
1520 | |             vl_spec,
1521 | |             VlOpts {
1522 | |                 vl_version,
...    |
1529 | |             },
1530 | |         )
     | |_________- argument #3 of type `Option<f32>` is missing
     |
note: method defined here
    --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/vl-convert-rs-1.2.3/src/converter.rs:1333:18
     |
1333 |     pub async fn vegalite_to_pdf(
     |                  ^^^^^^^^^^^^^^^
help: provide the argument
     |
1519 ~         .vegalite_to_pdf(vl_spec, VlOpts {
1520 +                 vl_version,
1521 +                 config,
1522 +                 theme,
1523 +                 show_warnings,
1524 +                 allowed_base_urls,
1525 +                 format_locale,
1526 +                 time_format_locale,
1527 +             }, /* Option<f32> */)
     |
 
error[E0061]: this function takes 2 arguments but 1 argument was supplied
    --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/vl-convert-1.6.1/src/main.rs:892:28
     |
892  |             let pdf_data = vl_convert_rs::converter::svg_to_pdf(&svg)?;
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------ argument #2 of type `f32` is missing
     |
note: function defined here
    --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/vl-convert-rs-1.2.3/src/converter.rs:1591:8
     |
1591 | pub fn svg_to_pdf(svg: &str, scale: f32) -> Result<Vec<u8>, AnyError> {
     |        ^^^^^^^^^^
help: provide the argument
     |
892  |             let pdf_data = vl_convert_rs::converter::svg_to_pdf(&svg, /* f32 */)?;
     |                                                                ~~~~~~~~~~~~~~~~~
 
For more information about this error, try `rustc --explain E0061`.
error: could not compile `vl-convert` (bin "vl-convert") due to 3 previous errors
error: failed to compile `vl-convert v1.6.1`, intermediate artifacts can be found at `/tmp/cargo-installp7N6xf`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
$

Full log: https://pastebin.com/WCkLrrsn

@jonmmease
Copy link
Collaborator

Thanks for the report, looks like the version of cargo-workspaces I was using didn't properly update the cross crate dependencies. After updating it, things are working properly. I just published 1.6.2-a1 to crates.io which should include proper dependencies between crates.

Try this now:

cargo install vl-convert@1.6.2-a1

@ForceBru
Copy link
Author

I'm now getting this error:

$ cargo install [email protected]
  Downloaded vl-convert v1.6.2-a1
  Downloaded 1 crate (289.6 KB) in 0.60s
    Updating crates.io index
  Installing vl-convert v1.6.2-a1
    Updating crates.io index
error: failed to compile `vl-convert v1.6.2-a1`, intermediate artifacts can be found at `/tmp/cargo-installqk1mXB`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
 
Caused by:
  failed to select a version for the requirement `wgpu-core = "^0.20"`
  candidate versions found which didn't match: 22.1.0, 22.0.0, 0.21.1, ...
  location searched: crates.io index
  required by package `deno_webgpu v0.125.0`
      ... which satisfies dependency `deno_webgpu = "^0.125.0"` of package `deno_runtime v0.166.0`
      ... which satisfies dependency `deno_runtime = "^0.166.0"` of package `vl-convert-rs v1.6.2-a1`
      ... which satisfies dependency `vl-convert-rs = "^1.6.2-a1"` of package `vl-convert v1.6.2-a1`

@jonmmease
Copy link
Collaborator

Huh, looks like the transitive version of wgpu-core that we're depending on was yanked: https://crates.io/crates/wgpu-core/versions. See gfx-rs/wgpu#5837. Compilation from inside the project relies on the Cargo.lock file, and so the yanked versions are still reachable this way. But they aren't reachable when installing from outside the project.

I guess this will require updating deno.

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 a pull request may close this issue.

2 participants