SourceImports determines whether to satisfy dependencies by loading Go source code.

If true, the entire program---the initial packages and their transitive closure of dependencies---will be loaded, parsed and type-checked. This is required for whole-program analyses such as pointer analysis.

If false, the TypeChecker.Import mechanism will be used instead. Since that typically supplies only the types of package-level declarations and values of constants, but no code, it will not yield a whole program. It is intended for analyses that perform modular analysis of a single package, e.g. traditional compilation.

The initial packages (CreatePkgs and ImportPkgs) are always loaded from Go source, regardless of this flag's setting.

SourceImports is referenced in 0 repositories