gen
gen copied to clipboard
Support import source file, instead of import only gc-generated file
There are 2 changes:
- Support import source file and gc-generated file, instead of import only gc-generated file Scenario: If a project proj has two package : proj/a and proj/b, proj/b import proj/a, and proj/a is not “go install”ed. When use gcimporter only, gen proj/b will failed with “proj/a is not found for import”. It will work with importer.
The code change is to use customized types.Config to check type, instead of types.Check. In the types.Config, Import will use importer to import libs, including source file and gc-generated files
- Update predicates.isComparable, to support go.tools for go1.2
Thanks.
There is currently package code.google.com/p/go.tools/importer
. There is go.tools/go/importer
, but its API is different than here.
@mjibson Thank you for comment.
I think code.google.com/p/go.tools/importer
and go.tools/go/importer
are very different. code.google.com/p/go.tools/importer
is on release-branch-go1.2
and is able to import source and binary, while go.tools/go/importer
can only, accroding to its API, "ImportData imports a package from the serialized package data".
I have no idea if they're related or not, and was confused by the fact that they provide different functions under similar namespace...