You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Live dbg! in privacy.rs writes to stderr in released builds when private_constants is configured #49
Found by @dduugg while reviewing #45. Pre-existing and unrelated to that PR.
src/packs/checker/privacy.rs:64 has a live dbg! that writes to stderr on every privacy check for a pack configured with private_constants, including in released builds:
It fires once per checked reference, so on a large tree using private_constants it is a lot of stderr noise, and it leaks internal file and line numbers into user-facing output.
Why it survived
No fixture in tests/fixtures/ configures private_constants, so nothing in the suite exercises this branch. grep -rl private_constants tests/fixtures/ returns nothing, against three hits under src/. Worth a fixture alongside the removal, since the surrounding logic (constant_is_private versus constant_is_in_private_namespace) is currently untested too.
Fix
Delete the line. Happy to send a PR with a fixture that covers the branch if that would be useful.
Activity
Remove stray dbg! from the privacy checker (rubyatscale#50)