redhat-developer / redhat-developer/vscode-java

Set environment variables for language server

Aperta
#2,348 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement preferences
Lingua principale
TypeScript
Stelle
2.3k
Fork
546
Merge medio
20h 1m
PR unite (30g)
11

Descrizione

As far as I understand this extension launches the process for the language server backend. It could be beneficial to be able to configure the environment variables used when executing the language server, in a similar fashion as in the 'Maven for Java' extension here: https://github.com/Microsoft/vscode-maven/#additional-configurations

My use case is the following:

I am using VS Code with Remote SSH, and trying to work on a Maven based Java project. Currently I am configuring the java.configuration.maven.userSettings setting to point to a project specific Maven settings file. This settings file makes use of an environment variable, which is not set by default on the remote machine shell as it changes from project to project. Therefore the extension imports and tries to build this Maven project, the user settings is used correctly, but the environment variable is not defined.

(Sorry if this suggestion is incorrect, as I am a new user of the extension)

Environment
  • Operating System: Linux
  • JDK version: 11
  • Visual Studio Code version: 1.65.0
  • Java extension version: 1.4.0
Steps To Reproduce
  1. Use VS Code Remote SSH on a machine that does NOT have the environment variable MY_REPO defined by default.
  2. Create Maven settings file with: <localRepository>${MY_REPO}/repo</localRepository>
  3. Set java.configuration.maven.userSettings to point to the created Maven settings file
  4. Create Maven Java project and let the extension import and build the project

A local folder called "${MY_REPO}" will be created, as the environment variable is not defined.

Current Result

Environment variable used in Maven settings file cannot be configured.

Expected Result

Environment variable used in Maven settings file can be configured.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Non vengono indicati file sorgente o test. Inizia tracciando come l’estensione avvia il backend del language-server e come java.configuration.maven.userSettings raggiunge Maven; riproduci il problema con Remote SSH e MY_REPO, eseguendo il lavoro quando la variabile d’ambiente configurata è disponibile durante l’importazione e la build del progetto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, typescript
Ambito
tooling
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.