support mutiple platform/architect dependent definitions#1
Conversation
There was a problem hiding this comment.
Unfortunately this isn't sufficient. You can have files that are platform-dependent because of build tags, not just their file names.
There was a problem hiding this comment.
Yes...But now I haven't found a good way to handle this, because we use the go/build's default context which is for current GOOS and GOARCH. If we want all platform/arch associated files, we need pass all the combinations of GOOS/GOARCH/CGO... Any idea?
There was a problem hiding this comment.
If we're using the default context, how do we ever get more than one definition of a symbol with this code?
I have been pondering this issue for a while, as it also comes up in other contexts (for example, my godeps tool should really find dependencies from all architectures, which it currently does not).
Unfortunately I'm about out of time for the week now. I'll have a think over the weekend and when I get back on Monday.
There was a problem hiding this comment.
Sorry, I misunderstood...I have added the build tag support in the new patch set.
88f30c0 to
76939e5
Compare
when there are multiple platform/architect implements, all of them will be printed. Signed-off-by: Tw <tw19881113@gmail.com>
76939e5 to
212fe42
Compare
|
I have uploaded a new patch set, please help to review |
|
I'm sorry for taking so long to get around to reviewing this. I've spent A few issues that I noted when working through this:
Even though there are actually two alternative definitions of foo.X
because redeclared assumes that its second argument is the
I'm sorry - this isn't an easy problem, which is why I've put off doing it for so long! |
when there are multiple platform/architect implements,
all of them will be printed.