You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
Of course, finding implementations on a function doesn't make sense. It only works on interface types and methods (finding the interfaces that implement that method).
We could make this error less confusing by e.g. just returning no error and simply returning no results.
IMHO, present error is better as it is a no-go for a function or method to be implemented. I also wonder how come it would work on methods. Sounds illogical to me.
The language server client (e.g. editors) shouldn't need to know a priori if a given location in a file is a valid location to call "find implementations". No results instead of an error makes sense to me.
I'm not sure that that's right FWIW, or it might be masking an error.
Calling "find implementations" on MustParse in github.com/kevinburke/aws-vault/vendor/github.com/alecthomas/kingpin.v2 should return at least one implementation, in github.com/kevinburke/aws-vault/main.go, but it doesn't find it.
I suppose but I guess even if I'm calling it incorrectly, it would be nice if the error message was clearer, for example, it could say "this function is not an interface definition" instead of "this function is not a method", the latter of which doesn't make much sense.
If you find implementations on a function rather than a method, you get an error:
e.g. https://sourcegraph.com/github.com/sourcegraph/go-langserver/-/blob/langserver/implementation.go#L65:6&tab=impl
Of course, finding implementations on a function doesn't make sense. It only works on interface types and methods (finding the interfaces that implement that method).
We could make this error less confusing by e.g. just returning no error and simply returning no results.
The error originates from here: https://sourcegraph.com/github.com/sourcegraph/go-langserver@bf90fac03a4d1a07f50701547d56fabfdb0c32ec/-/blob/langserver/implementation.go#L76:30
The text was updated successfully, but these errors were encountered: