Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(language-service): resolve the real path for symlink #35895

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

Closed
wants to merge 1 commit into from

Conversation

ivanwonder
Copy link
Contributor

when AOT resolves the module name, it will preserve the path of the symlink (because of no host.realpath), but the ts-server will return the real path for symlink(https://github.com/angular/vscode-ng-language-service/blob/9120631a10fc9d49b4dd16c9976cc4222b98f3ff/server/src/server_host.ts#L132).

I don't know if it needs a test case.

fixed: angular/vscode-ng-language-service#657

https://github.com/microsoft/TypeScript/blob/6769313eee2f2403387ea935a4fef4dfddae7671/src/compiler/moduleNameResolver.ts#L951

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from ayazhafiz March 6, 2020 05:27
Copy link
Contributor

@ayazhafiz ayazhafiz left a comment

Choose a reason for hiding this comment

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

LGTM, great job figuring this out!

@ayazhafiz ayazhafiz added area: language-service Issues related to Angular's VS Code language service feature Issue that requests a new feature labels Mar 6, 2020
@ngbot ngbot bot added this to the needsTriage milestone Mar 6, 2020
when AOT resolves the module name, it will preserve the path of the symlink, but the ts-server will return the real path for symlink.
@ivanwonder ivanwonder force-pushed the resolve-symlink-path branch from 1194096 to fd4aca5 Compare March 6, 2020 10:43
@ivanwonder ivanwonder requested a review from ayazhafiz March 6, 2020 10:43
@ayazhafiz ayazhafiz added action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release labels Mar 6, 2020
@matsko matsko closed this in 4e1d780 Mar 6, 2020
@ivanwonder ivanwonder deleted the resolve-symlink-path branch March 8, 2020 11:03
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: language-service Issues related to Angular's VS Code language service cla: yes feature Issue that requests a new feature target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot resolve definitions from pnpm modules
3 participants