Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: print import stack when reporting error constructing build list #30661
In module mode, every build starts by constructing the build list, the set of modules at specific versions that will be involved in the build. We construct the build list by exploring the import graph rooted at the command line arguments, adding modules to satisfy any imports that can't be resolved.
There are a number of things that can go wrong during this process, not all of which are under the user's direct control. For example, suppose a transitive dependency requires
When an error like this occurs, we should report the chain of imports from the command line arguments to the problematic package.