Open cutecutecat opened 1 year ago
ref: https://github.com/tensorchord/envd/issues/931
Envd act like docker
, the deploy of sidebar can be refered to https://code.visualstudio.com/docs/containers/overview
We can make a similar sidebar about
environment
according to docker
image like this:
However, there could be another view of arrangement, as we only need destroy
, pause
/resume
and run command
, and there might be not many environments:
After discussion, we pick List
as final sidebar show.
ref: https://github.com/tensorchord/envd/issues/931
WE need to implement two level of Command
:
envd
, like prune
xxx.envd
file, like up
and build
Global command will run at vscode command
We will provide these commands:
Install/Upgrade Envd
: use pip install --upgrade envd
to install envd(need a configure pointing to exsting pip)
Bootstrap Envd
: call CommandBootstrap
, initial envd and buildkit
Clear Cache
: call CommandPrune
, clean cache of all
We add an Run
icon at every build
function of envd file. File command will run by right click of a envd file or click a icon.
We provide these commands:
Build environment
: build a xxx.envd
to environment
Run environment
: build a xxx.envd
to environment and run it
User can choose which action is default by left click icon in configure, though both of them can be fetched in right click menu.
ref: https://github.com/tensorchord/envd-lsp/issues/7
vscode-lsp
imports envd/api
to extract syntax. The used version is v0.1.1
, we should update it into v0.2.5
first of all.
https://github.com/tensorchord/envd-lsp/blob/5440364fb084f219beb635a4d99812240bdbdc49/go.mod#L7
envd-vscode
and envd-lsp
Now, Lsp server is released together with envd-vscode plugin, with a fixed version.
There are two reasons of why envd-vscode
need to update:
envd-lsp
is updatedenvd-vscode
has new featureThat would make user confused for these two reason, we need to unbind these two module.
envd-vscode
will have no envd-lsp
default module
, and download and install it when vscode plugin is installed by user.
graph TD
m[compatible with] --> a[envd-lsp v1.0]
m[compatible with] --> b[envd-lsp v2.0]
m[compatible with] --> c[envd-lsp v3.0]
A[envd-vscode v1.0] --> m[compatible with]
B[envd-vscode v2.0] --> m[compatible with]
C[envd-vscode v3.0] --> m[compatible with]
We need to implement an auto update pipeline by 3 factor:
A
for envd-lsp
with write access to automatically update envd
dependency to latest release, this only happens to main
branchB
for envd-lsp
will release same/newest version(not alpha) of envd
if envd/api
has changedA
is a simple dependabot
.
B
could be a Github Action, when A
trigers an PR, it would do these things:
envd-lsp
of the same tag of envd
sequenceDiagram
participant S as Envd
actor A as A[Dependency Bot]
actor B as B[Release Bot]
participant T as Envd-Lsp
S->>A: Manual Release envd v1.0.0
A->>T: Auto Update dependency v1.0.0
B-->>T: Auto Release envd-lsp v1.0.0
S->>A: Manual Release envd v1.1.0
A->>T: Auto Update dependency v1.1.0
B-->>T: Auto Release envd-lsp v1.2.0
S->>A: Manual Release envd v1.2.0
A->>T: Auto Update dependency v1.2.0
B-->>T: Auto Release envd-lsp v1.2.0
ref:
Now, Lsp server is released together with envd-vscode
plugin, with a fixed version. We intend to make envd-vscode
ability to mangage and install lsp server
locally.
By description of Syntax update and auto update
, we can infer that any released version of envd-vscode
will have a equal version of envd-lsp
. But when user want to use another version of envd
and need to switch an older envd-lsp
.
We provide there vscode commands
for them:
Install/Upgrade Lsp
: update lsp
version to latest, prompt when no lsp
found.
Switch version of Lsp
: install a special version of lsp
, prompt a version choose window
We provide these configure for them:
lsp path
: path of lsp server, will be overrided if Install/Upgrade Lsp
and Switch version of Lsp
succeed, change this can use a self-install lsp
sequenceDiagram
actor U as User
participant V as envd-vscode
participant L as envd-lsp
U->>V: Manual Install plugin first time
V->>L: Have a existing version?(path/envd-lsp -v)
L->>V: No(command not found)
V->>U: Lsp not found. Want to install?
U->>V: Click yes
V->>L: Download latest lsp
Note over V,L: Overwrite envd path configure
V->>L: Have a existing version?(path/envd-lsp -v)
L->>V: Ok
V->>U: Report Lsp version
Here is other improvement of priority/low
. If there is enough time, we can make a research.
tab/space
when user input Enter
Python plugin support this feature.
Some user may like right click Go to Definition
for builtin functions in envd.
We have a dependency of envd/api
, we can point definition to it.
Envd syntax analysis is provided by envd/api
document comment.
Unfortunately, these things not happens to include
, they would have no hint at all.
For example, the tensorboard
function in this graph
Maybe we can add analysis of these including envd
functions, as they are valid python code either.
Not sure if this is achievable, more research is needed
Thanks for your contribution! :tada: :+1:
I suggest filing a PR to envd like this https://github.com/tensorchord/envd/pull/303
Then we can discuss it with other community members there.
After make a survey of existing issues, I think there might be 4 parts that need to be implement:
I would show the details of each part below. It may take a couple of days fulfilling all parts of the proposal. Additional discussion is needed.