gen icon indicating copy to clipboard operation
gen copied to clipboard

Support import source file, instead of import only gc-generated file

Open ikarishinjieva opened this issue 11 years ago • 2 comments

There are 2 changes:

  1. 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

  1. Update predicates.isComparable, to support go.tools for go1.2

Thanks.

ikarishinjieva avatar Feb 26 '14 05:02 ikarishinjieva

There is currently package code.google.com/p/go.tools/importer. There is go.tools/go/importer, but its API is different than here.

maddyblue avatar Apr 18 '14 01:04 maddyblue

@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...

ikarishinjieva avatar Apr 19 '14 04:04 ikarishinjieva