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

Test Plan for July 2018 (0.6.85) #1797

Closed
ramya-rao-a opened this issue Jul 18, 2018 · 15 comments
Closed

Test Plan for July 2018 (0.6.85) #1797

ramya-rao-a opened this issue Jul 18, 2018 · 15 comments

Comments

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Jul 18, 2018

If you got a notification from this issue, then you are part of the next update to the Go extension.
Thanks and Welcome!

As most of you know already, I am the sole maintainer of this project at the moment. I wanted to try something different for this next update.

Here I will be listing the features and the bug fixes that will go in the next update along with the the folks who logged the bugs/feature requests, those who upvoted it, and those who fixed it by sending PRs.

The idea is to get the folks behind this update to give the update a trial run before I release it.
I always do basic testing before every update. But because I dont work with Go in my day job, I always feel that someone who does Go more than me can help in testing tremendously.

And when I say "test", you can do a minimum pass of just installing the update and then do nothing special other than going about using VS Code like you do everyday. Or you can test the feature you requested/implemented or the bug you logged/fixed. Or you can test all of the below. Every bit helps.

Drop in a comment in this issue after 2 or 3 days of installing the update with your findings.
Also, let me know in the comments what you think of this model of me asking your help in testing an update before releasing it.

To install the update,

@ramya-rao-a
Copy link
Contributor Author

ramya-rao-a commented Jul 18, 2018

Features:

Bug Fixes:

@doxxx
Copy link
Contributor

doxxx commented Jul 19, 2018

#1779 does not appear to be fully fixed. I tried with go.useCodeSnippetsOnFunctionSuggestWithoutType set to true. Variables of func type are completed to just the variable name, but full functions are completed with their parameter list as well.

@doxxx
Copy link
Contributor

doxxx commented Jul 19, 2018

#1782: I still get Go core packages suggested before my current workspace's packages. E.g. I have a package called git.mycompany.com/project/repo/internal/importer and when I type imp in another package I get suggestions in this order:

  • import (keyword)
  • go/importer
  • git.mycompany.com/project/repo/internal/importer
  • golang.org/x/tools/refactor/importgraph

#1769 works for me. I had actually noticed this bug yesterday, using the current release version of the extension. 👍

#1739 works for me.

I can also confirm the debug binary cleanup works for me on Windows as well.

@marwan-at-work
Copy link
Contributor

marwan-at-work commented Jul 19, 2018 via email

@doxxx
Copy link
Contributor

doxxx commented Jul 19, 2018

@marwan-at-work I suspected as much but wanted to mention it just to be sure. Thanks!

@ramya-rao-a
Copy link
Contributor Author

Thanks for the feedback @doxxx! Can you update #1779 with the case that didnt work for you? We can continue the discussion there.

@kaskavalci
Copy link
Contributor

#1733 is a very handy feature! However, there are couple of issues with currrent implementation.

  1. If import path is named, then it doesn't work.
    import router "github.com/julienschmidt/httprouter"
  2. If package is not in GOPATH already, command fails silently without adding the package.

@ramya-rao-a
Copy link
Contributor Author

@kaskavalci For named import path, where did you keep your cursor before invoking the command? It works for me when the cursor is in the import path, but not on the alias.

I've pushed d2579a5 to add a msg when package not found.

@kaskavalci
Copy link
Contributor

@ramya-rao-a I highlighted import path including the name. It works for unnamed paths but named paths it silently fails. Without highlighting, if cursor is anywhere on the import path line, it does work for me too. It may be bit confusing for new users.

@freman
Copy link
Contributor

freman commented Jul 24, 2018

Hi @ramya-rao-a, @kaskavalci

I propose the following patch, unless there's other magic in the plugin already.

if (selectedText.length > 0) {
	let index = selectedText.indexOf('"')
	if (index > 0 && index < selectedText.length-1) {
		selectedText = selectedText.substr(index)
	}

	if (!selectedText.startsWith('"')) {
		selectedText = '"' + selectedText;
	}
	if (!selectedText.endsWith('"')) {
		selectedText = selectedText + '"';
	}
 	importPath = getImportPath(selectedText);
}

I've tested the following:

'some/path' => '"some/path"'
'"some/path' => '"some/path"'
'some/path"' => '"some/path"'
'"some/path"' => '"some/path"'
'thing "some/path' => '"some/path"'
'thing "some/path"' => '"some/path"'
'import thing "some/path"' => '"some/path"'

It does fall apart if someone selects multiple lines...

@ramya-rao-a
Copy link
Contributor Author

@kaskavalci @freman I've pushed a fix that should take care of the above cases. Do try the latest vsix file and that should have the fix.
@freman Failing in case of multiple lines is ok. I've added a notification on error. That should be enough

@kaskavalci
Copy link
Contributor

@ramya-rao-a all cases are working. The best part, it can import the selected text, not the whole import path. Thanks!

@freman
Copy link
Contributor

freman commented Jul 25, 2018

@kaskavalci that's my favourite bit too, trust me after a week of playing with AWS import paths 😀

@zo0o0ot
Copy link

zo0o0ot commented Jul 25, 2018

I'm glad you are working on the Delve debug files issue. Keep up the good work!

@ramya-rao-a
Copy link
Contributor Author

Thanks everyone! 0.6.85 update is released.

@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants