The Language Server Sidecar needs to support both Puppet 5 and Puppet 6. Now
that the puppet-strings feature is becoming mainstream, the puppet-strings
code also needs to to support Puppet 5.
Unfortunately the Loaders in Puppet 5 are different than Puppet 6 therefore the
Loader manipulation etc. can not work. But using the loaders is actually very
complicated and could be prone to error in Puppet 7 and beyond.
This commit:
Drops the Puppet version restriction from Puppet 6 down to Puppet 5
Removes the Loader code and monkey patches
Uses our own PuppetPathFinder to find files to parse which is much simplier
to reason and understand. Note that the integration and acceptance tests prove
that this class works similarly to the Puppet 6 Loader style.
The retrieve_default_data_types is modified becuase the previous code using
the TypeFactory as not working in Puppet 5. Instead we now look at the Ruby
constants in the Puppet::Pops::Types namespace for anything that is an actual
Puppet DataType.
Now that puppet-strings is used for metadata information, support for Puppet 4
must be removed. Ths commit removes Puppet 4 from the testing matrix and
modifies the Debug Server, Language Server and Language Server Sidecar to
terminate early with an error if run under Puppet 4.
[x] Vendor in PuppetStrings
[x] Add the vendored puppetstrings (and yard) gem to the LOADPATH
[x] Remove requirement for puppetstrings gem for the feature flag because it's now always there
Fixes #252
The Language Server Sidecar needs to support both Puppet 5 and Puppet 6. Now that the puppet-strings feature is becoming mainstream, the puppet-strings code also needs to to support Puppet 5.
Unfortunately the Loaders in Puppet 5 are different than Puppet 6 therefore the Loader manipulation etc. can not work. But using the loaders is actually very complicated and could be prone to error in Puppet 7 and beyond.
This commit:
PuppetPathFinder
to find files to parse which is much simplier to reason and understand. Note that the integration and acceptance tests prove that this class works similarly to the Puppet 6 Loader style.retrieve_default_data_types
is modified becuase the previous code using the TypeFactory as not working in Puppet 5. Instead we now look at the Ruby constants in the Puppet::Pops::Types namespace for anything that is an actual Puppet DataType.Now that puppet-strings is used for metadata information, support for Puppet 4 must be removed. Ths commit removes Puppet 4 from the testing matrix and modifies the Debug Server, Language Server and Language Server Sidecar to terminate early with an error if run under Puppet 4.