-
Notifications
You must be signed in to change notification settings - Fork 142
Closed
Labels
Description
Describe the Bug
Enabling disable_legacy_facts creates a Gemfile that specifies contradictory version requirements. Specifically, it includes the
puppet-lint-legacy_facts-check gem and voxpupuli-puppet-lint-plugins ~> 4.0. The voxpupuli gem requires puppet-lint ~> 3.1, but puppet-lint-legacy_facts-check is incompatible with that version.
Note: puppet-lint-legacy_facts-check has been merged into puppet-lint (puppetlabs/puppet-lint#85, mmckinst/puppet-lint-legacy_facts-check#41), so the way this works probably needs to change regardless.
Expected Behavior
Setting disable_legacy_facts to true should result in a Gemfile that allows normal usage. Running lints should check for legacy facts.
Steps to Reproduce
❯ pdk new module --template-url https://github.com/puppetlabs/pdk-templates --skip-interview dp-foobar foobar
❯ cd foobar
❯ pdk validate
[ ...success... ]
❯ { echo 'common:' ; echo ' disable_legacy_facts: true' ; } >.sync.yml
❯ pdk update --force
[ ...success... ]
❯ pdk validate
pdk (INFO): Using Ruby 2.7.7
pdk (INFO): Using Puppet 7.22.0
pdk (INFO): Running all available validators...
pdk (FATAL): Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
The dependency rb-readline (= 0.5.5) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mswin32, x86-mingw32, x64-mingw32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mswin32 x86-mingw32 x64-mingw32`.
Bundler could not find compatible versions for gem "puppet":
In Gemfile:
puppet (= 7.22.0)
puppet_litmus (< 1.0.0) was resolved to 0.34.6, which depends on
bolt (~> 3.0) was resolved to 3.27.1, which depends on
puppet (>= 6.18.0)
puppet-debugger (~> 1.0) was resolved to 1.3.0, which depends on
puppet (>= 5.5)
rspec-puppet-facts (~> 2.0) was resolved to 2.0.5, which depends on
puppet
Bundler could not find compatible versions for gem "puppet-lint":
In Gemfile:
puppet-lint-legacy_facts-check was resolved to 1.0.2, which depends on
puppet-lint (~> 2.0)
voxpupuli-puppet-lint-plugins (~> 4.0) was resolved to 4.0.0, which depends on
puppet-lint (~> 3.1)
Bundler could not find compatible versions for gem "r10k":
In Gemfile:
puppet_litmus (< 1.0.0) was resolved to 0.34.6, which depends on
bolt (~> 3.0) was resolved to 3.27.1, which depends on
r10k (~> 3.10)
puppet_litmus (< 1.0.0) was resolved to 0.34.6, which depends on
r10k (= 3.15.1)
Bundler could not find compatible versions for gem "rubocop":
In Gemfile:
rubocop (= 1.6.1)
rubocop-performance (= 1.9.1) was resolved to 1.9.1, which depends on
rubocop (>= 0.90.0, < 2.0)
rubocop-rspec (= 2.0.1) was resolved to 2.0.1, which depends on
rubocop (~> 1.0)
pdk (FATAL): Unable to resolve Gemfile dependencies.
Environment
- PDK 2.6.1
- macOS 13.2.1
Tangentially related open PR: #460