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

Separate files in pythonFiles by task #4609

Open
brettcannon opened this issue Mar 1, 2019 · 3 comments
Open

Separate files in pythonFiles by task #4609

brettcannon opened this issue Mar 1, 2019 · 3 comments
Labels
area-internal Label for non-user facing issues debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs spike Label for issues that need investigation before they can be worked on.

Comments

@brettcannon
Copy link
Member

When debugging, the whole of pythonFiles is put on to sys.path via PYTHONPATH. This led to an issue requiring a hotfix due to the tests package accidentally being shipped in the .vsix. Unfortunately this will continue to be a problem for any code placed in that directory.

To help minimize future clashes with user code during debugging, it would be best to separate all code in that directory into thematic directories to minimize the chance of shadowing user's code. This is somewhat already done when dependencies are installed into pythonFiles/lib/python instead of into pythonFiles directly.

@brettcannon brettcannon added debt Covers everything internal: CI, testing, refactoring of the codebase, etc. feature-* labels Mar 1, 2019
@DonJayamanne
Copy link

Shouldn't we also consider deleting sys.path[0] from our code, before running user code, this way the current path will not be added to sys.path preventing such future issues?
That feels like a future proof solution

@ericsnowcurrently ericsnowcurrently self-assigned this Mar 5, 2019
@DonJayamanne DonJayamanne added the important Issue identified as high-priority label Mar 5, 2019
@ericsnowcurrently ericsnowcurrently removed their assignment Mar 5, 2019
@luabud luabud added needs proposal Need to make some design decisions and removed needs decision important Issue identified as high-priority labels Mar 12, 2019
@DonJayamanne DonJayamanne changed the title Consider separating files in pythonFiles by task Spike - Consider separating files in pythonFiles by task Mar 13, 2019
@DonJayamanne DonJayamanne removed this from the 2019, week 11 - March Sprint 6 milestone Mar 13, 2019
@luabud luabud added needs spike Label for issues that need investigation before they can be worked on. and removed needs proposal Need to make some design decisions labels Mar 12, 2020
@luabud luabud added area-internal Label for non-user facing issues and removed feature-* labels May 13, 2020
@brettcannon brettcannon changed the title Spike - Consider separating files in pythonFiles by task Separate files in pythonFiles by task Dec 9, 2022
@eleanorjboyd
Copy link
Member

@karthiknadig - curious on your thoughts on this now since this is a few years old

@karthiknadig
Copy link
Member

We should still do this. A lot of the files in that directory were testing related, so those can now be moved around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-internal Label for non-user facing issues debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs spike Label for issues that need investigation before they can be worked on.
Projects
None yet
Development

No branches or pull requests

6 participants