On Tue, May 3, 2016 at 10:43 AM John Meinel <[email protected]> wrote:
> > > > > We should investigate using go/build.Context.UseAllFiles to ignore the > build tags. As long as there are no "//+build ignore" files lurking, and as > long as we're not trying to do type-checking, that should be fine. > > > > I'm curious how this works. As often we use build flags to create a > different version of a function for different platforms. (Eg for lxd we had > a few functions that had real implementations with a "+build go1.3" flag > and then stubs that returned false with the !go1.3 flag.) I believe we did > the same thing for windows/osx support on some of the version code) > IIANM, Nate's test operates at the AST level, and doesn't really need to operate on a package as a whole (it's checking for direct references to a tls.Config I think?). If it doesn't need to be a valid package, then we can analyse the individual files, thus platform-specific alternatives, separately. Having said that, we should not discount the possibility of higher level analyses that do want valid packages. Those will probably need to be per-platform, as Nate says. Cheers, Andrew >
-- Juju-dev mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
