Skip to content

Conversation

@ikarishinjieva
Copy link

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.

…t also go source 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.
@madelynnblue
Copy link
Contributor

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

@ikarishinjieva
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants