Generate shellvar through block-setter calls and guarded raises #19

Merged
benvin merged 4 commits from benvin/gentypes-shellvar into main 2026-11-10 21:45:40 +11:00
Member

augeasproviders_shellvar guards its ensurable with block if block_given?, raises at load unless Puppet::Type.type(:augeasprovider) exists, and calls the parent's block-setter class methods (lens { ... }), so shellvar skips today.

  • run a class method called with a block when its parameters are optional literals and its body only branches on them and sets ivars puppet never reads
  • run a top-level raise ... if/unless <cond> only when the condition holds, and evaluate nil?
  • treat a statement guarded by if block_given? outside a method as never running
  • join File.join parts in linear time
  • vendor the shellvar fixture and bump gentypes.Version to 13
augeasproviders_shellvar guards its ensurable with `block if block_given?`, raises at load unless `Puppet::Type.type(:augeasprovider)` exists, and calls the parent's block-setter class methods (`lens { ... }`), so shellvar skips today. - run a class method called with a block when its parameters are optional literals and its body only branches on them and sets ivars puppet never reads - run a top-level `raise ... if/unless <cond>` only when the condition holds, and evaluate `nil?` - treat a statement guarded by `if block_given?` outside a method as never running - join `File.join` parts in linear time - vendor the shellvar fixture and bump gentypes.Version to 13
benvin changed target branch from benvin/gentypes-augeas to main 2026-11-09 23:49:31 +11:00
benvin added 3 commits 2026-11-09 23:49:31 +11:00
A class method called with a block runs when its parameters are optional
literals and its body only branches on them and stores ivars puppet never
reads. A top-level raise runs only when its if/unless condition holds, nil?
is evaluated, and a statement guarded by block_given? outside a method never
runs. Generates shellvar.
Join File.join parts in linear time
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
081ea12714
unkin-agent added 1 commit 2026-11-10 00:15:36 +11:00
Merge remote-tracking branch 'origin/main' into benvin/gentypes-shellvar
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
6622d409cc
benvin merged commit 9dd08d5360 into main 2026-11-10 21:45:40 +11:00
benvin deleted branch benvin/gentypes-shellvar 2026-11-10 21:45:40 +11:00
This repo is archived. You cannot comment on pull requests.