Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nirina Malard
slapos
Commits
f95765bf
Commit
f95765bf
authored
Jun 20, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
theia: patch python extension for jedi buildout bug
parent
e1e47684
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
14 deletions
+36
-14
component/theia/buildout.cfg
component/theia/buildout.cfg
+10
-0
component/theia/buildout.hash.cfg
component/theia/buildout.hash.cfg
+4
-0
component/theia/ms-python-disable-jedi-buildout.patch
component/theia/ms-python-disable-jedi-buildout.patch
+22
-0
software/theia/README.md
software/theia/README.md
+0
-14
No files found.
component/theia/buildout.cfg
View file @
f95765bf
...
...
@@ -71,7 +71,17 @@ install =
extract_dir = self.extract(self.download(url, md5sum))
destination_dir = os.path.join(options['location'], extension_name)
self.copyTree(guessworkdir(extract_dir), destination_dir)
patches = options.get(extension_name + '-patches')
if patches:
self.applyPatchList(
patches,
patch_options=options.get(extension_name + '-patch-options', '-p1'),
patch_binary=options['patch-binary'],
cwd=destination_dir,
)
os.chmod(destination_dir, 0o750)
patch-binary = ${patch:location}/bin/patch
ms-python-python-patches = ${:_profile_base_location_}/${ms-python-disable-jedi-buildout.patch:_update_hash_filename_} ${ms-python-disable-jedi-buildout.patch:md5sum}
[package.json]
content =
...
...
component/theia/buildout.hash.cfg
View file @
f95765bf
...
...
@@ -20,3 +20,7 @@ md5sum = 8157c22134200bd862a07c6521ebf799
[yarn.lock]
_update_hash_filename_ = yarn.lock
md5sum = b1012625be07ad6a3daf27b9ed6004f0
[ms-python-disable-jedi-buildout.patch]
_update_hash_filename_ = ms-python-disable-jedi-buildout.patch
md5sum = 0ec840ffecceaf7e91a037d439962415
component/theia/ms-python-disable-jedi-buildout.patch
0 → 100644
View file @
f95765bf
jedi: Disable discover_buildout_paths
This slows down jedi a lot and can make it crash on some scripts.
See also https://github.com/davidhalter/jedi/issues/1325
---
extension/pythonFiles/lib/python/jedi/inference/sys_path.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/extension/pythonFiles/lib/python/jedi/inference/sys_path.py b/extension/pythonFiles/lib/python/jedi/inference/sys_path.py
index 5b82ec1..256b19c 100644
--- a/extension/pythonFiles/lib/python/jedi/inference/sys_path.py
+++ b/extension/pythonFiles/lib/python/jedi/inference/sys_path.py
@@ -137,6 +137,7 @@
def check_sys_path_modifications(module_context):
def discover_buildout_paths(inference_state, script_path):
buildout_script_paths = set()
+ return buildout_script_paths
for buildout_script_path in _get_buildout_script_paths(script_path):
for path in _get_paths_from_buildout_script(inference_state, buildout_script_path):
software/theia/README.md
View file @
f95765bf
# Theia software release
Theia is a cloud (and desktop) IDE https://www.theia-ide.org
This version comes pre-configured with a few plugins, but does not come with python plugin, to let
you choose between theia and vscode one.
## jedi
[
jedi
](
https://github.com/davidhalter/jedi
)
which is used by both thiea and vscode python plugins has
some support for
`zc.buildout`
. It looks up for a
`buildout.cfg`
file and if found will load all scripts
from the bin directory from this buildout to add eggs to sys.path. In webrunner we have almost 100 scripts
in bin directory, with maybe 30 eggs in each scripts, so this makes jedi so slow it's unusable. Also, if
an error occurs parsing these scripts, jedi won't be usable. This issue is tracked in
https://github.com/davidhalter/jedi/issues/1325
A simple workaround is to create and empty
`buildout.cfg`
file at the root of project folder.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment