Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ci: Use reusable workflows for fmt and security_audit & fix CI failure #86

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

taiki-e
Copy link
Collaborator

@taiki-e taiki-e commented Jan 19, 2025

See smol-rs/.github#1 for details about reusable workflows.
See the second to fourth commits for CI failure.

```
error: empty line after doc comment
   --> src/runnable.rs:831:5
    |
831 | /     /// use async_task::{Runnable, spawn};
832 | |
    | |_^
...
845 |       pub fn into_raw(self) -> NonNull<()> {
    |       ------------------------------------ the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
    = help: if the empty line is unintentional remove it
help: if the documentation should include the empty line include it in the comment
    |
832 |     ///
    |

error: empty lines after doc comment
   --> src/runnable.rs:868:5
    |
868 | /     /// use async_task::{Runnable, spawn};
869 | |
870 | |     /// let (runnable, task) = spawn(async {}, |_| {});
871 | |     /// let runnable_pointer = runnable.into_raw();
...   |
882 | |     /// ```
883 | |
    | |_^
884 |       /// [into_raw]: #method.into_raw
885 |       pub unsafe fn from_raw(ptr: NonNull<()>) -> Self {
    |       ------------------------------------------------ the comment documents this associated function
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = help: if the empty lines are unintentional remove them
help: if the documentation should include the empty lines include them in the comment
    |
869 +     ///
870 |     /// let (runnable, task) = spawn(async {}, |_| {});
...
882 |     /// ```
883 +     ///
    |
```
```
error: the following explicit lifetimes could be elided: 'a
  --> examples/with-metadata.rs:52:6
   |
52 | impl<'a, F: Future> Future for MeasureRuntime<'a, F> {
   |      ^^                                       ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
   |
52 - impl<'a, F: Future> Future for MeasureRuntime<'a, F> {
52 + impl<F: Future> Future for MeasureRuntime<'_, F> {
   |
```
…k around upstream bug

```
==5246==
==5246== HEAP SUMMARY:
==5246==     in use at exit: 48 bytes in 1 blocks
==5246==   total heap usage: 428 allocs, 427 frees, 51,703 bytes allocated
==5246==
==5246== Searching for pointers to 1 not-freed blocks
==5246== Checked 128,240 bytes
==5246==
==5246== 48 bytes in 1 blocks are possibly lost in loss record 1 of 1
==5246==    at 0x4E050C5: malloc (vg_replace_malloc.c:442)
==5246==    by 0x22D2A7: alloc (alloc.rs:96)
==5246==    by 0x22D2A7: alloc_impl (alloc.rs:192)
==5246==    by 0x22D2A7: allocate (alloc.rs:254)
==5246==    by 0x22D2A7: {closure#0}<std::thread::Inner> (sync.rs:484)
==5246==    by 0x22D2A7: allocate_for_layout<core::mem::maybe_uninit::MaybeUninit<std::thread::Inner>, alloc::sync::{impl#14}::new_uninit::{closure_env#0}<std::thread::Inner>, fn(*mut u8) -> *mut alloc::sync::ArcInner<core::mem::maybe_uninit::MaybeUninit<std::thread::Inner>>> (sync.rs:1952)
==5246==    by 0x22D2A7: new_uninit<std::thread::Inner> (sync.rs:482)
==5246==    by 0x22D2A7: std::thread::Thread::new (mod.rs:1429)
==5246==    by 0x22C679: std::thread::current::init_current (current.rs:227)
==5246==    by 0x2361E3: current_or_unnamed (current.rs:184)
==5246==    by 0x2361E3: std::sync::mpmc::context::Context::new (context.rs:72)
==5246==    by 0x1BA891: __init (context.rs:43)
==5246==    by 0x1BA891: call_once<fn() -> core::cell::Cell<core::option::Option<std::sync::mpmc::context::Context>>, ()> (function.rs:250)
==5246==    by 0x1BA891: unwrap_or_else<core::cell::Cell<core::option::Option<std::sync::mpmc::context::Context>>, fn() -> core::cell::Cell<core::option::Option<std::sync::mpmc::context::Context>>> (option.rs:1023)
==5246==    by 0x1BA891: std::sys::thread_local::native::lazy::Storage<T,D>::initialize (lazy.rs:64)
==5246==    by 0x1BC045: get_or_init<core::cell::Cell<core::option::Option<std::sync::mpmc::context::Context>>, (), fn() -> core::cell::Cell<core::option::Option<std::sync::mpmc::context::Context>>> (lazy.rs:56)
==5246==    by 0x1BC045: {closure#0} (mod.rs:94)
==5246==    by 0x1BC045: call_once<std::sync::mpmc::context::{impl#0}::with::CONTEXT::{constant#0}::{closure_env#0}, (core::option::Option<&mut core::option::Option<core::cell::Cell<core::option::Option<std::sync::mpmc::context::Context>>>>)> (function.rs:250)
==5246==    by 0x1BC045: try_with<core::cell::Cell<core::option::Option<std::sync::mpmc::context::Context>>, std::sync::mpmc::context::{impl#0}::with::{closure_env#1}<std::sync::mpmc::list::{impl#3}::recv::{closure_env#1}<test::event::CompletedTest>, ()>, ()> (local.rs:307)
==5246==    by 0x1BC045: with<std::sync::mpmc::list::{impl#3}::recv::{closure_env#1}<test::event::CompletedTest>, ()> (context.rs:52)
==5246==    by 0x1BC045: std::sync::mpmc::list::Channel<T>::recv (list.rs:437)
==5246==    by 0x1D5336: recv<test::event::CompletedTest> (mod.rs:976)
==5246==    by 0x1D5336: recv<test::event::CompletedTest> (mod.rs:850)
==5246==    by 0x1D5336: run_tests<test::console::run_tests_console::{closure_env#2}> (lib.rs:391)
==5246==    by 0x1D5336: test::console::run_tests_console (console.rs:322)
==5246==    by 0x1F2BE6: test::test_main (lib.rs:149)
==5246==    by 0x1F354A: test::test_main_static (lib.rs:171)
==5246==    by 0x1B8F72: basic::main (basic.rs:0)
==5246==    by 0x1AAEDA: core::ops::function::FnOnce::call_once (function.rs:250)
==5246==    by 0x1A610D: std::sys::backtrace::__rust_begin_short_backtrace (backtrace.rs:152)
==5246==
==5246== LEAK SUMMARY:
==5246==    definitely lost: 0 bytes in 0 blocks
==5246==    indirectly lost: 0 bytes in 0 blocks
==5246==      possibly lost: 48 bytes in 1 blocks
==5246==    still reachable: 0 bytes in 0 blocks
==5246==         suppressed: 0 bytes in 0 blocks
==5246==
==5246== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
error: test failed, to rerun pass `--test basic`
```
@taiki-e taiki-e merged commit a11c4b2 into master Jan 23, 2025
8 checks passed
@taiki-e taiki-e deleted the taiki-e/ci branch January 23, 2025 15:01
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants