Skip to content

[Deprecation] Facter::Util::Resolution Class-Level exec/which Exposure #89

Open

Description

@silug

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

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

  1. silug commented on Feb 24, 2026

    @silug
    ContributorAuthor

    Marked deprecated in documentation in 757b458.

    This also likely needs an explicit deprecation warning like #88.

  2. added
    deprecationThis issue pertains to an item/topic which has been deprecated
    on Mar 6, 2026
  3. added 2 commits that reference this issue on Apr 13, 2026
    1a9c887
    fa5f8af
  4. jcpunk commented on Apr 15, 2026

    @jcpunk
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    deprecationThis issue pertains to an item/topic which has been deprecated

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions