openvox-editor-services 3.1.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +46 -12
  3. data/Gemfile +16 -13
  4. data/README.md +147 -165
  5. data/RELEASE.md +1 -1
  6. data/lib/dsp/dsp_base.rb +2 -1
  7. data/lib/lsp/lsp_base.rb +2 -1
  8. data/lib/openvox_agent_rubygems.rb +2 -1
  9. data/lib/openvox_runtime.rb +5 -1
  10. data/lib/puppet-debugserver/debug_session/break_points.rb +1 -1
  11. data/lib/puppet-debugserver/debug_session/hook_handlers.rb +1 -1
  12. data/lib/puppet-languageserver/global_queues/single_instance_queue.rb +3 -0
  13. data/lib/puppet-languageserver/manifest/completion_provider.rb +1 -1
  14. data/lib/puppet-languageserver/manifest/format_on_type_provider.rb +3 -2
  15. data/lib/puppet-languageserver/manifest/hover_provider.rb +1 -1
  16. data/lib/puppet-languageserver/manifest/signature_provider.rb +3 -3
  17. data/lib/puppet-languageserver/manifest/validation_provider.rb +15 -3
  18. data/lib/puppet-languageserver/message_handler.rb +1 -1
  19. data/lib/puppet-languageserver/puppet_parser_helper.rb +9 -9
  20. data/lib/puppet-languageserver/puppetfile/validation_provider.rb +1 -1
  21. data/lib/puppet-languageserver/session_state/document_store.rb +5 -5
  22. data/lib/puppet-languageserver/session_state/language_client.rb +11 -11
  23. data/lib/puppet-languageserver/sidecar_protocol.rb +20 -11
  24. data/lib/puppet-languageserver-sidecar/cache/filesystem.rb +2 -2
  25. data/lib/puppet-languageserver-sidecar/puppet_helper.rb +5 -6
  26. data/lib/puppet-languageserver-sidecar/puppet_parser_helper.rb +4 -4
  27. data/lib/puppet-languageserver-sidecar/puppet_strings_helper.rb +2 -1
  28. data/lib/puppet-languageserver-sidecar/workspace.rb +2 -2
  29. data/lib/puppet_editor_services/handler/json_rpc.rb +3 -3
  30. data/lib/puppet_editor_services/protocol/debug_adapter_messages.rb +2 -1
  31. data/lib/puppet_editor_services/protocol/json_rpc_messages.rb +2 -1
  32. data/lib/puppet_editor_services/server/stdio.rb +2 -2
  33. data/lib/puppet_editor_services/server/tcp.rb +1 -4
  34. data/lib/puppet_editor_services/version.rb +1 -1
  35. data/lib/puppet_languageserver.rb +2 -0
  36. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45f1302baf3215f01f4a9c4addc74551d9ec009b2707f00a3bb0576ca98b0f4d
4
- data.tar.gz: f9559f9445a8db6bee287a416ef424cf7e880b10c3055d187e4f810b41556b01
3
+ metadata.gz: bdea88fc71917e7a0813d0ede0cd6baa82770a416a998a68ee5a6e6e781fe88d
4
+ data.tar.gz: 6de1fb9e00fdfe2dc9824d13d40283c605ef2c79e62452df2b0a7614b4cba634
5
5
  SHA512:
6
- metadata.gz: 063ffa9274f4b198a2e365dfa6034811ee55a69c3a9ac9c16613c09c8b08d97dc4f897824b5f3cd74fea1a3c5cd3b930ca04647bc6fbc4ec961e1e036288d6cd
7
- data.tar.gz: af25e6e058b839432325c8139becb1575f14c15e2017f655fffaa599c85e44bcd4d28cc3995e9374e1556d0f8fdebe162d4edf7b3d9fc90fb85314f8942a4a73
6
+ metadata.gz: cc271d47fb8bfbda55e0948dc08b3786818d14b5141b3fa85fe51fa76a55949ba4e964961296faee32c1276e8a97727765da76eb5888af5eda8faab9c8ae07b6
7
+ data.tar.gz: ceff85dbada907b81d0ee9f527e5af58cff47373048c8d8c6de16233968255b02bf74f90d1bb75339497f280d53e89fe65aeadefe5488aa2fa6dd7bde1592a21
data/CHANGELOG.md CHANGED
@@ -1,8 +1,42 @@
1
1
  # Changelog
2
2
 
3
- ## [3.1.1](https://github.com/voxpupuli/openvox-editor-services/tree/3.1.1) (2026-07-18)
3
+ ## [4.0.0](https://github.com/voxpupuli/openvox-editor-services/tree/4.0.0) (2026-11-06)
4
4
 
