Closed tmu-sprd closed 2 years ago
Adding facter as a requirement, it works:
diff --git a/lib/puppet_languageserver.rb b/lib/puppet_languageserver.rb
index 907ab3a..369ea6c 100644
--- a/lib/puppet_languageserver.rb
+++ b/lib/puppet_languageserver.rb
@@ -7,6 +7,7 @@ begin
require 'puppet_editor_services'
require 'optparse'
require 'logger'
+ require 'facter'
ensure
$VERBOSE = original_verbose
end
~/git/puppet-editor-services √$ ruby ./puppet-languageserver --debug=stdout
I, [2021-09-20T13:56:45.798303 #9121] INFO -- : Language Server is v1.2.0
D, [2021-09-20T13:56:45.798340 #9121] DEBUG -- : Loading gems...
I, [2021-09-20T13:56:46.173832 #9121] INFO -- : Using Puppet v7.11.0
I, [2021-09-20T13:56:46.173862 #9121] INFO -- : Using Facter v4.2.4
D, [2021-09-20T13:56:46.173893 #9121] DEBUG -- : Detected additional puppet settings []
I, [2021-09-20T13:56:46.179001 #9121] INFO -- : Initializing settings...
I, [2021-09-20T13:56:46.179441 #9121] INFO -- : Starting RPC Server...
D, [2021-09-20T13:56:46.179567 #9121] DEBUG -- : Using TCP Server
D, [2021-09-20T13:56:46.180584 #9121] DEBUG -- : TCPSRV: Services running. Press ^C to stop
D, [2021-09-20T13:56:46.180602 #9121] DEBUG -- : TCPSRV: Will stop the server in 10 seconds if no connection is made.
D, [2021-09-20T13:56:46.180608 #9121] DEBUG -- : TCPSRV: Will stop the server when client disconnects
LANGUAGE SERVER RUNNING localhost:35595
D, [2021-09-20T13:56:46.180687 #9121] DEBUG -- : TCPSRV: Started listening on localhost:35595.
D, [2021-09-20T13:56:56.191759 #9121] DEBUG -- : TCPSRV: No connection has been received in 10 seconds. Shutting down server.
D, [2021-09-20T13:56:56.191801 #9121] DEBUG -- : TCPSRV: Stopping services
D, [2021-09-20T13:56:56.191816 #9121] DEBUG -- : TCPSRV: Stopped listening on localhost:35595
D, [2021-09-20T13:56:56.191823 #9121] DEBUG -- : TCPSRV: Started shutdown process. Press ^C to force quit.
D, [2021-09-20T13:56:56.191827 #9121] DEBUG -- : TCPSRV: Stopping services
D, [2021-09-20T13:56:56.191834 #9121] DEBUG -- : TCPSRV: Waiting for workers to cycle down
I, [2021-09-20T13:56:56.206028 #9121] INFO -- : Language Server exited.
@tmu-sprd thanks for bringing this to our attention, adding facter does indeed allow the server to come up however there are some additional issues with the new facter implementation which we need to solve before we have a fix.
Describe the Bug
Using VSCode 1.60.1 with Puppet extension 1.3.0. Having Puppet 7.11.0 installed, the Languageserver for puppet fails to start with this error:
Downgrading Puppet to 7.10.0 fixes this.
Expected Behavior
The Languageserver works with Puppet 7.11.0 installed.
Steps to Reproduce
Steps to reproduce the behavior:
gem install puppet
gem uninstall puppet
gem install puppet -v 7.10.0
Edit: Same applies to instructions in Readme:
git clone
,cd
,bundle install
,bundle exec rake gem_revendor
With 7.10.0 it works:
git clone
,cd
,PUPPET_GEM_VERSION="7.10.0" bundle install
,PUPPET_GEM_VERSION="7.10.0" bundle exec rake gem_revendor
Environment
Additional Context
Just a guess: Puppet 7.11.0 introduced support for multiple Facter implementations at Puppet initialization: PUP-11216. Can't tell, if this is causing the issue.