Skip to content

Cherry-pick Pipfile detection fix for 2018.2.1 #1002

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

Merged
merged 2 commits into from
Mar 9, 2018

Conversation

brettcannon
Copy link
Member

No description provided.

wjt and others added 2 commits March 9, 2018 09:39
On platforms with case-sensitive filesystems, like Linux, these are not
equivalent. pipenv documents that the file should be called Pipfile[0]
and `Pipfile.find()` only finds files matching this exact case[1].

As a result, even if `pipenv --venv` in `cwd` would return success, it
will never be run on Linux, and Code never detects the pipenv. (You can
work around this with `touch pipfile`.) With this change, it's detected
successfully. I believe there's no need to add a backwards-compatibility
check for the old case, because on platforms where the old, incorrect
check worked, so will the new, correct one.

[0] https://docs.pipenv.org/basics/#example-pipfile-pipfile-lock
[1] https://github.com/pypa/pipfile/blob/5acb9ac7/pipfile/api.py#L76-L85
@brettcannon brettcannon requested a review from DonJayamanne March 9, 2018 17:45
@codecov
Copy link

codecov bot commented Mar 9, 2018

Codecov Report

Merging #1002 into release-2018.2 will decrease coverage by 0.27%.
The diff coverage is 100%.

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-2018.2    #1002      +/-   ##
==================================================
- Coverage           64.27%   63.99%   -0.28%     
==================================================
  Files                 260      260              
  Lines               12024    12024              
  Branches             2129     2129              
==================================================
- Hits                 7728     7695      -33     
- Misses               4287     4320      +33     
  Partials                9        9
Impacted Files Coverage Δ
...ent/interpreter/locators/services/pipEnvService.ts 68.08% <100%> (ø) ⬆️
src/client/linters/errorHandlers/notInstalled.ts 33.33% <0%> (-61.12%) ⬇️
src/client/linters/errorHandlers/errorHandler.ts 77.77% <0%> (-22.23%) ⬇️
src/client/common/logger.ts 33.33% <0%> (-20%) ⬇️
src/client/common/application/applicationShell.ts 23.07% <0%> (-7.7%) ⬇️
src/client/linters/baseLinter.ts 85.41% <0%> (-6.25%) ⬇️
src/client/common/installer/productInstaller.ts 61.7% <0%> (-4.26%) ⬇️
...reter/locators/services/cacheableLocatorService.ts 91.83% <0%> (-2.05%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f777f6...1bd76fa. Read the comment docs.

@DonJayamanne DonJayamanne merged commit 3008532 into microsoft:release-2018.2 Mar 9, 2018
@brettcannon brettcannon deleted the release-2018.2 branch August 9, 2018 23:57
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants