Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant build from a go workspace #970

Open
gedw99 opened this issue Dec 22, 2024 · 1 comment
Open

Cant build from a go workspace #970

gedw99 opened this issue Dec 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@gedw99
Copy link

gedw99 commented Dec 22, 2024

Describe the bug

Cant build Flowpipe from a go workspace. The others build fine.

cd flowpipe && make build
cd ui/form && corepack enable && yarn install && yarn build
➤ YN0000: · Yarn 4.5.0
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Post-resolution validation
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0007: │ esbuild@npm:0.21.5 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 3s 705ms
➤ YN0000: · Done with warnings in 3s 949ms
vite v5.4.6 building for production...
✓ 305 modules transformed.
dist/index.html                   0.92 kB │ gzip:   0.38 kB
dist/assets/index-DWk11KcD.css   11.35 kB │ gzip:   2.93 kB
dist/assets/index-9Z-GHPyy.js   392.95 kB │ gzip: 133.54 kB
✓ built in 1.00s
go build .
# github.com/turbot/flowpipe/internal/docker
internal/docker/docker.go:99:10: undefined: client.WithHostFromEnv
internal/docker/docker.go:100:10: undefined: client.WithVersionFromEnv
internal/docker/docker.go:101:10: undefined: client.WithTLSClientConfigFromEnv
internal/docker/docker.go:140:57: undefined: image.PullOptions
internal/docker/docker.go:171:60: undefined: container.ListOptions
internal/docker/docker.go:178:59: undefined: container.RemoveOptions
internal/docker/docker.go:193:48: undefined: image.ListOptions
internal/docker/docker.go:201:27: undefined: image.RemoveOptions
internal/docker/docker.go:264:27: undefined: container.ListOptions
internal/docker/docker.go:282:52: undefined: container.StopOptions
internal/docker/docker.go:282:52: too many errors

Flowpipe version (flowpipe -v)

v1.0.2

Use this as a full reproduction...

# https://github.com/turbot/steampipe/releases/tag/v1.0.1
git clone https://github.com/turbot/steampipe -b v1.0.1

# https://github.com/turbot/pipe-fittings
# needed by the others below.
# https://github.com/turbot/pipe-fittings/releases/tag/v1.6.6
git clone https://github.com/turbot/pipe-fittings -b v1.6.6

# https://github.com/turbot/flowpipe/releases/tag/v1.0.2
git clone https://github.com/turbot/flowpipe -b v1.0.2

# https://github.com/turbot/powerpipe/releases/tag/v1.0.1
git clone https://github.com/turbot/powerpipe -b v1.0.1

touch go.work
go work use steampipe
go work use pipe-fittings
go work use flowpipe
go work use powerpipe
cd steampipe && go install .
# brew install turbot/tap/flowpipe
cd flowpipe && $(MAKE) build
cd flowpipe && go install .
cd powerpipe && go install .

To reproduce

All above...

Expected behavior

flow pipe builds. powerpipe and steam pipe builds fine.

Additional context

Mac m2.

I checked and the brew install version is the same version of the tag I am using.

@gedw99 gedw99 added the bug Something isn't working label Dec 22, 2024
@gedw99 gedw99 changed the title Cant bulild wishing a go workspace Cant build from a go workspace Dec 22, 2024
@vhadianto
Copy link
Contributor

Hi @gedw99 thanks for the report however I'm unable to reproduce this.

I get the v1.0.2 tag (faa04419) and ran the build target in the Makefile:

flowpipe (faa04419) $ make build
cd ui/form && corepack enable && yarn install && yarn build
➤ YN0088: A new stable version of Yarn is available: 4.5.3!
➤ YN0088: Upgrade now by running yarn set version 4.5.3

➤ YN0000: · Yarn 4.5.0
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Post-resolution validation
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 3 packages were added to the project (+ 4.51 MiB).
➤ YN0000: └ Completed in 0s 462ms
➤ YN0000: ┌ Link step
➤ YN0007: │ esbuild@npm:0.21.5 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 4s 466ms
➤ YN0000: · Done with warnings in 5s 39ms
vite v5.4.6 building for production...
✓ 305 modules transformed.
dist/index.html                   0.92 kB │ gzip:   0.38 kB
dist/assets/index-DWk11KcD.css   11.35 kB │ gzip:   2.92 kB
dist/assets/index-9Z-GHPyy.js   392.95 kB │ gzip: 134.23 kB
✓ built in 1.23s
go build .
flowpipe (faa04419) $ 

The error message that you get: client.WithHostFromEnv definitely exist in Docker v27.1.2 which is referenced in Flowpipe's go.mod.

Can you please run go mod tidy in Flowpipe directory please? And if does change something can you let me know what's changed?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants