golang/go

x/mod/modfile: document which fields in a parsed modfile may be nil

Open

#60,898 创建于 2023年6月20日

在 GitHub 查看
 (1 评论) (1 反应) (1 负责人)Go (19,008 fork)batch import
DocumentationNeedsInvestigationhelp wantedmodules

仓库指标

Star
 (133,883 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

We've had several crashes in gopls related to modfile.File.Module being nil.

On the other hand, we have a bunch of code checking if modfile.File.Module.Syntax is nil -- is that possible if modfile.File.Module is non-nil?

It would be nice if the modfile API documented which fields may be nil.

CC @bcmills @adonovan

贡献者指南