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
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@stamblerre
Copy link
Contributor

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

@stamblerre stamblerre added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. gopls Issues related to the Go language server, gopls. labels Oct 3, 2019
@gopherbot gopherbot added this to the Unreleased milestone Oct 3, 2019
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Oct 3, 2019
@stamblerre stamblerre marked this as a duplicate of #34678 Oct 17, 2019
@zikaeroh
Copy link
Contributor

Isn't that this issue?

@stamblerre
Copy link
Contributor Author

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

@stamblerre
Copy link
Contributor Author

Duplicate of #34218

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

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

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.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants