Skip to content

deprecation: add runtime warnings to deprecated exec/which methods#121

Merged
bastelfreak merged 1 commit into
OpenVoxProject:mainfrom
silug:deprecation-warnings-exec-which
Jul 13, 2026
Merged

deprecation: add runtime warnings to deprecated exec/which methods#121
bastelfreak merged 1 commit into
OpenVoxProject:mainfrom
silug:deprecation-warnings-exec-which

Conversation

@silug

@silug silug commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Short description

Add explicit runtime deprecation warnings (via Facter.warnonce) to methods that are slated for removal in a future major version:

  • Facter::Core::Execution.exec: warn callers to use .execute instead
  • Facter::Util::Resolution.exec: replaced bare public :exec with an explicit method that warns and delegates to Facter::Core::Execution
  • Facter::Util::Resolution.which: same treatment as .exec above

Specs updated to assert the deprecation warning is emitted; new specs added for the Resolution class-level deprecated methods.

References #88, #89

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document and added a Signed-off-by annotation to each of my commits
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@bastelfreak bastelfreak added the backwards-incompatible This change will lead to a major version bump for the next release label Jul 13, 2026
@bastelfreak

Copy link
Copy Markdown
Contributor

@silug can you please rebase and do --signoff?

@silug silug marked this pull request as ready for review July 13, 2026 19:23
Add explicit runtime deprecation warnings (via Facter.warnonce) to
methods that are slated for removal in a future major version:

- Facter::Core::Execution.exec: warn callers to use .execute instead
- Facter::Util::Resolution.exec: replaced bare public :exec with an
  explicit method that warns and delegates to Facter::Core::Execution
- Facter::Util::Resolution.which: same treatment as .exec above

Specs updated to assert the deprecation warning is emitted; new specs
added for the Resolution class-level deprecated methods.

References OpenVoxProject#88, OpenVoxProject#89

Signed-off-by: Steven Pritchard <steven.pritchard@gmail.com>
@silug silug force-pushed the deprecation-warnings-exec-which branch from 5c356cd to bb9e71b Compare July 13, 2026 19:40
@bastelfreak bastelfreak enabled auto-merge July 13, 2026 20:03
@bastelfreak bastelfreak merged commit 172696d into OpenVoxProject:main Jul 13, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards-incompatible This change will lead to a major version bump for the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants