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

Fix bug: normalize path after combining #21100

Merged
1 commit merged into from
Jan 9, 2018

Conversation

ghost
Copy link

@ghost ghost commented Jan 9, 2018

Fixes #19113 (the one remaining bug as far as I can tell)
(Continuation of #21072)

@ghost ghost requested a review from armanio123 January 9, 2018 19:20
@ghost ghost merged commit fed34cd into master Jan 9, 2018
@ghost ghost deleted the completionsPaths_pathMapping_parentDirectory branch January 9, 2018 19:54
@web-dave
Copy link

Is this fix in the released version? Face the issue: build is OK but vscode says error.

@ghost
Copy link
Author

ghost commented Feb 1, 2018

@web-dave It's possible that vscode is using a different TypeScript version than your build. Could you check that both are using typescript@next (in vscode it should tell you the TS version in the lower-right -- instructions here), and file a new issue if there is one?
EDIT: Actually, this PR won't affect a command-line build because it only affects completions.

@baflo
Copy link

baflo commented Feb 2, 2018

@Andy-MS I'm running 2.7.1 in my workspace and with vscode. But I don't get code completion running as expected (it would work with app/... though):

image

@ghost
Copy link
Author

ghost commented Feb 2, 2018

@baflo I was able to get completions in 2.7.1 using:

tsconfig.json:

{
  "compilerOptions": {
    "baseUrl": "./src",
    "paths": {
      "@app/*": ["./app/*"]
    }
  }
}

src/a.ts: import {} from "@app"; (type a / after @app to get completions)

src/app/b.ts: export const x = 0;

Does this work for you? If so, could you try and get a simplified version of your situation that doesn't have the completions?

@baflo
Copy link

baflo commented Feb 4, 2018

Hey @Andy-MS , I played a bit with your config. And I kind of get positive results. But not continuously.

Say I have your structure, but additionally a folder src/c with files src/c/c.ts and src/c/index.ts, then I can resolve b.ts but not files in src/c (only when I manually add the c/):

image

image

With the baseUrl setting it works well, however:

image

@ghost
Copy link
Author

ghost commented Feb 5, 2018

@baflo Thanks, looks like that was a bug that didn't show up in tests due to our test host differing from the real one.

@pie6k
Copy link

pie6k commented Feb 6, 2018

I've set VS Code ts version to 2.7 and I'm still having issue with paths not working properly

image

image

image

@ghost
Copy link
Author

ghost commented Feb 6, 2018

@pie6k Thanks, fixed in #21704

@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
This pull request was closed.
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.

4 participants