GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Check getCurrentDirectory availability in getEffectiveTypeRoots by zhengbli · Pull Request #9396 · microsoft/TypeScript

Conversation

@zhengbli

@zhengbli Zhengbo Li (zhengbli) commented Jun 28, 2016

Copy link
Copy Markdown

Fixes #9186
The crash happened because the getEffectiveTypeRoots assumes getCurrentDirectory for the host. Adding to ServerHost solves the problem.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
zhengbli
Add getCurrentDirectory to ServerHost
6ff91b8
@msftclas Microsoft Contribution License Agreements (msftclas) added the cla-not-required label Jun 28, 2016
mhegazy
mhegazy reviewed Jun 28, 2016
View reviewed changes
Comment thread src/server/editorServices.ts Outdated
this.moduleResolutionHost = {
fileExists: fileName => this.fileExists(fileName),
readFile: fileName => this.host.readFile(fileName),
getCurrentDirectory: () => this.host.getCurrentDirectory(),

@mhegazy Mohamed Hegazy (mhegazy) Jun 28, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

this is the tsserver install location, correct? do not see how this can be useful.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
zhengbli
Add nullchecks for typeRoots, remove getCurrentDirectory from ServerH…
d5cad23
…ost as it is always the installation location
@zhengbli Zhengbo Li (zhengbli) changed the title Add getCurrentDirectory to ServerHost Check getCurrentDirectory availability in getEffectiveTypeRoots Jun 28, 2016
@mhegazy

Mohamed Hegazy (mhegazy) commented Jun 28, 2016

Copy link
Copy Markdown
Contributor

👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zhengbli
Zhengbo Li (zhengbli) merged commit 50177b1 into microsoft:master Jun 28, 2016
@zhengbli
Zhengbo Li (zhengbli) deleted the fix9186 branch June 28, 2016 20:01
@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@zhengbli @mhegazy @msftclas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.