Commit 3fb98d88 authored by Jérome Perrin's avatar Jérome Perrin

Theia 1.5.0

Update to version 1.5.0

 - slapos node tasks to control slapos from theia
 - git uses integrated editor when opening editor
 - fix "Upload files..."
 - support rust (after a manual cargo install)
 - better plantuml support


See merge request !799
parents 865bc5d4 c2e08046
Pipeline #11439 failed with stage
...@@ -14,6 +14,12 @@ parts = ...@@ -14,6 +14,12 @@ parts =
[nodejs] [nodejs]
<= nodejs-8.9.4 <= nodejs-8.9.4
[nodejs-12.18.3]
<= nodejs-base
openssl_location = ${openssl:location}
version = v12.18.3
md5sum = 28bf6a4d98b238403fa58a0805f4a979
[nodejs-10.19.0] [nodejs-10.19.0]
<= nodejs-base <= nodejs-base
openssl_location = ${openssl:location} openssl_location = ${openssl:location}
......
[buildout]
parts =
rustc
extends =
../cmake/buildout.cfg
../curl/buildout.cfg
../git/buildout.cfg
../openssl/buildout.cfg
../pkgconfig/buildout.cfg
[rustc]
recipe = slapos.recipe.cmmi
shared = true
url = https://static.rust-lang.org/dist/rustc-1.45.2-src.tar.gz
md5sum = 1c67d7c3f211e49e12e7c20abab08e70
# --sysconfdir is a workaround for https://github.com/rust-lang/rust/issues/63915
configure-options = --enable-extended --sysconfdir=@@LOCATION@@/etc/
environment =
PATH=${cmake:location}/bin/:${curl:location}/bin/:${git:location}/bin/:${pkgconfig:location}/bin/:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig:
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = d8ad39bc93c492026a93c28b33a5dc3a md5sum = f95354d4af4a78ad7fd11ebc9281ed19
[yarn.lock] [yarn.lock]
filename = yarn.lock filename = yarn.lock
md5sum = 89d0a4d0c3ae90b9c5c0923b57766f0f md5sum = 07835b4acfbd8f4a96ac15ffecd238b0
[python-language-server-requirements.txt] [python-language-server-requirements.txt]
filename = python-language-server-requirements.txt filename = python-language-server-requirements.txt
md5sum = 2a296cba4c36d7a5fca5f4347a8c8469 md5sum = d2ce161244ce9ebce5295302a1b2a7df
...@@ -3,6 +3,7 @@ parts = ...@@ -3,6 +3,7 @@ parts =
monitor-base monitor-base
promises promises
frontend-reload frontend-reload
tasks.json
publish-connection-parameter publish-connection-parameter
extends = ${monitor-template:rendered} extends = ${monitor-template:rendered}
...@@ -58,6 +59,9 @@ template = inline: ...@@ -58,6 +59,9 @@ template = inline:
proxy /services $${theia-instance:base-url} { proxy /services $${theia-instance:base-url} {
websocket websocket
} }
proxy /file-upload $${theia-instance:base-url} {
websocket
}
basicauth $${frontend-instance-password:username} $${frontend-instance-password:passwd} { basicauth $${frontend-instance-password:username} $${frontend-instance-password:passwd} {
realm "Theia" realm "Theia"
/ /
...@@ -114,22 +118,101 @@ install = ...@@ -114,22 +118,101 @@ install =
location = $${directory:frontend-static}/$${:filename} location = $${directory:frontend-static}/$${:filename}
filename = $${:_buildout_section_name_} filename = $${:_buildout_section_name_}
[user] [tasks.json]
recipe = slapos.cookbook:userinfo recipe = slapos.recipe.template:jinja2
rendered = $${directory:dot-theia}/tasks.json
template =
inline:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "slapos node software",
"detail": "Build all software supplied to the node",
"type": "shell",
"command": "${buildout:bin-directory}/slapos",
"args": [
"node",
"software",
// debug mode can be enabled by commenting out this line:
// "--buildout-debug",
"--all"
],
"options": {
"env": {
"SLAPOS_CONFIGURATION": "$${slapos-standalone-activate:slapos-configuration}",
"GIT_EXEC_PATH": ""
}
},
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"label": "slapos node instance",
"detail": "Create all instances requested on the node",
"type": "shell",
"command": "${buildout:bin-directory}/slapos",
"args": [
"node",
"instance",
// debug mode can be enabled by commenting out this line:
// "--buildout-debug",
"--all"
],
"options": {
"env": {
"SLAPOS_CONFIGURATION": "$${slapos-standalone-activate:slapos-configuration}",
"GIT_EXEC_PATH": ""
}
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
[theia-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line =
env LC_ALL=C.UTF-8 TMP=$${directory:tmp} THEIA_WEBVIEW_EXTERNAL_ENDPOINT='{{hostname}}' THEIA_SHELL=$${theia-shell:rendered} ${theia-wrapper:rendered} --hostname=$${:hostname} --port=$${:port} $${directory:project}
[theia-service]
recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/$${:_buildout_section_name_}
mode = 0700
template =
inline:#!/bin/sh
{% raw %}
export THEIA_WEBVIEW_EXTERNAL_ENDPOINT='{{hostname}}'
{% endraw %}
export THEIA_OPEN_EDITOR_TOKEN=$(${openssl:location}/bin/openssl rand -hex 32)
export THEIA_URL=$${:base-url}
export THEIA_SHELL=$${theia-shell:rendered}
export HOME=$${buildout:directory}
export TMP=$${directory:tmp}
export TEMP=$TMP
export LC_ALL=C.UTF-8
export EDITOR="${python-language-server:location}/bin/python -m theia_open --wait"
exec ${theia-wrapper:rendered} $@
ip = $${instance-parameter:ipv4-random} ip = $${instance-parameter:ipv4-random}
hostname = $${:ip}
port = 3000 port = 3000
base-url = http://$${:hostname}:$${:port}/ base-url = http://$${:ip}:$${:port}/
[theia-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line = $${theia-service:rendered} --hostname=$${:hostname} --port=$${:port} $${directory:project}
hash-existing-files = hash-existing-files =
${yarn.lock:output} ${yarn.lock:output}
${theia-wrapper:rendered} ${theia-wrapper:rendered}
ip = $${instance-parameter:ipv4-random}
hostname = $${:ip}
port = $${theia-service:port}
base-url = $${theia-service:base-url}
[theia-shell] [theia-shell]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -144,7 +227,6 @@ template = inline: ...@@ -144,7 +227,6 @@ template = inline:
if not args: args = ["-c", ". $${slapos-standalone-activate:rendered} && exec env GIT_EXEC_PATH= ${bash:location}/bin/bash", ] if not args: args = ["-c", ". $${slapos-standalone-activate:rendered} && exec env GIT_EXEC_PATH= ${bash:location}/bin/bash", ]
os.execv('${bash:location}/bin/bash', ['${bash:location}/bin/bash'] + args) os.execv('${bash:location}/bin/bash', ['${bash:location}/bin/bash'] + args)
[slapos-standalone-activate] [slapos-standalone-activate]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/$${:_buildout_section_name_} rendered = $${directory:bin}/$${:_buildout_section_name_}
...@@ -163,13 +245,13 @@ template = ...@@ -163,13 +245,13 @@ template =
$${slap-connection:partition-id} \ $${slap-connection:partition-id} \
--key='$${slap-connection:key-file}' \ --key='$${slap-connection:key-file}' \
--cert='$${slap-connection:cert-file}' --cert='$${slap-connection:cert-file}'
export SLAPOS_CONFIGURATION=$${directory:slapos}/etc/slapos.cfg export SLAPOS_CONFIGURATION=$${:slapos-configuration}
export SLAPOS_CLIENT_CONFIGURATION=$SLAPOS_CONFIGURATION export SLAPOS_CLIENT_CONFIGURATION=$SLAPOS_CONFIGURATION
ipv4 = $${instance-parameter:ipv4-random} ipv4 = $${instance-parameter:ipv4-random}
ipv6 = $${instance-parameter:ipv6-random} ipv6 = $${instance-parameter:ipv6-random}
port = 4000 port = 4000
slapos-configuration = $${directory:slapos}/etc/slapos.cfg
[promises] [promises]
recipe = recipe =
...@@ -182,7 +264,7 @@ instance-promises = ...@@ -182,7 +264,7 @@ instance-promises =
<= monitor-promise-base <= monitor-promise-base
module = check_port_listening module = check_port_listening
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-hostname= $${theia-instance:ip} config-hostname = $${theia-instance:ip}
config-port = $${theia-instance:port} config-port = $${theia-instance:port}
[frontend-listen-promise] [frontend-listen-promise]
...@@ -209,7 +291,7 @@ slave = true ...@@ -209,7 +291,7 @@ slave = true
config-url = $${frontend-instance:url} config-url = $${frontend-instance:url}
config-https-only = true config-https-only = true
config-type = websocket config-type = websocket
config-websocket-path-list = /services config-websocket-path-list = /services /file-upload
return = domain secure_access return = domain secure_access
[publish-connection-parameter] [publish-connection-parameter]
...@@ -233,6 +315,7 @@ var = $${buildout:directory}/var ...@@ -233,6 +315,7 @@ var = $${buildout:directory}/var
srv = $${buildout:directory}/srv srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp tmp = $${buildout:directory}/tmp
dot-theia = $${buildout:directory}/.theia/
pidfiles = $${:var}/run pidfiles = $${:var}/run
services = $${:etc}/service services = $${:etc}/service
......
...@@ -27,3 +27,4 @@ typing-extensions==3.7.4.2 ...@@ -27,3 +27,4 @@ typing-extensions==3.7.4.2
wrapt==1.11.2 wrapt==1.11.2
yapf==0.29.0 yapf==0.29.0
zc.buildout.languageserver==0.2.1 zc.buildout.languageserver==0.2.1
theia-open==0.1.2
...@@ -31,7 +31,7 @@ max_version = 0 ...@@ -31,7 +31,7 @@ max_version = 0
[nodejs] [nodejs]
<= nodejs-10.19.0 <= nodejs-12.18.3
[yarn] [yarn]
# this could become a component, but it needs to be invoked from nodejs explicitly, # this could become a component, but it needs to be invoked from nodejs explicitly,
...@@ -159,7 +159,7 @@ mode = 0644 ...@@ -159,7 +159,7 @@ mode = 0644
[package.json] [package.json]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
# this comes from https://github.com/theia-ide/theia-apps/blob/3391dd07cba7ddc5cc833420349a27beb66a5433/theia-full-docker/latest.package.json # this comes from https://github.com/theia-ide/theia-apps/blob/a54aaa676e3db07d22ab75dde9f3447576135b4d/theia-full-docker/latest.package.json
# but with a more recent version of vscode-java-redhat, where https://github.com/redhat-developer/vscode-java/issues/1301 was fixed # but with a more recent version of vscode-java-redhat, where https://github.com/redhat-developer/vscode-java/issues/1301 was fixed
template = template =
inline:{ inline:{
...@@ -169,24 +169,26 @@ template = ...@@ -169,24 +169,26 @@ template =
"config": { "config": {
"applicationName": "Theia SlapOS", "applicationName": "Theia SlapOS",
"preferences": { "preferences": {
"application.confirmExit": "always",
"files.enableTrash": false, "files.enableTrash": false,
"files.exclude": { "files.exclude": {
"**.pyc": true, "**.pyc": true,
"**.egg-info": true, "**.egg-info": true,
"__pycache__": true, "__pycache__": true,
".git": true, ".git": true,
".env": true ".env": true,
"**/node_modules/**": true
}, },
"files.watcherExclude": { "files.watcherExclude": {
"**/.eggs/**": true, "**/.eggs/**": true,
"**/.env/**": true, "**/.env/**": true,
"**/.git/**": true, "**/.git/**": true,
"**/node_modules/**": true "**/node_modules/**": true
}, },
"editor.multiCursorModifier": "ctrlCmd", "editor.multiCursorModifier": "ctrlCmd",
"editor.tabSize": 2, "editor.tabSize": 2,
"plantuml.monochrome": false, "plantuml.server": "https://plantuml.host.vifib.net/svg/",
"plantuml.webservice": "//plantuml.host.vifib.net/svg/", "plantuml.render": "PlantUMLServer",
"gitlens.remotes": [{ "domain": "lab.nexedi.com", "type": "GitLab" }], "gitlens.remotes": [{ "domain": "lab.nexedi.com", "type": "GitLab" }],
"java.home": "${java-jdk:location}" "java.home": "${java-jdk:location}"
} }
...@@ -205,9 +207,7 @@ template = ...@@ -205,9 +207,7 @@ template =
"@theia/filesystem": "latest", "@theia/filesystem": "latest",
"@theia/getting-started": "latest", "@theia/getting-started": "latest",
"@theia/git": "latest", "@theia/git": "latest",
"@theia/json": "latest",
"@theia/keymaps": "latest", "@theia/keymaps": "latest",
"@theia/languages": "latest",
"@theia/markers": "latest", "@theia/markers": "latest",
"@theia/messages": "latest", "@theia/messages": "latest",
"@theia/metrics": "latest", "@theia/metrics": "latest",
...@@ -216,14 +216,12 @@ template = ...@@ -216,14 +216,12 @@ template =
"@theia/navigator": "latest", "@theia/navigator": "latest",
"@theia/outline-view": "latest", "@theia/outline-view": "latest",
"@theia/output": "latest", "@theia/output": "latest",
"@theia/plantuml": "latest",
"@theia/plugin": "latest", "@theia/plugin": "latest",
"@theia/plugin-ext": "latest", "@theia/plugin-ext": "latest",
"@theia/plugin-ext-vscode": "latest", "@theia/plugin-ext-vscode": "latest",
"@theia/preferences": "latest", "@theia/preferences": "latest",
"@theia/preview": "latest", "@theia/preview": "latest",
"@theia/process": "latest", "@theia/process": "latest",
"@theia/rust": "latest",
"@theia/scm": "latest", "@theia/scm": "latest",
"@theia/search-in-workspace": "latest", "@theia/search-in-workspace": "latest",
"@theia/task": "latest", "@theia/task": "latest",
...@@ -232,14 +230,8 @@ template = ...@@ -232,14 +230,8 @@ template =
"@theia/userstorage": "latest", "@theia/userstorage": "latest",
"@theia/variable-resolver": "latest", "@theia/variable-resolver": "latest",
"@theia/vsx-registry": "latest", "@theia/vsx-registry": "latest",
"@theia/workspace": "latest" "@theia/workspace": "latest",
}, "@perrinjerome/theia-open": "0.1.2"
"resolutions": {
"vscode-json-languageserver": "1.2.2",
"vscode-languageserver-protocol": "3.15.0-next.9",
"vscode-languageserver-types": "3.15.0-next.5",
"**/vscode-json-languageserver/**/vscode-languageserver": "6.0.0-next.1",
"**/moment": "2.24.0"
}, },
"devDependencies": { "devDependencies": {
"@theia/cli": "latest" "@theia/cli": "latest"
...@@ -269,6 +261,7 @@ template = ...@@ -269,6 +261,7 @@ template =
"vscode-builtin-java": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/java-1.39.1-prel.vsix", "vscode-builtin-java": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/java-1.39.1-prel.vsix",
"vscode-builtin-javascript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/javascript-1.39.1-prel.vsix", "vscode-builtin-javascript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/javascript-1.39.1-prel.vsix",
"vscode-builtin-json": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-1.39.1-prel.vsix", "vscode-builtin-json": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-1.39.1-prel.vsix",
"vscode-builtin-json-language-features": "https://open-vsx.org/api/vscode/json-language-features/1.46.1/file/vscode.json-language-features-1.46.1.vsix",
"vscode-builtin-less": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/less-1.39.1-prel.vsix", "vscode-builtin-less": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/less-1.39.1-prel.vsix",
"vscode-builtin-log": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/log-1.39.1-prel.vsix", "vscode-builtin-log": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/log-1.39.1-prel.vsix",
"vscode-builtin-lua": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/lua-1.39.1-prel.vsix", "vscode-builtin-lua": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/lua-1.39.1-prel.vsix",
...@@ -316,7 +309,8 @@ template = ...@@ -316,7 +309,8 @@ template =
"vscode-java-test": "https://github.com/microsoft/vscode-java-test/releases/download/0.22.0/vscjava.vscode-java-test-0.22.0.vsix", "vscode-java-test": "https://github.com/microsoft/vscode-java-test/releases/download/0.22.0/vscjava.vscode-java-test-0.22.0.vsix",
"vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2020.1.58038/ms-python-release.vsix", "vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2020.1.58038/ms-python-release.vsix",
"vscode-ruby": "https://github.com/rubyide/vscode-ruby/releases/download/v0.25.0/ruby-0.25.0.vsix", "vscode-ruby": "https://github.com/rubyide/vscode-ruby/releases/download/v0.25.0/ruby-0.25.0.vsix",
"vscode-zc-buildout": "https://github.com/perrinjerome/vscode-zc-buildout/releases/download/v0.2.0/vscode-zc-buildout-0.2.0.vsix" "vscode-zc-buildout": "https://github.com/perrinjerome/vscode-zc-buildout/releases/download/v0.2.0/vscode-zc-buildout-0.2.0.vsix",
"plantuml": "https://open-vsx.org/api/jebbs/plantuml/2.13.12/file/jebbs.plantuml-2.13.12.vsix"
} }
} }
rendered = ${buildout:directory}/${:_buildout_section_name_} rendered = ${buildout:directory}/${:_buildout_section_name_}
...@@ -342,7 +336,7 @@ template = ...@@ -342,7 +336,7 @@ template =
inline: inline:
#!/bin/bash #!/bin/bash
. ${gowork:env.sh} . ${gowork:env.sh}
export PATH=${python-language-server:location}/bin/:${java-jdk:location}/bin/:${cli-utilities:PATH}:$PATH export PATH=${python-language-server:location}/bin/:${java-jdk:location}/bin/:${cli-utilities:PATH}:$HOME/.cargo/bin:$PATH
export THEIA_DEFAULT_PLUGINS="local-dir:${theia:THEIA_DEFAULT_PLUGINS}" export THEIA_DEFAULT_PLUGINS="local-dir:${theia:THEIA_DEFAULT_PLUGINS}"
# reset PS1 from gowork # reset PS1 from gowork
export PS1='$ ' export PS1='$ '
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment