Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pyls.extraSysPath. Fixes #381 #382

Closed
wants to merge 1 commit into from
Closed

Conversation

Kronuz
Copy link

@Kronuz Kronuz commented Jun 21, 2018

This adds extraSysPath to extend extra_sys_path passed to Jedi.

@Kronuz Kronuz force-pushed the develop branch 2 times, most recently from e55d410 to 05c7b70 Compare June 21, 2018 18:12
Copy link
Contributor

@gatesn gatesn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we should have settings.get('extraSysPath', []) + self.source_roots(path)

@@ -93,9 +94,12 @@ def source_roots(self, document_path):

def _create_document(self, doc_uri, source=None, version=None):
path = uris.to_fs_path(doc_uri)
extra_sys_path = self.source_roots(path)
settings = self._config.settings(doc_uri)
extra_sys_path.extend(settings.get('extraSysPath', []))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extend? Or prepend? I wonder if an explicit config override should be put at the front of the sys path

@gagbo
Copy link

gagbo commented May 23, 2019

Should the work on this start again, would this be merged ? I don't understand why it stalled exactly, and this is exactly the feature I'm missing.

I think I prefer prepending the extra_sys_path (or maybe give one after and one before options), because I would want to put specific PYTHONPATH values here, which are inserted early in sys.path() when running a python program. Especially when, as @gatesn says, it is an override.

EDIT : Actually, setting PYTHONPATH correctly should do the trick already (from adding a few logs in 0.26 code). At least, sys_path has a correct value, but jedi still doesn't pick up the folder like I want. I'll make a minimal example soon hopefully

@ccordoba12
Copy link
Contributor

This was implemented in PR #680.

@ccordoba12 ccordoba12 closed this Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants