We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ef6d9e commit 3a5f466Copy full SHA for 3a5f466
private/buf/buflsp/file.go
@@ -210,6 +210,14 @@ func (f *file) RefreshWorkspace(ctx context.Context) {
210
//
211
// This operation requires a workspace.
212
func (f *file) RefreshIR(ctx context.Context) {
213
+ if f.objectInfo == nil {
214
+ // This can happen if the file that is opened is excluded from the workspace through
215
+ // includes/excludes in the build. In those cases, we ignore the file, the same way
216
+ // the rest of our tools would.
217
+ // In the future, we may want to rework this behavior in the LSP.
218
+ return
219
+ }
220
+
221
f.lsp.logger.Info(
222
"parsing IR for file",
223
slog.String("uri", string(f.uri)),
0 commit comments