Skip to content

Reduce uniform field visibility together - #153

Merged
charliermarsh merged 3 commits into
mainfrom
charlie/fix-uniform-field-visibility-ruff
Jul 31, 2026
Merged

Reduce uniform field visibility together#153
charliermarsh merged 3 commits into
mainfrom
charlie/fix-uniform-field-visibility-ruff

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

Reduce complete, uniformly visible field groups together instead of suggesting different visibility levels for sibling fields.

When one pub(crate) field can become pub(super) and another can become private, we now report pub(super) for both when the allow-by-default hawk::unnecessary_crate_visibility lint is enabled. A field that requires the current visibility still preserves the group, while a complete group whose fields can all become private is reduced to private.

Preserve the current visibility when a source field is absent from the compiled graph, such as a cfg-disabled field, or when a field opts out with #[allow(dead_code)], because those groups cannot participate in a safe group-wide fix. This completeness flag changes the compiler-driver protocol from 9 to 10.

Add graph-level and end-to-end fix regressions and update the configuration, architecture, and protocol documentation. The full test suite, Clippy, Rustfmt, Prettier, and a Ruff workspace run without its 13 temporary uniform-field overrides pass.

Base automatically changed from charlie/fix-doctest-package-collisions to main July 31, 2026 11:00
@charliermarsh
charliermarsh force-pushed the charlie/fix-uniform-field-visibility-ruff branch from 8373739 to ab95fa1 Compare July 31, 2026 11:11
@charliermarsh charliermarsh changed the title Preserve uniform restricted field visibility Reduce uniform field visibility together Jul 31, 2026
@charliermarsh
charliermarsh force-pushed the charlie/fix-uniform-field-visibility-ruff branch from ab95fa1 to c73a0a0 Compare July 31, 2026 11:12
@charliermarsh
charliermarsh marked this pull request as ready for review July 31, 2026 14:07
@charliermarsh
charliermarsh merged commit a134d1f into main Jul 31, 2026
14 checks passed
@charliermarsh
charliermarsh deleted the charlie/fix-uniform-field-visibility-ruff branch July 31, 2026 14:08
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.

1 participant