diff --git a/internal/lsp/command.go b/internal/lsp/command.go index 2b51dd7c1a..7c7bc44301 100644 --- a/internal/lsp/command.go +++ b/internal/lsp/command.go @@ -150,7 +150,7 @@ func (s *Server) executeCommand(ctx context.Context, params *protocol.ExecuteCom if err := source.UnmarshalArgs(params.Arguments, &fileURI); err != nil { return nil, err } - pkgDir := span.URI(path.Dir(fileURI.Filename())) + pkgDir := span.URIFromPath(path.Dir(fileURI.Filename())) s.gcOptimizationDetailsMu.Lock() if _, ok := s.gcOptimizatonDetails[pkgDir]; ok { delete(s.gcOptimizatonDetails, pkgDir)