Skip to content

Language server not providing hints in nested manifest files. #139

@dhollinger

Description

@dhollinger

What Versions are you running?

OS Version: Pop!_OS 19.04 (Ubuntu derivative)
VSCode Version: 1.34.0
Puppet Extension Version: 0.18.0
Puppet Agent Version: 6.4.2
PDK Version (if applicable): 1.10.0

What You Are Seeing?

In manifests within directories nested in the manifests directory, the language server is unable to find and suggest/autocomplete even basic Puppet resources, let alone module-specific classes, templates, or defines.

Directory structure of manifests:

rsyslog_dir_structure

rsyslog_manifests_dir

VS Code:

https://gfycat.com/DazzlingImaginaryCony

Neovim:

(NOTE: The hints that DO show up are from @rodjek's plugin. I.E. the [S] vs the [LS])

https://gfycat.com/AppropriateEvilAmethystsunbird

What is Expected?

Nested manifests should be aware of all core puppet resources, defines, and functions.
All manifests should be aware of all dependencies installed into the moduledir defined in the Puppet language server settings.

How Did You Get This To Happen? (Steps to Reproduce)

Open a manifest in a directory nested within the module's top level manifests/ directory.

Output Log

DEBUG: 2019-06-04T09:52:20.572Z Registered extension.pdkNewModule command
DEBUG: 2019-06-04T09:52:20.572Z Registered extension.pdkNewClass command
DEBUG: 2019-06-04T09:52:20.572Z Registered extension.pdkNewTask command
DEBUG: 2019-06-04T09:52:20.572Z Registered extension.pdkValidate command
DEBUG: 2019-06-04T09:52:20.572Z Registered extension.pdkTestUnit command
DEBUG: 2019-06-04T09:52:20.573Z Found a valid Puppet installation at /opt/puppetlabs/pdk/puppet
DEBUG: 2019-06-04T09:52:20.573Z Setting status bar to Initializing
DEBUG: 2019-06-04T09:52:20.573Z Configuring language client options
DEBUG: 2019-06-04T09:52:20.573Z Creating server options
DEBUG: 2019-06-04T09:52:20.573Z [getRubyEnvFromPDK] Using environment variable DEVKIT_BASEDIR=/opt/puppetlabs/pdk
DEBUG: 2019-06-04T09:52:20.573Z [getRubyEnvFromPDK] Using environment variable GEM_HOME=/opt/puppetlabs/pdk/share/cache/ruby/2.5.0
DEBUG: 2019-06-04T09:52:20.573Z [getRubyEnvFromPDK] Using environment variable GEM_PATH=/opt/puppetlabs/pdk/private/ruby/2.5.3/lib/ruby/gems/2.5.0:/opt/puppetlabs/pdk/share/cache/ruby/2.5.0:/opt/puppetlabs/pdk/private/puppet/ruby/2.5.0
DEBUG: 2019-06-04T09:52:20.573Z [getRubyEnvFromPDK] Using environment variable RUBY_DIR=/opt/puppetlabs/pdk/private/ruby/2.5.3
DEBUG: 2019-06-04T09:52:20.573Z [getRubyEnvFromPDK] Using environment variable RUBYLIB=/opt/puppetlabs/pdk/lib:
DEBUG: 2019-06-04T09:52:20.573Z [getRubyEnvFromPDK] Using environment variable PATH=/opt/puppetlabs/pdk/bin:/opt/puppetlabs/pdk/private/ruby/2.5.3/bin:/home/dhollinger/.local/bin:/home/dhollinger/bin:/home/dhollinger/.asdf/shims:/home/dhollinger/.asdf/bin:/home/dhollinger/.bin:/home/dhollinger/.local/bin:/home/dhollinger/bin:/home/dhollinger/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/puppetlabs/bin:/home/dhollinger/.local/bin:/home/dhollinger/bin:/usr/local/sbin:/home/dhollinger/.asdf/installs/golang/1.11.5/go/bin/bin:/home/dhollinger/.asdf/installs/golang/1.12.4/go/bin:/home/dhollinger/.fzf/bin:/home/dhollinger/.pulumi/bin:/home/dhollinger/.local/bin:/home/dhollinger/bin:/usr/local/sbin:/home/dhollinger/.asdf/installs/golang/1.11.5/go/bin/bin:/home/dhollinger/.asdf/installs/golang/1.12.4/go/bin:/home/dhollinger/.pulumi/bin
DEBUG: 2019-06-04T09:52:20.573Z [getRubyEnvFromPDK] Using environment variable RUBYOPT=rubygems
DEBUG: 2019-06-04T09:52:20.573Z [getRubyEnvFromPDK] Editor Services will invoke with: /opt/puppetlabs/pdk/private/ruby/2.5.3/bin/ruby /home/dhollinger/.vscode/extensions/jpogran.puppet-vscode-0.18.0/vendor/languageserver/puppet-languageserver --stdio --timeout=10 --local-workspace=/home/dhollinger/workspace/vox/rsyslog --puppet-settings=--modulePath,/home/dhollinger/.puppetlabs/etc/code/modules:/home/dhollinger/.puppetlabs/etc/code/environments/production/modules
DEBUG: 2019-06-04T09:52:20.573Z Creating language client
DEBUG: 2019-06-04T09:52:20.575Z Setting status bar to Initialization Complete
DEBUG: 2019-06-04T09:52:20.575Z Configuring Local::stdio connection handler
DEBUG: 2019-06-04T09:52:20.575Z Setting status bar to Starting languageserver
DEBUG: 2019-06-04T09:52:20.575Z Registered Format Document provider
DEBUG: 2019-06-04T09:52:20.575Z Registered extension.puppetShowNodeGraphToSide command
DEBUG: 2019-06-04T09:52:20.575Z Registered onDidSaveTextDocument for node graph event handler
DEBUG: 2019-06-04T09:52:20.575Z Registered DebugAdapterDescriptorFactory for Puppet
DEBUG: 2019-06-04T09:52:20.575Z Registered DebugConfigurationProvider for Puppet
DEBUG: 2019-06-04T09:52:21.141Z pdk shell started, pid: 29882
DEBUG: 2019-06-04T09:52:21.572Z Setting status bar to Loading Puppet
DEBUG: 2019-06-04T09:52:22.573Z Setting status bar to 6.4.0
DEBUG: 2019-06-04T09:52:23.573Z Setting status bar to 6.4.0
DEBUG: 2019-06-04T09:52:24.573Z Setting status bar to 6.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions