fix: honor deprecated experimental flags instead of ignoring them - #532
not-matthias wants to merge 1 commit into
Conversation
|
Merging this PR will not alter performance
|
`--experimental-cycle-estimation` and `--experimental-exclude-allocations` were parsed but deliberately dropped, so anyone still passing `--experimental-exclude-allocations` silently lost allocation exclusion. Both now feed their graduated counterparts and warn that they are deprecated and will be removed in a future release.
1cf5a8b to
e11c9df
Compare
| log::warn!( | ||
| "{flag} is deprecated and will be removed in a future release: use {new_flag} instead." | ||
| ); |
There was a problem hiding this comment.
Deprecation warnings are suppressed
For run and exec, warn_if_deprecated() runs before those commands initialize their logger. As a result, log::warn! uses the no-op logger, so users who pass either deprecated flag do not see the promised migration warning. Keep this warning on a pre-initialization output path or emit it after logger setup.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/cli/experimental.rs
Line: 92-94
Comment:
**Deprecation warnings are suppressed**
For `run` and `exec`, `warn_if_deprecated()` runs before those commands initialize their logger. As a result, `log::warn!` uses the no-op logger, so users who pass either deprecated flag do not see the promised migration warning. Keep this warning on a pre-initialization output path or emit it after logger setup.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
--experimental-cycle-estimationand--experimental-exclude-allocationswere parsed but deliberately dropped. Since--exclude-allocationsdefaults tofalse, anyone still passing the old flag silently lost allocation exclusion.Both now feed their graduated counterparts, and the warning states the truth instead of "has no effect":
Closes COD-3511