superlistapp / super_native_extensions

Native drag & drop, clipboard access and context menu.
MIT License
453 stars 82 forks source link

Build failed caused by `time` crate #362

Closed TabooSun closed 5 months ago

TabooSun commented 5 months ago

I think there is a change to nightly Rust yesterday that causes this.

Log

SEVERE: Compiling irondash_dart_ffi v0.2.0 SEVERE: error[E0282]: type annotations needed for `Box<_>` SEVERE: --> /Users/taboosun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.25/src/format_description/parse/mod.rs:83:9 SEVERE: | SEVERE: 83 | let items = format_items SEVERE: | ^^^^^ SEVERE: ... SEVERE: 86 | Ok(items.into()) SEVERE: | ---- type must be known at this point SEVERE: | SEVERE: help: consider giving `items` an explicit type, where the placeholders `_` are specified SEVERE: | SEVERE: 83 | let items: Box<_> = format_items SEVERE: | ++++++++ SEVERE: SEVERE: Compiling url v2.4.0 SEVERE: For more information about this error, try `rustc --explain E0282`. SEVERE: error: could not compile `time` (lib) due to 1 previous error SEVERE: warning: build failed, waiting for other jobs to finish... SEVERE: -------------------------------------------------------------------------------- SEVERE: #0 runCommand (package:build_tool/src/util.dart:118:5) SEVERE: #1 RustBuilder.build (package:build_tool/src/builder.dart:139:5) SEVERE: SEVERE: #2 ArtifactProvider.getArtifacts (package:build_tool/src/artifacts_provider.dart:68:25) SEVERE: SEVERE: #3 BuildGradle.build (package:build_tool/src/build_gradle.dart:32:23) SEVERE: SEVERE: #4 BuildGradleCommand.runBuildCommand (package:build_tool/src/build_tool.dart:62:5) SEVERE: SEVERE: #5 BuildCommand.run (package:build_tool/src/build_tool.dart:34:5) SEVERE: SEVERE: #6 CommandRunner.runCommand (package:args/command_runner.dart:212:13) SEVERE: SEVERE: #7 runMain (package:build_tool/src/build_tool.dart:248:5) SEVERE: SEVERE: -------------------------------------------------------------------------------- SEVERE: BuildTool arguments: [build-gradle] SEVERE: ================================================================================ FAILURE: Build failed with an exception. * Where: Script '/Users/taboosun/.pub-cache/hosted/pub.dev/super_native_extensions-0.8.13/cargokit/gradle/plugin.gradle' line: 59 * What went wrong: Execution failed for task ':super_native_extensions:cargokitCargoBuildSuper_native_extensionsRelease'. > Process 'command '/Users/taboosun/.pub-cache/hosted/pub.dev/super_native_extensions-0.8.13/cargokit/gradle/../run_build_tool.sh'' finished with non-zero exit value 1 * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 43s Running Gradle task 'assembleStagingRelease'... 44.4s Gradle task assembleStagingRelease failed with exit code 1

knopp commented 5 months ago

Thanks for the report. I'll update dependencies.

knopp commented 5 months ago

Should be fixed in 0.8.14.

TabooSun commented 5 months ago

@knopp Thank you so much

sck-v commented 5 months ago

@knopp thanks for a quick fix, however, still getting an error while building on CI

Log ``` SEVERE: Compiling rand v0.8.5 SEVERE: error: unexpected `cfg` condition value: `mock` SEVERE: --> src/context.rs:102:11 SEVERE: | SEVERE: 102 | #[cfg(feature = "mock")] SEVERE: | ^^^^^^^^^^^^^^^^ help: remove the condition SEVERE: | SEVERE: = note: no expected values for `feature` SEVERE: = help: consider adding `mock` as a feature in `Cargo.toml` SEVERE: = note: see for more information about checking conditional configuration SEVERE: = note: `-D unexpected-cfgs` implied by `-D warnings` SEVERE: = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]` SEVERE: SEVERE: error: could not compile `super_native_extensions` (lib) due to 1 previous error ```
knopp commented 5 months ago

Indeed. That seems like a left-over. Will fix that ASAP. I'm really not sure why it wasn't picked up by github CI despite rustup update.

knopp commented 5 months ago

@sck-v, I just published 0.8.15. can you retry once available on pub?

knopp commented 5 months ago

I also modified CI script to run the check and lint workflow on both stable and nightly, hopefully catching problems like this earlier.

sck-v commented 5 months ago

@knopp worked for me, thanks 🙌

Feichtmeier commented 5 months ago

hey 👋 my musicpod CI fails since today with

[        ] INFO: Building super_native_extensions for x86_64-unknown-linux-gnu
[        ] SEVERE: ================================================================================
[        ] SEVERE: Cargokit BuildTool failed with error:
[        ] SEVERE: --------------------------------------------------------------------------------
[        ] SEVERE: External Command: rustup "run" "nightly" "cargo" "build" "-Z" "build-std=panic_abort,std" "--manifest-path" "/home/runner/.pub-cache/hosted/pub.dev/super_native_extensions-0.7.0/rust/Cargo.toml" "-p" "super_native_extensions" "--release" "--target" "x86_64-unknown-linux-gnu" "--target-dir" "/home/runner/work/musicpod/musicpod/build/linux/x64/release/plugins/super_native_extensions/cargokit_build"
[        ] SEVERE: Returned Exit Code: 101
...

is this related to this fix? and since it is some "nightly" workflow, does it mean it would be fixed tomorrow?

knopp commented 5 months ago

You seem to be using a very old super_native_extensions version (0.7.0). The error is caused by Rust update and will unlikely be resolved by itself. I'd suggest updating to 0.8.15.

Feichtmeier commented 5 months ago

You seem to be using a very old super_native_extensions version (0.7.0). The error is caused by Rust update and will unlikely be resolved by itself. I'd suggest updating to 0.8.15.

oh, thank you very much, indeed that fixed it! I hesiated on upgrading because the smtc_windows plugin I use to communicate with the windows media tray has a lower uuid dependency, which I have overriden now, seems it doesnt cause any harm 🤞