Conversation
…ge size, and improve maintainability Co-authored-by: jhg <1288711+jhg@users.noreply.github.com>
jhg
left a comment
There was a problem hiding this comment.
You can reduce uploaded size of package if in Cargo.toml you use something like:
exclude = [
".github/**",
".vscode/**",
".idea/**",
"tests/**", # To reduce the package size, as tests are not needed to use it.
]
or:
exclude = [".github/**", ".vscode/**", "benches/**", "Cargo.lock", "LICENSE", ".gitignore"]
| - name: Run tests | ||
| run: cargo test -- --show-output | ||
|
|
||
| - name: Check without logging feature | ||
| run: cargo check --no-default-features | ||
|
|
||
| - name: Run clippy | ||
| run: cargo clippy --all-targets -- -D warnings |
There was a problem hiding this comment.
It's ok, but could be nice also run tests without logging feature.
There was a problem hiding this comment.
Great idea! I've added a dedicated step to run tests without the logging feature. The CI now includes both cargo check --no-default-features and cargo test --no-default-features to ensure the crate works properly in both configurations. (3571bbf)
Co-authored-by: jhg <1288711+jhg@users.noreply.github.com>
... Good suggestion! I've expanded the exclude list in Cargo.toml to include |
This PR addresses the requested repository review with improvements prioritized as follows:
🔧 Critical Bug Fix
get_user_id_of(): Changed incorrect return type fromlibc::gid_ttolibc::uid_t. This was a potentially serious bug that could cause incorrect behavior when setting user IDs.📦 Package Size Reduction
logdependency optional: Thelogcrate is now an optional dependency behind theloggingfeature (enabled by default)drop-root = { version = "1.0", default-features = false }🛠️ Code Quality & Maintainability
{variable}instead of{}, variable)setgroupsoperationlib.rs🔄 CI/CD Improvements
actions/checkout@v2andactions-rs/toolchain@v1with modern alternatives📚 Documentation
fn main()wrapper in README exampleTesting
All existing tests pass, and the changes are backward compatible. The crate now:
--no-default-features(logging disabled)The changes are minimal and surgical, focusing on fixing the critical bug while improving code quality and reducing optional dependencies.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.