Commit f95765bf authored by Jérome Perrin's avatar Jérome Perrin

theia: patch python extension for jedi buildout bug

parent e1e47684
......@@ -71,7 +71,17 @@ install =
extract_dir = self.extract(, 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:
patch_options=options.get(extension_name + '-patch-options', '-p1'),
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}
content =
......@@ -20,3 +20,7 @@ md5sum = 8157c22134200bd862a07c6521ebf799
_update_hash_filename_ = yarn.lock
md5sum = b1012625be07ad6a3daf27b9ed6004f0
_update_hash_filename_ = ms-python-disable-jedi-buildout.patch
md5sum = 0ec840ffecceaf7e91a037d439962415
jedi: Disable discover_buildout_paths
This slows down jedi a lot and can make it crash on some scripts.
See also
extension/pythonFiles/lib/python/jedi/inference/ | 1 +
1 file changed, 1 insertion(+)
diff --git a/extension/pythonFiles/lib/python/jedi/inference/ b/extension/pythonFiles/lib/python/jedi/inference/
index 5b82ec1..256b19c 100644
--- a/extension/pythonFiles/lib/python/jedi/inference/
+++ b/extension/pythonFiles/lib/python/jedi/inference/
@@ -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):
# Theia software release
Theia is a cloud (and desktop) IDE
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]( 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
A simple workaround is to create and empty `buildout.cfg` file at the root of project folder.
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