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: invalidate snapshot when a new file is added to the package #34678

Closed
stamblerre opened this issue Oct 3, 2019 · 5 comments
Closed

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 3, 2019

Our metadata cache invalidation strategy relies on us knowing that a file belongs to a given package. If a new file is added to an existing package, we don't invalidate the metadata for the package, since we don't yet know which package the file belongs to. We need to do this invalidation correctly.

/cc @myitcv

@zikaeroh
Copy link
Contributor

@zikaeroh zikaeroh commented Oct 17, 2019

Isn't that this issue?

@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented Oct 17, 2019

Good call. You'd think GitHub would be able to detect that.

@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented Oct 17, 2019

Duplicate of #34218

@stamblerre stamblerre marked this as a duplicate of #34218 Oct 17, 2019
@myitcv
Copy link
Member

@myitcv myitcv commented Oct 18, 2019

@stamblerre just to confirm we're not talking about watched files here, correct? Or are you saying that watched files and new files effectively collapse down to the same underlying problem?

@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented Oct 18, 2019

I think they are ultimately in the same realm, particularly because when you start watching changed files, you get a notification that a file has been created, as well as a textDocument/didOpen. I will make sure that it works correctly with watched files both on and off, though.

@golang golang locked and limited conversation to collaborators Oct 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.