Skip to content

Fix ci #15

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

Merged
merged 17 commits into from
Jan 18, 2022
Merged

Fix ci #15

merged 17 commits into from
Jan 18, 2022

Conversation

TroyNeubauer
Copy link
Contributor

This PR ports over most of Flutty's CI config, including:

  • Miri
  • Loom
  • Address Sanitizer
  • Checking to see if a no_std target compiles without default features
  • Checking to see if a no_std target doesn't compile with std enabled!
  • Clippy, clippy with all features, clippy with no features

This disables due_time checking when on miri, and places the due_time variable behind a #[cfg] guard.
Also this adds support for the stable channel by getting rid of the arbitrary_self_types feature. This means all instances where .retire could be called on a *mut HazPtrObjectWrapper must be replaced with HazPtrObjectWrapper::retire.
This is a little sad. Possibly we could add a retire function in the crate's root that calls HazPtrObjectWrapper::retire to make user code a little cleaner, but haphazard::retire(..., deleter) is still much more cumbersome than (...).retire(deleter).

Clippy isn't happy at the moment, but all other tasks pass.

Copy link
Owner

@jonhoo jonhoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this! I think you'll need to merge from main to get the no_std changes though.

Also, separately, I just noticed that the file name for the CI file is misspelled, which is probably why CI isn't taking effect. It should be azure-pipelines.yml (the e and the n are swapped). Could you fix that too?

@TroyNeubauer TroyNeubauer requested a review from jonhoo January 17, 2022 01:05
Copy link
Owner

@jonhoo jonhoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're really close now! A few more notes.

src/domain.rs Outdated
use crate::{Deleter, HazPtrRecord, Reclaim};
use alloc::boxed::Box;
use alloc::collections::BTreeSet;
use core::marker::PhantomData;
use core::sync::atomic::Ordering;

#[cfg(feature = "std")]
#[cfg(all(feature = "std", not(miri)))]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow why it's necessary to turn this off under miri?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It goes with the other "time" related things so I believe it makes things cleaner when due_time is disabled (see comment below)

Copy link
Owner

@jonhoo jonhoo Jan 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I still don't understand after reading your comment. From what I can tell, miri already mocks time just fine (rust-lang/miri#975), and supports Instant::now (rust-lang/miri#1243), and I don't see anything about time-related limitations in the miri readme? What error do you get if you make miri run with time supported?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I'm going to merge this as-is just so we can iterate just on the miri point and have working CI in the meantime!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I was getting the clock_gettime not available when isolation is enabled error, not knowing about -Zmiri-disable-isolation. This should be pretty easy to address in a PR.

@TroyNeubauer
Copy link
Contributor Author

Took another pass!

@TroyNeubauer TroyNeubauer requested a review from jonhoo January 18, 2022 04:27
@jonhoo jonhoo merged commit 5681c43 into jonhoo:main Jan 18, 2022
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 this pull request may close these issues.

2 participants