Skip to content

Centralize fs usage. - #8993

Merged
Eric Snow (ericsnowcurrently) merged 26 commits into
microsoft:masterfrom
ericsnowcurrently:centralize-fs-usage
Dec 17, 2019
Merged

Eric Snow (ericsnowcurrently) merged 26 commits into
microsoft:masterfrom
ericsnowcurrently:centralize-fs-usage

Conversation

@ericsnowcurrently

@ericsnowcurrently Eric Snow (ericsnowcurrently) commented Dec 10, 2019 •

Copy link
Copy Markdown

(for #8995)

This is a partial un-revert of the recent FS changes. This change in particular only consolidates all FS-related operations to use of FileSystem objects.

@ericsnowcurrently Eric Snow (ericsnowcurrently) added the no-changelog No news entry required label Dec 10, 2019
@codecov-io

Codecov (codecov-io) commented Dec 10, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #8993 into master will increase coverage by 0.02%.
The diff coverage is 35.03%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8993      +/-   ##
==========================================
+ Coverage   57.45%   57.48%   +0.02%     
==========================================
  Files         551      550       -1     
  Lines       29316    29301      -15     
  Branches     4447     4439       -8     
==========================================
  Hits        16844    16844              
+ Misses      11533    11518      -15     
  Partials      939      939
Impacted Files Coverage Δ
src/client/common/platform/types.ts 100% <ø> (ø) ⬆️
src/client/datascience/jupyter/jupyterImporter.ts 16.47% <0%> (-0.98%) ⬇️
...datascience/jupyter/liveshare/hostJupyterServer.ts 12.35% <0%> (-0.15%) ⬇️
.../datascience/interactive-common/interactiveBase.ts 17.93% <0%> (-0.14%) ⬇️
...tascience/jupyter/liveshare/hostJupyterNotebook.ts 8.55% <0%> (ø) ⬆️
...rc/client/common/application/webPanels/webPanel.ts 14.28% <0%> (-1.59%) ⬇️
src/client/datascience/jupyter/jupyterNotebook.ts 4.87% <0%> (-0.22%) ⬇️
...rpreter/locators/services/baseVirtualEnvService.ts 28.3% <0%> (ø) ⬆️
src/client/workspaceSymbols/provider.ts 93.33% <100%> (ø) ⬆️
src/client/debugger/extension/adapter/logging.ts 100% <100%> (ø) ⬆️
... and 21 more

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 9976f85...5080b06. Read the comment docs.

Comment thread src/client/datascience/interactive-common/interactiveBase.ts Outdated
Comment thread src/client/datascience/jupyter/jupyterNotebook.ts Outdated
Comment thread src/client/datascience/themeFinder.ts Outdated
Comment thread src/client/datascience/themeFinder.ts

@rchiodo Rich Chiodo (rchiodo) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🕐

@@ -54,6 +58,9 @@ export class FileSystem implements IFileSystem {
public readFile(filePath: string): Promise<string> {
return fs.readFile(filePath).then(buffer => buffer.toString());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would it be better to call fs.readFile with a encoding option? I believe in the normal fs that returns a string. Then you don't need to do the conversion.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah, that is just left over from the existing code. Regardless, I'll update it. 😄

@rchiodo Rich Chiodo (rchiodo) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

:shipit:

@ericsnowcurrently
Eric Snow (ericsnowcurrently) merged commit 77dabe0 into microsoft:master Dec 17, 2019
@ericsnowcurrently
Eric Snow (ericsnowcurrently) deleted the centralize-fs-usage branch December 17, 2019 22:04
@lock lock Bot locked as resolved and limited conversation to collaborators Dec 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog No news entry required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants