## Summary `Facter::Util::Resolution` publicly exposes compatibility command-execution methods and marks that compatibility block as deprecated. ## Evidence - `lib/facter/custom_facts/util/resolution.rb:30` marks compatibility exposure as deprecated. - `lib/facter/custom_facts/util/resolution.rb:33` exposes `public :which, :exec` from `Facter::Core::Execution`. - Inline comment states this was a compatibility bridge after extraction to `Facter::Core::Execution`. ## Proposed Change - Remove deprecated class-level exposure of `which` and `exec` on `Facter::Util::Resolution`. - Require callers to use `Facter::Core::Execution` directly. ## Compatibility / Risk - Medium risk for older custom facts invoking `Facter::Util::Resolution.exec/which`. - `exec` removal aligns with separate deprecation issue for `Facter::Core::Execution.exec` (#88). ## Implementation Notes - Audit internal and fixture call sites for `Facter::Util::Resolution.exec/which`. - Keep `with_env` exposure only if still required and intentionally supported. - Coordinate rollout with `Execution.exec` removal to avoid partial breakage. ## Acceptance Criteria - `Facter::Util::Resolution` no longer exposes deprecated `exec`/`which` compatibility methods. - No internal code path depends on these compatibility methods. - Documentation directs consumers to supported execution APIs. ## Suggested Tests - Custom fact execution tests using supported API paths. - Negative tests for removed compatibility methods if explicit failure behavior is desired.
Activity
silug commentedon Feb 24, 2026
Marked deprecated in documentation in 757b458.
This also likely needs an explicit deprecation warning like #88.
Remove deprecated exec/which exposure from Facter::Util::Resolution
Remove deprecated Facter::Core::Execution.exec and Resolution compati…
Remove deprecated Facter::Core::Execution.exec and Resolution compati…
jcpunk commentedon Apr 15, 2026
I have a number of custom facts that use this path.
If there is a clear migration snippet posted, I won't block anything, but this will take some doing on my end.
deprecation: add runtime warnings to deprecated exec/which methods