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

WIP: Fix nodePath issue #180

Closed
wants to merge 2 commits into from
Closed

WIP: Fix nodePath issue #180

wants to merge 2 commits into from

Conversation

maxdeviant
Copy link

This PR aims to fix the issue described in #179 and vscode-tslint (#173).

@msftclas
Copy link

msftclas commented Mar 6, 2017

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

1 similar comment
@msftclas
Copy link

msftclas commented Mar 6, 2017

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@maxdeviant
Copy link
Author

I added some trace statements around what I think is the problematic area to see if it can shed some light on the issue.

I do not have an environment set up where I can test all of this locally against the vscode-tslint extension, so I'm not really sure how to best proceed.

@@ -209,12 +209,23 @@ export function resolveModulePath(workspaceRoot: string, moduleName: string, nod
nodePath = path.join(workspaceRoot, nodePath);
}
return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
if (tracer) {
tracer(`Resolved module path is ${value}`);
}
if (value.indexOf(path.normalize(nodePath)) === 0) {
Copy link
Author

Choose a reason for hiding this comment

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

I think the issue lies with this indexOf check. It could be something as simple as c:/ vs C:/ in the path name.

Between this trace statement and the one in the else case, it should be hopefully be pretty clear what is going wrong.

@dbaeumer
Copy link
Member

dbaeumer commented Mar 7, 2017

I will close the PR since it only added logging. I implemented a correct path comparison depending on the OS the server is running.

@dbaeumer dbaeumer closed this Mar 7, 2017
@maxdeviant
Copy link
Author

@dbaeumer Thank you so much! Will the fix be in the next version of VS Code?

@dbaeumer
Copy link
Member

dbaeumer commented Mar 9, 2017

No, since VS Code doesn't ship the vscode-tslint extension. We first need to publish an official version of the libraries (version 3.2.0) and then vscode-tslint need to pull the new version in and deliver a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants