You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is proposal 2 of 3 coming out of the discussion of issue #38234.
We propose adding a pointer to new struct containing module information to the Package struct. This struct might be the Module struct reported by go list, or another struct defined in x/tools/go/packages or somewhere in x/mod.
go/packages was originally conceived as being build-system independent, and not all build systems use modules. But now, even Bazel supports modules, and even if a user isn't using modules for their own build, they need to produce modules for consumers of their libraries. Given how widespread the use of modules is, and how modules can be used across build systems, it seems reasonable to add information about a package's module (if it has one) to its Package struct.
If this proposal were accepted, we'd also need to add a Need bit to request a module, and give users the expectation that module information might not always be present.
The text was updated successfully, but these errors were encountered:
It's pretty close. If you want, I can retitle #35921 and close this issue in favor of that one.
The main remaining differences are that we still need to discuss exactly what struct we're putting in Package (module public is unexported, and whichever struct we pick should probably be defined in x/mod), and that we'd need a Need bit for the field.
This is proposal 2 of 3 coming out of the discussion of issue #38234.
We propose adding a pointer to new struct containing module information to the Package struct. This struct might be the Module struct reported by
go list
, or another struct defined in x/tools/go/packages or somewhere in x/mod.go/packages was originally conceived as being build-system independent, and not all build systems use modules. But now, even Bazel supports modules, and even if a user isn't using modules for their own build, they need to produce modules for consumers of their libraries. Given how widespread the use of modules is, and how modules can be used across build systems, it seems reasonable to add information about a package's module (if it has one) to its Package struct.
If this proposal were accepted, we'd also need to add a Need bit to request a module, and give users the expectation that module information might not always be present.
The text was updated successfully, but these errors were encountered: