Skip to content

Make gix crates ready for automatic cfg checking #1123

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 6 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
# Let's not fail CI for this, it will fail locally often enough, and a crate a little bigger
# than allows is no problem either if it comes to that.
just check-size || true

cargo-deny:
runs-on: ubuntu-latest
strategy:
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,3 @@ prodash = { version = "26.2.2", default-features = false }

[package.metadata.docs.rs]
features = ["document-features", "max"]
rustdoc-args = ["--cfg", "docsrs"]
1 change: 0 additions & 1 deletion gitoxide-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,3 @@ document-features = { version = "0.2.0", optional = true }

[package.metadata.docs.rs]
features = ["document-features", "blocking-client", "organize", "estimate-hours", "serde"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gitoxide-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
//!
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(feature = "async-client", allow(unused))]
#![deny(rust_2018_idioms)]
#![forbid(unsafe_code)]
Expand Down
1 change: 0 additions & 1 deletion gix-actor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ gix-hash = { path = "../gix-hash" }
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-actor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
//!
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

Expand Down
1 change: 0 additions & 1 deletion gix-archive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ gix-filter = { path = "../gix-filter"}
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-archive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
//! ## Feature Flags
//! All features are related to which container formats are available.
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(rust_2018_idioms, missing_docs)]
#![forbid(unsafe_code)]

Expand Down
1 change: 0 additions & 1 deletion gix-attributes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ gix-fs = { path = "../gix-fs" }

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
features = ["document-features"]
6 changes: 3 additions & 3 deletions gix-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
//!
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

pub use gix_glob as glob;
Expand Down
1 change: 0 additions & 1 deletion gix-commitgraph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ gix-date = { path = "../gix-date" }
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-commitgraph/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
//! Eventually, git will merge these files together as the number of files grows.
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

use std::path::Path;
Expand Down
1 change: 0 additions & 1 deletion gix-config-value/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ libc = "0.2"
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-config-value/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
//!
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

/// The error returned when any config value couldn't be instantiated due to malformed input.
Expand Down
1 change: 0 additions & 1 deletion gix-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ path = "./benches/large_config_file.rs"
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
//!
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

pub mod file;
Expand Down
1 change: 0 additions & 1 deletion gix-credentials/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ gix-sec = { path = "../gix-sec" }
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-credentials/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
//!
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

Expand Down
1 change: 0 additions & 1 deletion gix-date/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ gix-hash = { path = "../gix-hash" }
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-date/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
//! Note that this is not a general purpose time library.
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

Expand Down
1 change: 0 additions & 1 deletion gix-diff/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ document-features = { version = "0.2.0", optional = true }
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-diff/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! Algorithms for diffing various git object types and for generating patches, highly optimized for performance.
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

Expand Down
1 change: 0 additions & 1 deletion gix-features/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,3 @@ sha1 = { version = "0.10.0", optional = true, features = ["asm"] }
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-features/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
//! counterparts with higher performance.
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

///
Expand Down
5 changes: 5 additions & 0 deletions gix-fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ include = ["src/**/*", "LICENSE-*"]
[lib]
doctest = false

[features]
Copy link
Member

Choose a reason for hiding this comment

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

A great catch, thank you!

## Data structures implement `serde::Serialize` and `serde::Deserialize`.
serde = ["dep:serde"]

[dependencies]
gix-features = { version = "^0.36.0", path = "../gix-features" }
serde = { version = "1.0.114", optional = true, default-features = false, features = ["std", "derive"] }

[dev-dependencies]
tempfile = "3.5.0"
1 change: 0 additions & 1 deletion gix-glob/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ gix-testtools = { path = "../tests/tools"}
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-glob/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! Provide glob [`Patterns`][Pattern] for matching against paths or anything else.
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

Expand Down
1 change: 0 additions & 1 deletion gix-hash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ gix-features = { path = "../gix-features", features = ["rustsha1"] }
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-hash/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
//! These are provided in [borrowed versions][oid] as well as an [owned one][ObjectId].
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

#[path = "oid.rs"]
Expand Down
1 change: 0 additions & 1 deletion gix-ignore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ gix-fs = { path = "../gix-fs" }

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
features = ["document-features"]
6 changes: 3 additions & 3 deletions gix-ignore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
//!
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

Expand Down
1 change: 0 additions & 1 deletion gix-index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ libc = { version = "0.2.149" }

[package.metadata.docs.rs]
features = ["document-features", "serde"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-index/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(unsafe_code, missing_docs, rust_2018_idioms)]

use std::{ops::Range, path::PathBuf};
Expand Down
1 change: 0 additions & 1 deletion gix-mailmap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ gix-testtools = { path = "../tests/tools"}
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-mailmap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
//! using an [accelerated data-structure][Snapshot].
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

Expand Down
1 change: 0 additions & 1 deletion gix-object/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,4 @@ gix-testtools = { path = "../tests/tools"}
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]

6 changes: 3 additions & 3 deletions gix-object/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
//! as well as [mutable versions][Object] of these. Both types of objects can be encoded.
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

Expand Down
1 change: 0 additions & 1 deletion gix-odb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ document-features = { version = "0.2.0", optional = true }

[package.metadata.docs.rs]
features = ["document-features", "serde"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-odb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
//! * multiple loose objects and pack locations as gathered from `alternates` files.
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

use std::{
Expand Down
1 change: 0 additions & 1 deletion gix-pack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,3 @@ gix-testtools = { path = "../tests/tools"}
[package.metadata.docs.rs]
all-features = true
features = ["document-features", "pack-cache-lru-dynamic", "object-cache-dynamic", "serde"]
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 3 additions & 3 deletions gix-pack/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
//! in order to decompress packs in parallel and without any waste.
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

///
Expand Down
Loading