Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Fixed wrong workspace when one gopath is the substring of another. #658

Merged
merged 2 commits into from
Nov 29, 2016
Merged

Fixed wrong workspace when one gopath is the substring of another. #658

merged 2 commits into from
Nov 29, 2016

Conversation

potterdai
Copy link
Contributor

Fixed wrong workspace when one gopath is the substring of another in “canonicalizeGOPATHPrefix” of “util.ts”.

…ath in “canonicalizeGOPATHPrefix” of “util.ts”.
@msftclas
Copy link

Hi @potterdai, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

@@ -98,12 +98,17 @@ export function canonicalizeGOPATHPrefix(filename: string): string {
if (!gopath) return filename;
let workspaces = gopath.split(path.delimiter);
let filenameLowercase = filename.toLowerCase();

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment here about the logic being used, so that the next person knows whats going on?
The unit tests are failing in travis due to linting issues. Run npm run lint locally and fix the reported errors.

- Fixed CI complaints about linting issues
@ramya-rao-a
Copy link
Contributor

Thanks @potterdai ! Will merge as soon as all the tests pass.

@ramya-rao-a ramya-rao-a merged commit c967ca4 into microsoft:master Nov 29, 2016
@ramya-rao-a
Copy link
Contributor

The latest update 0.6.51 has this fix.

mattetti added a commit to mattetti/vscode-go that referenced this pull request Jan 11, 2017
* 'master' of github.com:mattetti/vscode-go: (128 commits)
  Add telemetry support for the Go extension
  Add dlv path to error msg when dlv not found
  Fixes microsoft#465 outline offset problem in No-English language (microsoft#699)
  fix coverage display when editor changes to undefined (microsoft#693)
  Add support for reading http.proxy setting (microsoft#639)
  Fixing flaky unit tests
  Refactor for corner cases
  Reduce noise in console log due to errors from hover
  Changelog for next update 0.6.51
  Remove space after brackets in snippet as per microsoft#628
  Fixes microsoft#647 Strip version from autocompleted pkgs from gopkg.in (microsoft#659)
  Fixes microsoft#647 Support vendor pkgs from root of GOPATH/src (microsoft#660)
  Fixes microsoft#640 Use spawn to handle big data from gocode (microsoft#661)
  Fixed wrong workspace when one gopath is the substring of another. (microsoft#658)
  Fix "gotests" when generates test for current function for type methods (microsoft#657)
  Add benchmark function snippet (microsoft#648)
  Fix "Go to Definition" when running Go HEAD (microsoft#655)
  Fixes microsoft#642 Only add -d once to formatflags (microsoft#644)
  Updating Changelog and package.json for 0.6.50 update
  Log errors to console
  ...
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.

3 participants