Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(CAT-1493) - Fix missing file resource type parameters #353

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

jordanbreen28
Copy link
Contributor

@jordanbreen28 jordanbreen28 commented Oct 26, 2023

Summary

Prior to this PR, when using the autocompletion feature of puppet-editor-services, the file resource type would be missing some parameters/properties in the dropdown completion list.

It was found that this was due to the way the file resource type was structured in the puppet source code. The type definitions can be found in both /lib/puppet/type and /lib/puppet/type/file/*.rb.

The way we can work around this is by altering the search glob, and combining the type definitions into one single file. This file is then deleted on completion.

Additional Context

Before:
Pasted Graphic 1
After:
Pasted Graphic

We also manually store the type source and calling source, as this allows users to still avail of the Go to definition feature, which will redirect them to lib/puppet/type/file.rb.

Related Issues (if any)

Fixes #349

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified.

@jordanbreen28 jordanbreen28 force-pushed the CAT-1493-fix_missing_parameters branch 10 times, most recently from 9932f34 to 31d7eb8 Compare October 27, 2023 12:45
Prior to this commit, when using the autocompletion feature of
puppet-editor-services, the file resource type would be missing some
parameters/properties in the dropdown completion list.

It was found that this was due to the way the file resource type was
structured in the puppet source code. The type defintion can be found in
both /lib/puppet/type and /lib/puppet/type/file/.

The way we can work around this is by altering the search glob,
and combining the type defintions into one single file. This file is
then deleted on completion.
@jordanbreen28 jordanbreen28 force-pushed the CAT-1493-fix_missing_parameters branch 3 times, most recently from 3a3919f to 7eb1764 Compare October 27, 2023 12:54
@jordanbreen28 jordanbreen28 marked this pull request as ready for review October 27, 2023 12:56
@jordanbreen28 jordanbreen28 requested a review from a team as a code owner October 27, 2023 12:56
@david22swan david22swan merged commit d68eab4 into main Oct 27, 2023
12 checks passed
@david22swan david22swan deleted the CAT-1493-fix_missing_parameters branch October 27, 2023 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Various parameters do not show up for certain modules
2 participants