Conversation
…ve plugin dependency + fix startup and minor bugs + update autocompletion Signed-off-by: Igor Janevski <ijanevski@vmware.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #123 +/- ##
==========================================
+ Coverage 50.00% 54.21% +4.21%
==========================================
Files 40 40
Lines 790 806 +16
Branches 116 117 +1
==========================================
+ Hits 395 437 +42
+ Misses 356 331 -25
+ Partials 39 38 -1 |
|
@igormkdd, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
Signed-off-by: Igor Janevski <ijanevski@vmware.com>
|
@igormkdd, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
ivo-kotev
left a comment
There was a problem hiding this comment.
Please check the comments.
We will need for sure some MD file that can explain how the collection is working so this can be supported later on.
| Vra = "com.vmware.pscoe.vra:vra-package", | ||
| VraNg = "com.vmware.pscoe.vra-ng:vra-ng-package" | ||
| VraNg = "com.vmware.pscoe.vra-ng:vra-ng-package", | ||
| Polyglot = "com.vmware.pscoe.polyglot:polyglot-project" |
There was a problem hiding this comment.
If we are listing all supported, we are missing vrops, vcd, vrli - basically all supported are defined here: https://github.com/vmware/build-tools-for-vmware-aria/tree/main/maven/base-package
| const lineContent = document.getLineContentUntil(position) | ||
|
|
||
| this.logger.debug(`Trying to provide auto completion for line '${lineContent}'`) | ||
| this.logger.info(`Trying to provide auto completion for line '${lineContent}'`) |
There was a problem hiding this comment.
Do we need to have this logged for all users?
| this.getModulesForCollection(workspaceFolder, undefined, modules) | ||
| if (modules.length === 0) { | ||
| this.logger.debug("Skipping workspace collection as there are no JS action modules in the project") | ||
| this.logger.info("Skipping workspace collection as there are no JS action modules in the project") |
There was a problem hiding this comment.
Do we need this level of logging in Info mode?
| export class WorkspaceCollection { | ||
| private readonly logger = Logger.get("WorkspaceCollection") | ||
| private readonly debounceTriggerCollection = _.debounce(this.triggerCollectionAndRefresh, 10000) | ||
| private readonly debounceTriggerCollection = _.debounce(this.triggerCollectionAndRefresh, 1000) |
There was a problem hiding this comment.
Can we move these timeout and sleep configurations to a constants file?
| returnType?: string | ||
| } | ||
|
|
||
| export interface HintPlugin { |
There was a problem hiding this comment.
is this about the vRDT version? or for backward compatibility?
| } | ||
| }) | ||
| .catch(error => { | ||
| this.logger.info("Could not connect to vRO. Collecting offline hints collection...") |
There was a problem hiding this comment.
What does it mean "Collecting offline hints collection..." it's going to use the data that is already cached locally? If yes - maybe rephrase a bit the message?
| if (fs.existsSync(vpkFilePath)) { | ||
| fs.unlinkSync(vpkFilePath) | ||
| } | ||
| const parsedLink = link[0].substring(9).toString() |
There was a problem hiding this comment.
can we expect cases with less links? count=0? And maybe add a comment what is specific for this link0?
| const command = `mvn o11n-hint:collect -DoutputHintDirectory="${outputDir}" -pl ${modules.join(",")} -e` | ||
| const cmdOptions = { cwd: workspaceFolder.uri.fsPath } | ||
| const fullPath = path.join(workspaceFolder.uri.fsPath, modules.join(",")) | ||
| const modulesPath = path.join(fullPath, "src/main/resources") |
There was a problem hiding this comment.
I guess this should work for both JS and TS projects, the path for TS projects is only src/?
| metadata: { | ||
| timestamp: Date.now(), | ||
| serverName: "", | ||
| serverVersion: "0.0.1", |
There was a problem hiding this comment.
Is it going to be useful to cache the server name and version as well? Or we are not using this information?
| - **`packages/node/vro-language-server`** - A Node.js implementation of the [Language Server Protocol (LSP)](https://github.com/Microsoft/language-server-protocol). It analyses type information received from the vRO server and maintains semantic knowledge about a vRO solution implemented in JavaScript. Depends on vRO Hint Plugin that is part of the [vRealize Build Tools](https://flings.vmware.com/vrealize-build-tools) fling. _No longer maintained, still remains for compatibility._ | ||
| - **`packages/node/vro-language-server/protocol`** - A set of [Protocol Buffer](https://developers.google.com/protocol-buffers/) message definitions that are used by the vRO language server and the vRO Hint plug-in as a serialization format for communication and storage purposes. _No longer maintained, still remains for compatibility._ | ||
| - **`packages/node/vro-language-server`** - A Node.js implementation of the [Language Server Protocol (LSP)](https://github.com/Microsoft/language-server-protocol). It analyses type information received from the vRO server and maintains semantic knowledge about a vRO solution implemented in JavaScript. The updated version is operational with vRO 8, but not with the vRO 7 anymore. The plugin is not needed for fetching the data from the vRO, but rather only a connection to it is required and a valid maven profile. Moreover, local js files are also analyzed. | ||
| - **`packages/node/vro-language-server/protocol`** - A set of [Protocol Buffer](https://developers.google.com/protocol-buffers/) message definitions that are used by the vRO language server as a serialization format for communication and storage purposes. |
There was a problem hiding this comment.
I think we need to add a bit more documentation on how this is working, maybe a separate md file that explains the communication flow and the components/files involved in this communication.
Also - is this going to work for vRO servers that are using vRA authentication? I think currently all operations for vRDT support only basic auth, which makes most of the things unusable in vra 8.8+ without additional vro configuration?
|
@igormkdd, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
…-by: Igor Janevski <ijanevski@vmware.com> Signed-off-by: Igor Janevski <ijanevski@vmware.com>
|
@igormkdd, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
…evski <ijanevski@vmware.com> Signed-off-by: Igor Janevski <ijanevski@vmware.com>
|
@igormkdd, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
|
@igormkdd, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
Description
Checklist
Fixed #XXX -orClosed #XXX -prefix to auto-close the issueTesting
Release Notes
Screenshot
Related issues and PRs