dmgk / modules2tuple

Generate GH_TUPLE/GL_TUPLE from modules.txt
BSD 2-Clause "Simplified" License
15 stars 2 forks source link

using `-offline` ends up with "flag not defined" #4

Closed zachfi closed 5 years ago

zachfi commented 5 years ago

I'm trying to use this method to create a pacakge with lots of go dependencies, and the go module fetching during a build phase fails due to missing module which should be present. I figure -offline would be what I'm after, but it doesn't seem to work in the latest ports version. 1.6.0.

dmgk commented 5 years ago

Looks like you are on quarterly branch, the version in latest is 1.8.1 Anyway, -offline doesn't do what you described, it just disables network access (calling Gitlab API) in modules2tuple.

zachfi commented 5 years ago

I figured out the issue was with git trying to run go mod each time, which makes web calls during the build, which isn't available during my port build phase. I did end up building the latest version here and trying -offline to learn that it didn't do what I wanted. Thanks for the support.

dmgk commented 5 years ago

@xaque208 If you haven't seen it yet, there's a Go port example that uses modules in Porter's Handbook, hope this helps.

zachfi commented 5 years ago

Thank you, I did see that but I was a little confused when I read it. The example I needed was to skip the module handling entirely, which my solution was to modify build step.


    @( cd ${WRKSRC}; \
        ${SETENV} ${MAKE_ENV} GOFLAGS="-mod=vendor" go build . ; \
        )```