Comments (6)
Could this just be that ko
needs to be rebuilt with a modern version of the go stdlib?
from ko.
This seems like a likely explanation. The error seems to be coming from here, where we call packages.Load
which comes from the stdlib the binary was built with:
Line 215 in 59a676e
The good news is that we're building with 1.21 now, since #1137, which just needs to be released.
from ko.
The good news is that we're building with 1.21 now, since #1137, which just needs to be released.
That PR was included in the 0.15.1 release which the action is installing but the error is still there. hmm 😕
from ko.
Weird, I'm not able to reproduce with the latest ko
$ ko version
0.15.1
$ ko build ./cmd/guard-service/
2023/11/27 22:37:33 Building knative.dev/security-guard/cmd/guard-service for linux/amd64
2023/11/27 22:37:49 Publishing gcr.io/jason-chainguard/guard-service-47f58423958863b1c974ec4e098984f3:latest
2023/11/27 22:38:11 existing blob: sha256:250c06f7c38e52dc77e5c7586c3e40280dc7ff9bb9007c396e06d96736cf8542
2023/11/27 22:38:13 pushed blob: sha256:d9cdc672ff75d2eb63aa285cae4155be88829798d244518fd3e60da60f9fb2f4
2023/11/27 22:38:13 pushed blob: sha256:82d2e829cf186480df810fb120895daa35c86e73f45e67e4849dbf793a18d635
...
Is it possible your Go version is pre-1.21?
$ go version
go version go1.21.4 darwin/arm64
from ko.
Thanks!
It seems the problem was indeed that go 1.19 was used for the tests.
(e2e test was using 1.19)
Fixed by knative-extensions/security-guard#265
from ko.
Great to hear! So it's more about the Go version installed than the ko
version, which is nice.
Thanks for following up!
from ko.
Related Issues (20)
- feat: support specifying custom image names HOT 1
- feat: specify `KO_DOCKER_REPO` in `.ko.yaml` HOT 2
- Chainguard annotations are, but should not be, propagated to multi-platform manifest HOT 3
- The default value for --platform is not documented HOT 1
- ko build does not give me a way to put annotations in a multi-platform manifest HOT 1
- how to specify build tag when doing "ko build" to avoid build constraint error
- ko sbom binding strategy problem HOT 2
- Pushing to ECR without logging in first doesn't work HOT 3
- Support setting capabilities on the app binary HOT 2
- feature request: make it possible to set the WORKDIR HOT 1
- Missing SBOM image in image-refs file
- Question: set argv parameters for the built binaries? HOT 1
- Support local images with custom image name HOT 1
- feat: Add platform template parameters HOT 1
- feat: Add global ldflags
- feat: Add global env
- feat: Add git template variables HOT 1
- [Docs] Broken link to `builds` section
- 0.15.3 has breaking issues error resolving image references: build: go build: exit status 2: flag provided but not defined: -platform HOT 11
- docs: ko does not works without -bare option for ECR HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ko.