redhat-developer / redhat-developer/vscode-java
Set environment variables for language server
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 2.3k
- Forks
- 546
- Merge moyen
- 20 h 1 min
- PR mergées (30 j)
- 11
Description
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
- Use VS Code Remote SSH on a machine that does NOT have the environment variable MY_REPO defined by default.
- Create Maven settings file with:
<localRepository>${MY_REPO}/repo</localRepository> - Set
java.configuration.maven.userSettingsto point to the created Maven settings file - 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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Aucun fichier source ni test n’est nommé. Commencez par suivre comment l’extension lance le backend du language-server et comment java.configuration.maven.userSettings parvient à Maven ; reproduisez le problème avec Remote SSH et MY_REPO, en effectuant le travail lorsque la variable d’environnement configurée est disponible pendant l’importation et la compilation du projet.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, typescript
- Domaine
- tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100