clang-rs icon indicating copy to clipboard operation
clang-rs copied to clipboard

upgrade action versions to silent nodejs 12 deprecated warning

Open mo-xiaoming opened this issue 2 years ago • 1 comments

CI complains about some deprecations

Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout, actions/cache, actions-rs/toolchain, actions-rs/cargo, actions-rs/cargo, actions/cache, actions/checkout

The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Four actions has outdated nodejs, actions/checkout, actions/cache, actions-rs/toolchain and actions-rs/toolchain

set-output and save-state warnings are originated from actions-rs/toolchain

I upgrade actions/checkout and actions/cache in this PR, but unfortunately, all actions-rs related repos seem to be abandoned, and they have warning related PR open in their repos, but seems nobody cares

https://github.com/actions-rs/cargo/issues/216

https://github.com/actions-rs/toolchain/issues/219

mo-xiaoming avatar Nov 05 '22 01:11 mo-xiaoming

replaced rust related actions with dtolnay's, no warnings, but clang-sys failed to compile

error[E0599]: no method named `strip_prefix` found for type `&str` in the current scope
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/clang-sys-1.4.0/build/dynamic.rs:88:51
   |
88 |     let version = if let Some(version) = filename.strip_prefix("libclang.so.") {
   |                                                   ^^^^^^^^^^^^ method not found in `&str`

error[E0599]: no method named `strip_prefix` found for type `std::borrow::Cow<'_, str>` in the current scope
  --> /home/runner/.cargo/registry/src/github.com-1ecc6[29](https://github.com/mo-xiaoming/clang-rs/actions/runs/3400508995/jobs/5654979803#step:6:30)9db9ec823/clang-sys-1.4.0/build/static.rs:36:36
   |
36 |         if let Some(name) = string.strip_prefix("lib") {
   |                                    ^^^^^^^^^^^^ method not found in `std::borrow::Cow<'_, str>`

error[E0599]: no method named `strip_prefix` found for type `&str` in the current scope
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/clang-sys-1.4.0/build/static.rs:53:35
   |
53 |             if let Some(path) = p.strip_prefix("-l") {
   |                                   ^^^^^^^^^^^^ method not found in `&str`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0599`.
error: could not compile `clang-sys`.

mo-xiaoming avatar Nov 05 '22 14:11 mo-xiaoming