Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8493

The differences between the vendored semantic_puppet and the original make it impossible to swap in the original



    • Bug
    • Status: Closed
    • Normal
    • Resolution: Incomplete
    • None
    • None
    • None
    • None
    • Needs Assessment


      According to https://github.com/puppetlabs/puppet/blob/5.4.x/lib/puppet/vendor.rb#L20-L24 any libraries that we vendor should not be modified from the original source. The intention is that a distro can swap in a system level package supplying the library and have it just work.

      That is not possible with semantic_puppet. Here (https://github.com/puppetlabs/puppet/blob/5.4.x/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb#L65), you can see self.parse takes two arguments, one of which has a default. It has been that way since https://github.com/puppetlabs/puppet/commit/a723e23bd238ba5bf69e1d3e959b6aa93ec18211 which was released in 4.10.5. The original gem has a single arity version of self.parse (https://github.com/puppetlabs/semantic_puppet/blame/master/lib/semantic_puppet/version_range.rb#L64) in its latest release. Those methods are marked public in both cases.

      If a distro removed the vendored copy, as we suggest should be possible in vendor.rb, any calls that pass two arguments to self.parse will fail with an arity mismatch as the upstream version only takes one argument.

      If the behavior that exists in the vendored copy from puppet is desirable, it should be added to the source gem. Really we shouldn't be vendoring it at all, but if there are required changes to it they should be released in the source gem first before coming across to puppet's copy.


        Issue Links



              Unassigned Unassigned
              matthaus Past Haus
              0 Vote for this issue
              4 Start watching this issue



                Zendesk Support