redhat-developer / redhat-developer/vscode-java
Set environment variables for language server
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp mã nguồn hoặc bài kiểm thử nào được nêu tên. Hãy bắt đầu bằng cách lần theo cách extension khởi chạy backend của language-server và cách java.configuration.maven.userSettings đến được Maven; tái hiện bằng Remote SSH và MY_REPO, với công việc được thực hiện khi biến môi trường đã cấu hình khả dụng trong quá trình import và build dự án.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, typescript
- Lĩnh vực
- tooling
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100