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

x/tools/gopls: error when renaming interface method involving type aliases #39269

Open
inliquid opened this issue May 27, 2020 · 6 comments
Open

x/tools/gopls: error when renaming interface method involving type aliases #39269

inliquid opened this issue May 27, 2020 · 6 comments
Labels
Milestone

Comments

@inliquid
Copy link

@inliquid inliquid commented May 27, 2020

  1. VS Code
  2. gopls@master

Trying to rename this method:

type Fetcher interface {
	Data(ctx context.Context, collection, id string) (d *bson.M, ok bool)
}

Got this error:

[Error - 14:18:06] Request textDocument/rename failed.
  Message: internal error: during renaming of abstract method func (gitlab.com/***/***/pkg/service.Fetcher).Data(ctx context.Context, collection string, id string) (d *go.mongodb.org/mongo-driver/bson/primitive.M, ok bool)	changedMethods=false, coupled method=func (*gitlab.com/***/***/pkg/service.FetcherGeneric).Data(ctx context.Context, collection string, id string) (*go.mongodb.org/mongo-driver/bson/primitive.M, bool)	Please file a bug report
  Code: 0 
@gopherbot gopherbot added the Tools label May 27, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented May 27, 2020

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@gopherbot gopherbot added the gopls label May 27, 2020
@gopherbot gopherbot added this to the Unreleased milestone May 27, 2020
@heschik
Copy link
Contributor

@heschik heschik commented May 27, 2020

The problem is probably related to M being a type alias: https://pkg.go.dev/go.mongodb.org/mongo-driver/bson?tab=doc#M.

@heschik heschik changed the title x/tools/gopls: error when renaming interface method x/tools/gopls: error when renaming interface method involving type aliases May 27, 2020
@inliquid

This comment was marked as off-topic.

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.5.0 May 27, 2020
@heschik

This comment was marked as off-topic.

@inliquid

This comment was marked as off-topic.

@heschik

This comment was marked as off-topic.

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

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.