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/mod/modfile: document which fields in a parsed modfile may be nil #60898

Open
findleyr opened this issue Jun 20, 2023 · 1 comment
Open

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

findleyr opened this issue Jun 20, 2023 · 1 comment
Assignees
Labels
Documentation help wanted modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@findleyr
Copy link
Contributor

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

@gopherbot gopherbot added this to the Unreleased milestone Jun 20, 2023
@bcmills bcmills added help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. modules labels Jun 20, 2023
@adonovan adonovan self-assigned this Jul 4, 2023
@gopherbot
Copy link

Change https://go.dev/cl/507875 mentions this issue: modfile: document optional fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation help wanted modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants