TIBCOSoftware / flogo-cli

Project Flogo Command Line Interface
http://flogo.io
BSD 3-Clause "New" or "Revised" License
57 stars 28 forks source link

app build error - undefined: ipamutils.NetworkToSplit #127

Open yxuco opened 5 years ago

yxuco commented 5 years ago

I'm submitting a ... (check one with "x")

[X] bug report => search github for a similar issue or PR before submitting
[] enhancement request
[] feature request
[] support request
[] general question

Current behavior (how does the issue manifest): When building an app using a new activity that depends on a Go package "github.com/hyperledger/fabric/core/chaincode/shim", I got the following error:

2019-02-18T22:02:17.517Z - error: # flogo-web/vendor/github.com/docker/docker/opts
vendor/github.com/docker/docker/opts/address_pools.go:15:12: undefined: ipamutils.NetworkToSplit

See the same error in flogo-web when adding the same activity from Flogo UI. We cannot add this activity because "flogo build" failed to build flogo-web.

Expected behavior: "flogo build" may need a better way to reset dependencies, and so build will succeed. My steps to work around the issue is documented below.

Minimal steps to reproduce the problem (not required if feature enhancement): add dependency by importing the following in an app or a trigger/activity, then try to build it.

    _ "github.com/hyperledger/fabric/core/chaincode/shim"

What is the motivation / use case for changing the behavior?

Please tell us about your environment (Operating system, docker version, browser & verison if webui, etc): OSX, Docker desktop, Chrome

Flogo version (CLI & contrib/lib. If unknown, leave empty or state unknown): 0.X.X

Additional information you deem important (e.g. issue happens only occasionally): To work-around the issue, I had to reset the Go dep by the following steps:

cd myapp/src/myapp
rm -Rf Gopkg.* vendor
dep init

To fix the same build issue in flogo-web, I had to do the same in the flogo-docker container. In addition, I had to add an extra lib to the docker container for UI:

apk add --no-cache musl-dev