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: no AST for file after adding and removing file #34218

Open
inliquid opened this issue Sep 10, 2019 · 4 comments

Comments

@inliquid
Copy link

commented Sep 10, 2019

  1. VS Code
  2. gopls@master
  3. Windows

After adding model/friends.go and then removing it, I'm getting this error anytime I want to import model package:

could not import ***/***/***/pkg/data/model (failed to cache file file:///c:/Users/***/***/***/***/***/***/pkg/data/model/friends.go: no AST for file:///c:/Users/***/***/***/***/***/***/pkg/data/model/friends.go: open c:\Users\***\***\***\***\***\***\pkg\data\model\friends.go: The system cannot find the file specified.)

@gopherbot gopherbot added this to the Unreleased milestone Sep 10, 2019

@gopherbot

This comment has been minimized.

Copy link

commented Sep 10, 2019

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

@gopherbot gopherbot added the gopls label Sep 10, 2019

@stamblerre

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

Support for watching changed files is still experimental. Can you reproduce this issue if you add the following to your VSCode settings?

"gopls": {
    "watchFileChanges": true
}
@inliquid

This comment has been minimized.

Copy link
Author

commented Sep 10, 2019

I added and removed file from the editor, not externally. Do you mean that gopls will not recognize even those changes made with the editor?

@inliquid

This comment has been minimized.

Copy link
Author

commented Sep 10, 2019

I checked and got same issue with "watchFileChanges": true.

@gopherbot gopherbot added the Tools label Sep 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.