• Kirill Smelkov's avatar
    golang: Break future gowork ⇄ go-git-package cycle · e11efc27
    Kirill Smelkov authored
    Consider a Go package that is defined via go-git-package, for example
    
        [helloweb]
        <= go-git-package
        go.importpath = lab.nexedi.com/nexedi/helloweb
        repository    = https://lab.nexedi.com/nexedi/helloweb.git
    
    Currently, since go-git-package references ${gowork:src}, it creates
    helloweb -> gowork dependency. gowork, in turn, depends on
    gowork.goinstall, which gets list of things to install from ${gowork:install}.
    
    Currently we put only plain strings into ${gowork.install}, e.g.
    
        [gowork]
        install =
           lab.nexedi.com/nexedi/helloweb/go/...
    
    but for Go modules support and for properly expressing what depends on what,
    we'll want in the next patch to be able to specify something like
    
        [gowork]
        install =
           ${helloweb:location}/go:./...
    
    which will create helloweb ⇄ gowork cycle.
    
    Unfortunately buildout does not detect nor report an error for such cycles, and
    simply processes parts in an order, which leads to situation where e.g.
    helloweb was not yet cloned, but gowork.goinstall tries to `go install` it and
    complains "no such helloweb directory".
    
    -> Fix it by leaving gowork to use by component/golang/ users, and putting
    settings about where gowork directories is into underlying gowork.dir section.
    e11efc27
buildout.cfg 4.93 KB