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

Initial release #1

Merged
merged 4 commits into from
Jul 20, 2023
Merged

Initial release #1

merged 4 commits into from
Jul 20, 2023

Conversation

danielhenrymantilla
Copy link
Owner

cc @Darksonn @kpreid @jofas: do you want to coöwn and co-maintain this crate?

@danielhenrymantilla danielhenrymantilla enabled auto-merge (squash) July 20, 2023 18:52
@danielhenrymantilla danielhenrymantilla merged commit 379b861 into main Jul 20, 2023
@danielhenrymantilla danielhenrymantilla deleted the initial-release branch July 20, 2023 18:54
Comment on lines +33 to +38
# `docs-rs` is very similar to `better-docs`, but for it being allowed to enable
# other features as well, often to make sure optional/non-`default` features
# make it to the rendered docs (using `--all-features` instead is not that great).
docs-rs = [
"better-docs",
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it not make more sense for this to be a --cfg flag?

Copy link
Owner Author

@danielhenrymantilla danielhenrymantilla Jul 20, 2023

Choose a reason for hiding this comment

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

I've seen this pattern quite a bit, true, but I somehow find the feature to be more convenient, provided that it is properly document as unstable (I'm not that fond of fiddling with env vars / rustflags unless strictly necessary). But I have no strong opinions on this either way 🙂

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm used to cargo build --all-features working on Tokio with a stable compiler, which is why we use a --cfg. But I guess you also have other unstable features here.

Copy link
Owner Author

@danielhenrymantilla danielhenrymantilla Jul 20, 2023

Choose a reason for hiding this comment

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

Yeah, currently the default-features plays the role of the --all-features of finer-featured crates such as tokio; I wouldn't expect us going that far with this crate, but if we did, I suspect we'd end up with an all-stable-features Cargo feature for this (which is partially orthogonal to the specific case of docs.rs tweaks, since these are not expected to be used by users, so a --cfg can make a lot of sense there).

If you feel like making the change for these docs.rs knobs anyways feel free to do so or suggested it over #2

Copy link
Collaborator

Choose a reason for hiding this comment

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

It doesn't seem like better-docs or docs-rs are used at all? Maybe I'm missing something.

Copy link
Owner Author

@danielhenrymantilla danielhenrymantilla Jul 21, 2023

Choose a reason for hiding this comment

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

Ah true 😄 This is from a template I use, which lets me opt into extra facilities. For instance, it has recently occurred to me that we could consider feature-gating the MaybeDangling wrapper (since I expect to be rarely needed to have something with inherent drop glue and yet allowed to dangle), and in that case the idea would be to use better-docs to enable doc(cfg()) to illustrate that

@Darksonn
Copy link
Collaborator

do you want to co-own and co-maintain this crate?

Sure, I do not mind.

Comment on lines +93 to +101
impl<T> ::core::ops::Deref for MaybeDangling<T> {
type Target = T;

#[inline]
fn deref(self: &Self) -> &T {
let Self { value, .. } = self;
value
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are they nested like this?

Copy link
Owner Author

@danielhenrymantilla danielhenrymantilla Jul 20, 2023

Choose a reason for hiding this comment

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

It's an opinionated aspect of mine 😅; when there is a DerefMut I don't find that the Deref impl itself provides that much valuable info, so I prefer to reduce its visibility when skimming through all the main impls. Again, if this is to be co-owned I don't want to impose my views if the feeling is not shared, so we can normalize this over #2 as well

@kpreid
Copy link
Collaborator

kpreid commented Jul 22, 2023

cc …: do you want to coöwn and co-maintain this crate?

Happy to help out, but I'm bad at the “reviewing things on a consistent schedule“ aspect of “maintenance”. Do as you see fit.

I took a look through the code and I might come up with a few polishing PRs.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder why Cargo.lock is in source control? I always thought libraries don't do that

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for sharing the link, the PR is quite informative. I got curious about why the lockfile was included while trying to understand why CI is testing against the locked and latest versions of the (hypothetical) dependencies. This conservative approach to CI testing both deterministically and non-deterministically makes sense to me after reading the PR. Never really thought about dependencies breaking pipelines.

Copy link
Owner Author

Choose a reason for hiding this comment

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

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.

4 participants