5
- [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/v3.1.0...3.1.1)
5
+ [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/v3.1.2...4.0.0)
6
+
7
+ **Breaking changes:**
8
+
9
+ - Use `openvox` namespace for settings [\#80](https://github.com/voxpupuli/openvox-editor-services/pull/80) ([jay7x](https://github.com/jay7x))
10
+
11
+ **Implemented enhancements:**
12
+
13
+ - honor client editor settings for formatting and folding [\#81](https://github.com/voxpupuli/openvox-editor-services/pull/81) ([jay7x](https://github.com/jay7x))
14
+
15
+ **Fixed bugs:**
16
+
17
+ - fix: prevent puppet-lint failures from crashing the language server [\#83](https://github.com/voxpupuli/openvox-editor-services/pull/83) ([jay7x](https://github.com/jay7x))
18
+
19
+ ## [v3.1.2](https://github.com/voxpupuli/openvox-editor-services/tree/v3.1.2) (2026-10-31)
20
+
21
+ [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/v3.1.1...v3.1.2)
22
+
23
+ **Fixed bugs:**
24
+
25
+ - fix: recognize packaged OpenVox Agent Ruby on Windows [\#71](https://github.com/voxpupuli/openvox-editor-services/pull/71) ([rwaffen](https://github.com/rwaffen))
26
+ - fix: Rubocop Lint/\* Offences [\#50](https://github.com/voxpupuli/openvox-editor-services/pull/50) ([rwaffen](https://github.com/rwaffen))
27
+ - fix: Incomplete string escaping or encoding [\#49](https://github.com/voxpupuli/openvox-editor-services/pull/49) ([rwaffen](https://github.com/rwaffen))
28
+ - fix: handle security/code-scanning/1 by using File instead of IO [\#47](https://github.com/voxpupuli/openvox-editor-services/pull/47) ([rwaffen](https://github.com/rwaffen))
29
+
30
+ **Merged pull requests:**
31
+
32
+ - docs: update readme to reflect the state of the gem [\#74](https://github.com/voxpupuli/openvox-editor-services/pull/74) ([rwaffen](https://github.com/rwaffen))
33
+ - ci: merge method is set by merge\_group automatically [\#46](https://github.com/voxpupuli/openvox-editor-services/pull/46) ([rwaffen](https://github.com/rwaffen))
34
+ - test: try merge queue [\#45](https://github.com/voxpupuli/openvox-editor-services/pull/45) ([rwaffen](https://github.com/rwaffen))
35
+ - add some meta updates: switch to renovate, remove pr template, extend release docs [\#17](https://github.com/voxpupuli/openvox-editor-services/pull/17) ([rwaffen](https://github.com/rwaffen))
36
+
37
+ ## [v3.1.1](https://github.com/voxpupuli/openvox-editor-services/tree/v3.1.1) (2026-07-18)
38
+
39
+ [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/v3.1.0...v3.1.1)
6
40
 
7
41
  **Fixed bugs:**
8
42
 
@@ -171,15 +205,15 @@
171
205
 
172
206
  ## [0.7.2](https://github.com/voxpupuli/openvox-editor-services/tree/0.7.2) (2017-10-27)
173
207
 
174
- [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/0.7.1...0.7.2)
208
+ [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/0.7.0...0.7.2)
175
209
 
176
- ## [0.7.1](https://github.com/voxpupuli/openvox-editor-services/tree/0.7.1) (2017-09-20)
210
+ ## [0.7.0](https://github.com/voxpupuli/openvox-editor-services/tree/0.7.0) (2017-09-20)
177
211
 
178
- [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/0.7.0...0.7.1)
212
+ [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/0.7.1...0.7.0)
179
213
 
180
- ## [0.7.0](https://github.com/voxpupuli/openvox-editor-services/tree/0.7.0) (2017-09-20)
214
+ ## [0.7.1](https://github.com/voxpupuli/openvox-editor-services/tree/0.7.1) (2017-09-20)
181
215
 
182
- [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/0.6.0...0.7.0)
216
+ [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/0.6.0...0.7.1)
183
217
 
184
218
  ## [0.6.0](https://github.com/voxpupuli/openvox-editor-services/tree/0.6.0) (2017-07-21)
185
219
 
@@ -195,15 +229,15 @@
195
229
 
196
230
  ## [0.4.5](https://github.com/voxpupuli/openvox-editor-services/tree/0.4.5) (2017-06-16)
197
231
 
198
- [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/0.4.2...0.4.5)
232
+ [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/0.4.0...0.4.5)
199
233
 
200
- ## [0.4.2](https://github.com/voxpupuli/openvox-editor-services/tree/0.4.2) (2017-06-16)
234
+ ## [0.4.0](https://github.com/voxpupuli/openvox-editor-services/tree/0.4.0) (2017-06-16)
201
235
 
202
- [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/0.4.0...0.4.2)
236
+ [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/0.4.2...0.4.0)
203
237
 
204
- ## [0.4.0](https://github.com/voxpupuli/openvox-editor-services/tree/0.4.0) (2017-06-16)
238
+ ## [0.4.2](https://github.com/voxpupuli/openvox-editor-services/tree/0.4.2) (2017-06-16)
205
239
 
206
- [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/804559931cdefe5364e463ee904f68c1a8d7ed39...0.4.0)
240
+ [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/804559931cdefe5364e463ee904f68c1a8d7ed39...0.4.2)
207
241
 
208
242
 
209
243
 
data/Gemfile CHANGED
@@ -9,23 +9,25 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org"
9
9
  # -=-=-=-=-=- WARNING -=-=-=-=-=-
10
10
 
11
11
  group :development do
12
- gem 'json', "< 2.8.0", :require => false
13
- gem 'openfact', '>= 5.1', '< 6', :require => false
12
+ # JSON 3 support requires keyword options in the sidecar/OpenVox JSON loaders
13
+ # and replacing JSON::PRETTY_STATE_PROTOTYPE in OpenVox's JSON dumper.
14
+ gem 'json', "< 3.0", :require => false
15
+ gem 'openfact', '>= 5.1', '< 7', :require => false
14
16
  gem 'openvox-strings', '~> 7.1', :require => false
15
17
  gem 'puppetfile-resolver', '~> 0.6.2', :require => false
16
18
  gem 'rake', '>= 10.4', :require => false
17
19
  gem 'rspec', '>= 3.2', :require => false
18
- gem 'rubocop-capybara', '~> 2.22.0', :require => false
19
- gem 'rubocop-factory_bot', '~> 2.27.0', :require => false
20
- gem 'rubocop-rspec_rails', '~> 2.31.0', :require => false
20
+ gem 'rubocop-capybara', '~> 3.1.0', :require => false
21
+ gem 'rubocop-factory_bot', '~> 2.28.0', :require => false
22
+ gem 'rubocop-rspec_rails', '~> 2.33.0', :require => false
21
23
  gem 'simplecov-console', :require => false
22
24
  gem 'simplecov', :require => false
23
25
  gem 'syslog', '~> 0.4', :require => false unless Gem.win_platform?
24
26
  gem 'voxpupuli-puppet-lint-plugins', '= 7.0.0', :require => false
25
27
  gem 'yard', '~> 0.9.28', :require => false
26
- gem "rubocop-performance", '~> 1.24.0', :require => false
27
- gem "rubocop-rspec", '~> 3.5.0', :require => false
28
- gem "rubocop", '~> 1.73.0', :require => false
28
+ gem "rubocop-performance", '~> 1.27.0', :require => false
29
+ gem "rubocop-rspec", '~> 3.10.0', :require => false
30
+ gem "rubocop", '~> 1.92.0', :require => false
29
31
 
30
32
  if ENV['OPENVOX_GEM_VERSION']
31
33
  gem 'openvox', ENV['OPENVOX_GEM_VERSION'], :require => false
@@ -38,11 +40,12 @@ group :development do
38
40
  gem 'CFPropertyList'
39
41
  end
40
42
 
41
- gem "win32-dir", "<= 0.4.9", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
42
- gem "win32-eventlog", "<= 0.6.5", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
43
- gem "win32-process", "<= 0.7.5", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
44
- gem "win32-security", "<= 0.2.5", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
45
- gem "win32-service", "<= 0.8.8", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
43
+ gem "win32-dir", "<= 0.7.2", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
44
+ gem "win32-eventlog", "<= 0.6.7", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
45
+ gem "win32-process", "<= 0.10.0", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
46
+ gem "win32-security", "<= 0.5.0", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
47
+ gem "win32-service", "<= 2.4.0", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
48
+ gem "win32ole", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
46
49
 
47
50
  # Gems for building release tarballs etc.
48
51
  gem "archive-zip", :require => false
data/README.md CHANGED
@@ -6,6 +6,7 @@ The internal `Puppet` Ruby namespace and `puppet/*` protocol methods are retaine
6
6
  - [OpenVox Editor Services](#openvox-editor-services)
7
7
  - [Requirements](#requirements)
8
8
  - [Setting up editor services for development](#setting-up-editor-services-for-development)
9
+ - [Build a local VSIX](#build-a-local-vsix)
9
10
  - [Language Server](#language-server)
10
11
  - [How to run the Language Server for Development](#how-to-run-the-language-server-for-development)
11
12
  - [How to run the Language Server in Production](#how-to-run-the-language-server-in-production)
@@ -26,123 +27,84 @@ The internal `Puppet` Ruby namespace and `puppet/*` protocol methods are retaine
26
27
  - [Other information](#other-information)
27
28
  - [Reporting bugs](#reporting-bugs)
28
29
  - [Development](#development)
29
- - [Why are there vendored gems and why only native ruby](#why-are-there-vendored-gems-and-why-only-native-ruby)
30
+ - [Packaging and runtime dependencies](#packaging-and-runtime-dependencies)
30
31
 
31
32
  ## Requirements
32
33
 
33
34
  - OpenVox 8 or above
34
- - Ruby 3.1 or above
35
+ - Ruby 3.4 or above
35
36
 
36
37
  ## Setting up editor services for development
37
38
 
38
- - Ensure a modern ruby is installed (3.4+)
39
- - The editor services support OpenVox 8.0.0 and above.
40
- - Clone this repository
39
+ Use Ruby 3.4 or above, then clone the repository and install the development dependencies:
41
40
 
42
- ```bash
43
- > git clone https://github.com/voxpupuli/openvox-editor-services.git
44
-
45
- > cd openvox-editor-services
41
+ ```shell
42
+ git clone https://github.com/voxpupuli/openvox-editor-services.git
43
+ cd openvox-editor-services
44
+ bundle install
45
+ bundle exec rake gem_revendor
46
46
  ```
47
47
 
48
- - Bundle the development gems
48
+ `gem_revendor` downloads runtime dependency sources and requires network access.
49
+ Run it before starting the servers from the checkout or running the test suites.
49
50
 
50
- ```bash
51
- > bundle install
51
+ The Gemfile accepts `OPENVOX_GEM_VERSION` to select the OpenVox dependency.
52
+ For example, to use the OpenVox 8 series as configured in CI:
52
53
 
53
- ... < lots of text >
54
+ ```shell
55
+ export OPENVOX_GEM_VERSION='~> 8.0'
56
+ bundle install
54
57
  ```
55
58
 
56
- - Installed vendored gems
59
+ Keep this variable set for subsequent `bundle exec` commands.
60
+ Without it, the Gemfile does not constrain the OpenVox version; Bundler resolves it using the available gems and lockfile.
61
+ When changing the requirement, run `bundle update openvox` if the existing lockfile does not satisfy it.
57
62
 
58
- ```bash
59
- > bundle exec rake gem_revendor
63
+ ## Build a local VSIX
60
64
 
61
- ... < lots of text >
65
+ To test the current editor-services checkout with the sibling `openvox-vscode` repository, run:
66
+
67
+ ```shell
68
+ ./scripts/build-local-vsix.sh
62
69
  ```
63
70
 
71
+ The script removes old local gem and VSIX build artifacts, builds the local gem, installs it and its dependencies into
72
+ the extension, compiles the extension, and creates
73
+ `../openvox-vscode/artifacts/openvox-vscode-local-<gem-version>.vsix`.
74
+ It requires Ruby 3.4 or newer and existing npm dependencies in `openvox-vscode`.
75
+ Set `RUBY`, `OPENVOX_VSCODE_DIR`, or `VSIX_OUTPUT` to override the detected Ruby, repository path, or output path.
76
+
64
77
  ## Language Server
65
78
 
66
79
  ### How to run the Language Server for Development
67
80
 
68
- By default the language server will stop if no connection is made within 10 seconds and will also stop after a client disconnects. Adding `--debug=stdout` will log messages to the console
81
+ By default the language server stops if no connection is made within 10 seconds or after a client disconnects.
82
+ Adding `--debug=stdout` logs diagnostic messages to the console.
83
+ The example below shows only the readiness message; the port is selected dynamically.
69
84
 
70
85
  ```bash
71
- > bundle exec ruby ./puppet-languageserver --debug=stdout
72
- I, [2018-12-05T15:19:51.853802 #28756] INFO -- : Language Server is v0.16.0
73
- I, [2018-12-05T15:19:51.854809 #28756] INFO -- : Using Puppet v5.5.8
74
- D, [2018-12-05T15:19:51.856726 #28756] DEBUG -- : Detected additional puppet settings []
75
- I, [2018-12-05T15:19:51.867798 #28756] INFO -- : Initializing Puppet Helper...
76
- D, [2018-12-05T15:19:51.867798 #28756] DEBUG -- : Initializing Document Store...
77
- I, [2018-12-05T15:19:51.868726 #28756] INFO -- : Initializing settings...
78
- I, [2018-12-05T15:19:51.870728 #28756] INFO -- : Starting RPC Server...
79
- D, [2018-12-05T15:19:51.870728 #28756] DEBUG -- : Using Simple TCP
80
- I, [2018-12-05T15:19:51.871729 #28756] INFO -- : Using Facter v2.5.1
81
- I, [2018-12-05T15:19:51.871729 #28756] INFO -- : Preloading Puppet Types (Async)...
82
- I, [2018-12-05T15:19:51.872728 #28756] INFO -- : Preloading Facter (Async)...
83
- I, [2018-12-05T15:19:51.873727 #28756] INFO -- : Preloading Functions (Async)...
84
- I, [2018-12-05T15:19:51.876727 #28756] INFO -- : Preloading Classes (Async)...
85
- D, [2018-12-05T15:19:51.876727 #28756] DEBUG -- : SidecarQueue Thread: Running sidecar ["ruby", "C:/Source/puppet-editor-services/puppet-languageserver-sidecar", "--action", "default_types", "--feature-flags="]
86
- D, [2018-12-05T15:19:51.899795 #28756] DEBUG -- : SidecarQueue Thread: Running sidecar ["ruby", "C:/Source/puppet-editor-services/puppet-languageserver-sidecar", "--action", "default_functions", "--feature-flags="]
87
- D, [2018-12-05T15:19:51.919794 #28756] DEBUG -- : TCPSRV: Services running. Press ^C to stop
88
- D, [2018-12-05T15:19:51.920795 #28756] DEBUG -- : TCPSRV: Will stop the server in 10 seconds if no connection is made.
89
- D, [2018-12-05T15:19:51.921809 #28756] DEBUG -- : TCPSRV: Will stop the server when client disconnects
86
+ > bundle exec ruby ./openvox-languageserver --debug=stdout
90
87
  LANGUAGE SERVER RUNNING localhost:55087
91
- D, [2018-12-05T15:19:51.923800 #28756] DEBUG -- : TCPSRV: Started listening on localhost:55087.
92
- A, [2018-12-05T15:19:54.520501 #28756] ANY -- : SidecarQueue Thread: Calling sidecar with --action default_functions --feature-flags= returned exitcode 0,
93
- D, [2018-12-05T15:19:54.532525 #28756] DEBUG -- : SidecarQueue Thread: default_functions returned 270 items
94
- D, [2018-12-05T15:19:54.533522 #28756] DEBUG -- : SidecarQueue Thread: Running sidecar ["ruby", "C:/Source/puppet-editor-services/puppet-languageserver-sidecar", "--action", "default_classes", "--feature-flags="]
95
- A, [2018-12-05T15:19:54.576503 #28756] ANY -- : SidecarQueue Thread: Calling sidecar with --action default_types --feature-flags= returned exitcode 0,
96
- D, [2018-12-05T15:19:54.638503 #28756] DEBUG -- : SidecarQueue Thread: default_types returned 81 items
97
- A, [2018-12-05T15:19:56.732112 #28756] ANY -- : SidecarQueue Thread: Calling sidecar with --action default_classes --feature-flags= returned exitcode 0,
98
- D, [2018-12-05T15:19:56.732112 #28756] DEBUG -- : SidecarQueue Thread: default_classes returned 0 items
99
- ...
100
- D, [2018-12-05T15:20:03.319045 #28756] DEBUG -- : TCPSRV: No connection has been received in 10 seconds. Shutting down server.
101
- D, [2018-12-05T15:20:03.320049 #28756] DEBUG -- : TCPSRV: Stopping services
102
- D, [2018-12-05T15:20:03.377052 #28756] DEBUG -- : TCPSRV: Stopped listening on localhost:55087
103
- D, [2018-12-05T15:20:03.377052 #28756] DEBUG -- : TCPSRV: Started shutdown process. Press ^C to force quit.
104
- D, [2018-12-05T15:20:03.378052 #28756] DEBUG -- : TCPSRV: Stopping services
105
- D, [2018-12-05T15:20:03.379050 #28756] DEBUG -- : TCPSRV: Waiting for workers to cycle down
106
- I, [2018-12-05T15:20:03.632011 #28756] INFO -- : Language Server exited.
107
88
  ```
108
89
 
109
90
  To make the server run continuously add `--timeout=0` and `--no-stop` to the command line. For example;
110
91
 
111
92
  ```bash
112
- > bundle exec ruby ./puppet-languageserver --debug=stdout --timeout=0 --no-stop
113
- I, [2018-12-05T15:20:56.302414 #29752] INFO -- : Language Server is v0.16.0
114
- I, [2018-12-05T15:20:56.303391 #29752] INFO -- : Using Puppet v5.5.8
115
- D, [2018-12-05T15:20:56.306343 #29752] DEBUG -- : Detected additional puppet settings []
116
- I, [2018-12-05T15:20:56.318333 #29752] INFO -- : Initializing Puppet Helper...
117
- D, [2018-12-05T15:20:56.318333 #29752] DEBUG -- : Initializing Document Store...
118
- I, [2018-12-05T15:20:56.319346 #29752] INFO -- : Initializing settings...
119
- I, [2018-12-05T15:20:56.321337 #29752] INFO -- : Starting RPC Server...
120
- D, [2018-12-05T15:20:56.321337 #29752] DEBUG -- : Using Simple TCP
121
- I, [2018-12-05T15:20:56.322332 #29752] INFO -- : Using Facter v2.5.1
122
- I, [2018-12-05T15:20:56.323335 #29752] INFO -- : Preloading Puppet Types (Async)...
123
- I, [2018-12-05T15:20:56.325337 #29752] INFO -- : Preloading Facter (Async)...
124
- I, [2018-12-05T15:20:56.326335 #29752] INFO -- : Preloading Functions (Async)...
125
- I, [2018-12-05T15:20:56.327333 #29752] INFO -- : Preloading Classes (Async)...
126
- ...
127
- D, [2018-12-05T15:20:56.365334 #29752] DEBUG -- : TCPSRV: Services running. Press ^C to stop
128
- LANGUAGE SERVER RUNNING localhost:55180
129
- D, [2018-12-05T15:20:56.374333 #29752] DEBUG -- : TCPSRV: Started listening on localhost:55180.
130
- ...
93
+ > bundle exec ruby ./openvox-languageserver --debug=stdout --timeout=0 --no-stop
94
+ LANGUAGE SERVER RUNNING localhost:55087
131
95
  ```
132
96
 
133
97
  ### How to run the Language Server in Production
134
98
 
135
- - Ensure that Puppet Agent is installed
136
- - [Linux](https://puppet.com/docs/puppet/latest/install_agents.html#install_nix_agents)
137
- - [Windows](https://puppet.com/docs/puppet/latest/install_agents.html#install_windows_agents)
138
- - [macOS](https://puppet.com/docs/puppet/latest/install_agents.html#install_mac_agents)
99
+ - Ensure that OpenVox Agent is installed
139
100
 
140
- - Run the `puppet-languageserver` with ruby
101
+ - Run the `openvox-languageserver` with ruby
141
102
 
142
- > On Windows you need to run ruby with the `Puppet Command Prompt` which can be found in the Start Menu. This enables the Puppet Agent ruby environment.
103
+ On Windows, run Ruby from the `OpenVox Command Prompt` in the Start Menu.
104
+ This enables the OpenVox Agent Ruby environment.
143
105
 
144
106
  ```bash
145
- > ruby puppet-languageserver
107
+ > ruby openvox-languageserver
146
108
  LANGUAGE SERVER RUNNING 127.0.0.1:55086
147
109
  ```
148
110
 
@@ -153,31 +115,35 @@ The IP Address and Port can be changed using the `--ip` and `--port` arguments r
153
115
  For example to listen on all interfaces on port 9000;
154
116
 
155
117
  ```bash
156
- > ruby ./puppet-languageserver --ip=0.0.0.0 --port=9000
118
+ > ruby ./openvox-languageserver --ip=0.0.0.0 --port=9000
157
119
  ```
158
120
 
159
121
  To change the protocol to STDIO, that is using STDOUT and STDIN, use the `--stdio` argument.
160
122
 
161
123
  ### Command line arguments
162
124
 
163
- ```bash
164
- Usage: puppet-languageserver.rb [options]
165
- -p, --port=PORT TCP Port to listen on. Default is random port
166
- -i, --ip=ADDRESS IP Address to listen on (0.0.0.0 for all interfaces). Default is localhost
167
- -c, --no-stop Do not stop the language server once a client disconnects. Default is to stop
168
- -t, --timeout=TIMEOUT Stop the language server if a client does not connection within TIMEOUT seconds. A value of zero will not timeout. Default is 10 seconds
169
- -d, --no-preload ** DEPRECATED ** Do not preload Puppet information when the language server starts. Default is to preload
170
- --debug=DEBUG Output debug information. Either specify a filename or 'STDOUT'. Default is no debug output
171
- -s, --slow-start Delay starting the Language Server until Puppet initialisation has completed. Default is to start fast
172
- --stdio Runs the server in stdio mode, without a TCP listener
173
- --enable-file-cache ** DEPRECATED ** Enables the file system cache for Puppet Objects (types, class etc.)
174
- --[no-]cache Enable or disable all caching inside the sidecar. By default caching is enabled.
175
- --feature-flags=FLAGS A list of comma delimited feature flags
176
- --openvox-version=TEXT The OpenVox Gem version to use
177
- --puppet-settings=TEXT Comma delimited list of settings to pass into Puppet e.g. --vardir,/opt/test-fixture
178
- --local-workspace=PATH The workspace or file path that will be used to provide module-specific functionality. Default is no workspace path.
179
- -h, --help Prints this help
180
- -v, --version Prints the Langauge Server version
125
+ Common options:
126
+
127
+ | Option | Behavior |
128
+ | --- | --- |
129
+ | `--ip=ADDRESS` | TCP listen address; defaults to `localhost`. |
130
+ | `--port=PORT` | TCP listen port; defaults to a randomly selected port. |
131
+ | `--stdio` | Use STDIN and STDOUT instead of TCP. |
132
+ | `--timeout=SECONDS` | Wait for a connection for up to 10 seconds by default; `0` disables this timeout. |
133
+ | `--no-stop` | Keep running after a client disconnects. |
134
+ | `--debug=PATH` | Write diagnostic logs to a file, or use `STDOUT` for console output. |
135
+ | `--[no-]cache` | Enable or disable sidecar caching; enabled by default. |
136
+ | `--openvox-version=VERSION` | Select an OpenVox gem version; `--puppet-version` is a compatibility alias. |
137
+ | `--puppet-settings=SETTINGS` | Pass comma-separated settings, such as `--vardir,/path/to/vardir`. |
138
+
139
+ `--no-preload` and `--slow-start` are deprecated.
140
+ `--enable-file-cache` and `--local-workspace` are deprecated and have no effect.
141
+ The client supplies the Language Server workspace; the Sidecar's `--local-workspace` option remains supported.
142
+
143
+ For the complete option list, run:
144
+
145
+ ```shell
146
+ bundle exec ruby ./openvox-languageserver --help
181
147
  ```
182
148
 
183
149
  ## Language Server Sidecar
@@ -200,52 +166,52 @@ Typically this only used by a developer to inspect what the Sidecar is doing.
200
166
  The `noop` action just outputs an empty JSON array but can be used to confirm that the Sidecar does not error while loading Puppet.
201
167
 
202
168
  ```bash
203
- > bundle exec ruby ./puppet-languageserver-sidecar --action=noop
169
+ > bundle exec ruby ./openvox-languageserver-sidecar --action=noop
204
170
  []
205
171
  ```
206
172
 
207
173
  #### Output all default Puppet Types
208
174
 
209
175
  ```bash
210
- > bundle exec ruby ./puppet-languageserver-sidecar --action=default_types
176
+ > bundle exec ruby ./openvox-languageserver-sidecar --action=default_types
211
177
  [{"key":"anchor","calling_source":"puppet/cache/lib/puppet/type/anchor.rb","sou ...
212
178
  ```
213
179
 
214
180
  #### Output all default Puppet Functions with a different puppet configuration, and debug information
215
181
 
216
182
  ```bash
217
- > bundle exec ruby ./puppet-languageserver-sidecar --action=default_types --puppet-settings=--vardir,./test/vardir,--confdir,./test/confdir --debug=STDOUT
218
- I, [2018-12-05T15:42:56.679837 #51864] INFO -- : Language Server Sidecar is v0.16.0
219
- I, [2018-12-05T15:42:56.679837 #51864] INFO -- : Using Puppet v5.5.8
220
- D, [2018-12-05T15:42:56.680820 #51864] DEBUG -- : Detected additional puppet settings ["--vardir", "./test/vardir", "--confdir", "./test/confdir"]
221
- D, [2018-12-05T15:42:56.690876 #51864] DEBUG -- : [PuppetHelper::load_functions] Starting
222
- D, [2018-12-05T15:42:56.752804 #51864] DEBUG -- : [PuppetLanguageServerSidecar::load] Loading lib/puppet/parser/functions/assert_type.rb from cache
223
- ...
224
- [{"key":"debug","calling_source":"lib/puppet/parser/functions.rb", ...
183
+ bundle exec ruby ./openvox-languageserver-sidecar --action=default_functions --puppet-settings=--vardir,./test/vardir,--confdir,./test/confdir --debug=STDOUT
225
184
  ```
226
185
 
186
+ This prints diagnostic messages followed by the JSON function data.
187
+ Use `--output=functions.json` to save the JSON separately from the diagnostic output.
188
+
227
189
  #### Output all Puppet Classes in a workspace directory
228
190
 
229
191
  ```bash
230
- > bundle exec ruby ./puppet-languageserver-sidecar --action=workspace_classes --local-workspace=C:\source\puppetlabs-sqlserver
192
+ > bundle exec ruby ./openvox-languageserver-sidecar --action=workspace_classes --local-workspace=C:\source\puppetlabs-sqlserver
231
193
  [{"key":"sqlserver::config","calling_source":"C:/Source/puppetlabs-sqlserver/manifests/config.pp","source":"C:/Source/puppetlabs-sqlserver/manifests/config.pp","line":25,"ch...
232
194
  ```
233
195
 
234
196
  ### Command line arguments for the Language Server Sidecar
235
197
 
236
- ```bash
237
- Usage: puppet-languageserver-sidecar.rb [options]
238
- -a, --action=NAME The action for the sidecar to take. Expected ["noop", "default_classes", "default_functions",
239
- "default_types", "node_graph", "resource_list", "workspace_classes", "workspace_functions", "workspace_types"]
240
- -c, --action-parameters=JSON JSON Encoded string containing the parameters for the sidecar action
241
- -w, --local-workspace=PATH The workspace or file path that will be used to provide module-specific functionality. Default is no workspace path
242
- -o, --output=PATH The file to save the output from the sidecar. Default is output to STDOUT
243
- -p, --puppet-settings=TEXT Comma delimited list of settings to pass into Puppet e.g. --vardir,/opt/test-fixture
244
- -f, --feature-flags=FLAGS A list of comma delimited feature flags to pass the the sidecar
245
- -n, --[no-]cache Enable or disable all caching inside the sidecar. By default caching is enabled.
246
- --debug=DEBUG Output debug information. Either specify a filename or 'STDOUT'. Default is no debug output
247
- -h, --help Prints this help
248
- -v, --version Prints the Langauge Server version
198
+ Common options:
199
+
200
+ | Option | Behavior |
201
+ | --- | --- |
202
+ | `--action=NAME` | Required action, such as `noop`, `default_functions`, or `workspace_classes`. |
203
+ | `--action-parameters=JSON` | Supply action parameters as a JSON string. |
204
+ | `--local-workspace=PATH` | Set the workspace or file path for module-specific actions. |
205
+ | `--output=PATH` | Save JSON output to a file; defaults to STDOUT. |
206
+ | `--puppet-settings=SETTINGS` | Pass comma-separated settings, such as `--vardir,/path/to/vardir`. |
207
+ | `--[no-]cache` | Enable or disable caching; enabled by default. |
208
+ | `--openvox-version=VERSION` | Select an OpenVox gem version; `--puppet-version` is a compatibility alias. |
209
+ | `--debug=PATH` | Write diagnostic logs to a file, or use `STDOUT` for console output. |
210
+
211
+ For all supported actions and options, run:
212
+
213
+ ```shell
214
+ bundle exec ruby ./openvox-languageserver-sidecar --help
249
215
  ```
250
216
 
251
217
  ## Debug Server
@@ -253,49 +219,32 @@ Usage: puppet-languageserver-sidecar.rb [options]
253
219
  ### How to run the Debug Server for Development
254
220
 
255
221
  By default the debug server will stop if no connection is made within 10 seconds and will also stop after a client disconnects.
256
- Adding `--debug=stdout` will log messages to the console
222
+ Adding `--debug=stdout` logs diagnostic messages to the console.
223
+ The examples below show only the readiness message; the port is selected dynamically.
257
224
 
258
225
  ```bash
259
- > bundle exec ruby ./puppet-debugserver --debug=stdout
260
- I, [2018-04-17T14:19:24.131869 #6940] INFO -- : Debug Server is v0.10.0
261
- I, [2018-04-17T14:19:24.132871 #6940] INFO -- : Starting RPC Server...
262
- D, [2018-04-17T14:19:24.135373 #6940] DEBUG -- : TCPSRV: Services running. Press ^C to stop
263
- D, [2018-04-17T14:19:24.135870 #6940] DEBUG -- : TCPSRV: Will stop the server in 10 seconds if no connection is made.
264
- D, [2018-04-17T14:19:24.135870 #6940] DEBUG -- : TCPSRV: Will stop the server when client disconnects
226
+ > bundle exec ruby ./openvox-debugserver --debug=stdout
265
227
  DEBUG SERVER RUNNING 127.0.0.1:8082
266
- D, [2018-04-17T14:19:24.136871 #6940] DEBUG -- : TCPSRV: Started listening on 127.0.0.1:8082.
267
- D, [2018-04-17T14:19:34.140900 #6940] DEBUG -- : TCPSRV: No connection has been received in 10 seconds. Shutting down server.
268
- D, [2018-04-17T14:19:34.140900 #6940] DEBUG -- : TCPSRV: Stopping services
269
- D, [2018-04-17T14:19:34.141400 #6940] DEBUG -- : TCPSRV: Stopped listening on 127.0.0.1:8082
270
- D, [2018-04-17T14:19:34.141900 #6940] DEBUG -- : TCPSRV: Started shutdown process. Press ^C to force quit.
271
- D, [2018-04-17T14:19:34.141900 #6940] DEBUG -- : TCPSRV: Stopping services
272
- D, [2018-04-17T14:19:34.142401 #6940] DEBUG -- : TCPSRV: Waiting for workers to cycle down
273
- I, [2018-04-17T14:19:34.150402 #6940] INFO -- : Debug Server exited.
274
228
  ```
275
229
 
276
- To make the server run continuously add `--timeout=0` to the command line. For example;
230
+ To wait for a client without a connection timeout, add `--timeout=0`.
231
+ The debug server still stops after the client disconnects.
277
232
 
278
233
  ```bash
279
- > bundle exec ruby ./puppet-debugserver --debug=stdout --timeout=0
280
- I, [2018-04-17T14:21:10.542332 #12424] INFO -- : Debug Server is v0.10.0
281
- I, [2018-04-17T14:21:10.543334 #12424] INFO -- : Starting RPC Server...
282
- D, [2018-04-17T14:21:10.545836 #12424] DEBUG -- : TCPSRV: Services running. Press ^C to stop
283
- D, [2018-04-17T14:21:10.546336 #12424] DEBUG -- : TCPSRV: Will stop the server when client disconnects
234
+ > bundle exec ruby ./openvox-debugserver --debug=stdout --timeout=0
284
235
  DEBUG SERVER RUNNING 127.0.0.1:8082
285
- D, [2018-04-17T14:21:10.546834 #12424] DEBUG -- : TCPSRV: Started listening on 127.0.0.1:8082.
286
- ...
287
236
  ```
288
237
 
289
238
  ### How to run the Debug Server for Production
290
239
 
291
240
  - Ensure that OpenVox Agent is installed
292
- - Run the `puppet-debugserver` with ruby
241
+ - Run the `openvox-debugserver` with ruby
293
242
 
294
243
  On Windows you need to run ruby with the `OpenVox Command Prompt` which can be found in the Start Menu.
295
244
  This enables the OpenVox Agent ruby environment.
296
245
 
297
246
  ```bash
298
- > ruby puppet-debugserver
247
+ > ruby openvox-debugserver
299
248
  DEBUG SERVER RUNNING 127.0.0.1:8082
300
249
  ```
301
250
 
@@ -303,14 +252,20 @@ Note the debug server will stop after 10 seconds if no client connection is made
303
252
 
304
253
  ### Command line arguments for the Debug Server
305
254
 
306
- ```bash
307
- Usage: puppet-debugserver.rb [options]
308
- -p, --port=PORT TCP Port to listen on. Default is random port}
309
- -i, --ip=ADDRESS IP Address to listen on (0.0.0.0 for all interfaces). Default is localhost
310
- -t, --timeout=TIMEOUT Stop the Debug Server if a client does not connection within TIMEOUT seconds. A value of zero will not timeout. Default is 10 seconds
311
- --debug=DEBUG Output debug information. Either specify a filename or 'STDOUT'. Default is no debug output
312
- -h, --help Prints this help
313
- -v, --version Prints the Debug Server version
255
+ Common options:
256
+
257
+ | Option | Behavior |
258
+ | --- | --- |
259
+ | `--ip=ADDRESS` | TCP listen address; defaults to `localhost`. |
260
+ | `--port=PORT` | TCP listen port; defaults to a randomly selected port. |
261
+ | `--timeout=SECONDS` | Wait for a connection for up to 10 seconds by default; `0` disables this timeout. |
262
+ | `--openvox-version=VERSION` | Select an OpenVox gem version; `--puppet-version` is a compatibility alias. |
263
+ | `--debug=PATH` | Write diagnostic logs to a file, or use `STDOUT` for console output. |
264
+
265
+ For the complete option list, run:
266
+
267
+ ```shell
268
+ bundle exec ruby ./openvox-debugserver --help
314
269
  ```
315
270
 
316
271
  ## License
@@ -321,19 +276,46 @@ This codebase is licensed under Apache 2.0. However, the open source dependencie
321
276
 
322
277
  ### Reporting bugs
323
278
 
324
- If you find a bug in puppet-editor-services or its results, please create an issue in the [repo issues tracker](https://github.com/voxpupulo/openvox-editor-services/issues).
279
+ If you find a bug in OpenVox Editor Services or its results, please create an issue in the
280
+ [repository issue tracker](https://github.com/voxpupuli/openvox-editor-services/issues).
325
281
  Bonus points will be awarded if you also include a patch that fixes the issue.
326
282
 
327
283
  ## Development
328
284
 
329
- If you run into an issue with this tool or would like to request a feature you can raise a PR with your suggested changes.
330
- Alternatively, you can raise a Github issue with a feature request or to report any bugs.
331
- Every other Tuesday the DevX team holds office hours in the Puppet Community Slack, where you can ask questions about this and any other supported tools.
332
- This session runs at 15:00 (GMT) for about an hour.
285
+ After completing the [development setup](#setting-up-editor-services-for-development), run the relevant checks:
333
286
 
334
- ## Why are there vendored gems and why only native ruby
287
+ ```shell
288
+ bundle exec rake test_languageserver
289
+ bundle exec rake test_languageserver_sidecar
290
+ bundle exec rake test_debugserver
291
+ bundle exec rake acceptance_languageserver
292
+ bundle exec rake rubocop
293
+ ```
294
+
295
+ The first three commands run the component specs; the acceptance suite runs separately.
296
+ For coverage across the three component suites, run `bundle exec rake test:coverage`.
297
+ CI currently runs these checks with Ruby 4.0 and `OPENVOX_GEM_VERSION='~> 8.0'`,
298
+ with component and acceptance tests on Linux and Windows.
299
+ Use the explicit tasks above; the default Rake task currently refers to an undefined `test` task.
335
300
 
336
- When used by editors this language server will be running using the Ruby runtime provided by Puppet Agent.
337
- That means no native extensions and no bundler.
338
- Also, only the gems provided by Puppet Agent would be available by default.
339
- To work around this limitation all runtime dependencies should be re-vendored and then the load path modified appropriately.
301
+ If you run into an issue with this tool or would like to request a feature you can raise a PR with your suggested changes.
302
+ Alternatively, you can raise a GitHub issue with a feature request or to report any bugs.
303
+
304
+ ## Packaging and runtime dependencies
305
+
306
+ Editor services can run with the Ruby runtime provided by OpenVox Agent.
307
+ Dependencies must be available to that runtime when the editor starts the server.
308
+ The repository supports two packaging paths:
309
+
310
+ - **Standalone archives:** `bundle exec rake build` runs `gem_revendor` and includes the downloaded Ruby sources from
311
+ `vendor/` alongside `lib/` and the root-level server scripts in ZIP and tar.gz archives.
312
+ The server loads these vendored dependencies through its Ruby load path, without requiring Bundler at runtime.
313
+ Run `bundle exec rake gem_revendor` when preparing a checkout for development and tests as described above.
314
+ - **Ruby gem and local VSIX:** the gemspec declares runtime dependencies, which `gem install` resolves and installs.
315
+ The gem contains `lib/` and `bin/`; it does not include the repository's `vendor/` directory.
316
+ `scripts/build-local-vsix.sh` builds this gem and installs it with its dependencies into the extension's
317
+ `vendor/languageserver/gems` directory, then packages the extension.
318
+ This path does not run `gem_revendor` and does not require Bundler at runtime.
319
+
320
+ Keep dependencies compatible with the OpenVox Agent Ruby runtime and prefer pure Ruby dependencies to avoid
321
+ platform-specific native extension builds.
data/RELEASE.md CHANGED
@@ -31,6 +31,6 @@ Then open a PR, discuss and merge.
31
31
  ```shell
32
32
  git switch main
33
33
  git pull --rebase
34
- git tag v$RELEASE_VERSION --message "v$RELEASE_VERSION"
34
+ git tag v$RELEASE_VERSION --sign --message "v$RELEASE_VERSION"
35
35
  git push --tags
36
36
  ```
data/lib/dsp/dsp_base.rb CHANGED
@@ -29,7 +29,8 @@ module DSP
29
29
  def from_h!(value); end
30
30
 
31
31
  def to_json(*options)
32
- to_h.to_json(options)
32
+ # JSON 2.21 requires an options hash, so expand the captured arguments instead of passing their array.
33
+ to_h.to_json(*options)
33
34
  end
34
35
 
35
36
  private