Skip to content

Commit

Permalink
fix(ko): Do not add -trimpath when debugging (#6874)
Browse files Browse the repository at this point in the history
`ko` adds the `-trimpath` flag to `go build` by default, as this aids in
achieving reproducible builds.

The `-trimpath` flag removes file system paths from the resulting
binary, and this makes interactive debugging more difficult.

This change instructs `ko` to _not_ add the `-trimpath` flag when users
run `skaffold debug` with the `ko` builder.

Bumps the `ko` version to pick up the `Trimpath` build option.

Also, simplifies the `ko` example config since it's no longer necessary
to add a non-empty `flags` field to `skaffold.yaml` to allow for
interactive debugging.

Fixes: #6843
Tracking: #6041
  • Loading branch information
halvards authored and tejal29 committed Nov 18, 2021
1 parent 25a1907 commit a75b82e
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 50 deletions.
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require (
github.com/AlecAivazis/survey/v2 v2.2.15
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.20.0
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v0.20.0
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/ahmetalpbalkan/dlog v0.0.0-20170105205344-4fb5f8204f26 // indirect
github.com/ahmetb/dlog v0.0.0-20170105205344-4fb5f8204f26
github.com/aws/aws-sdk-go v1.36.30 // indirect
Expand All @@ -38,7 +38,7 @@ require (
github.com/buildpacks/lifecycle v0.10.2
github.com/buildpacks/pack v0.18.1
github.com/cenkalti/backoff/v4 v4.1.1
github.com/docker/cli v20.10.7+incompatible
github.com/docker/cli v20.10.10+incompatible
github.com/docker/distribution v2.7.1+incompatible
github.com/docker/docker v20.10.10+incompatible
github.com/docker/go-connections v0.4.0
Expand All @@ -50,11 +50,11 @@ require (
github.com/golang/protobuf v1.5.2
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.6
github.com/google/go-containerregistry v0.6.0
github.com/google/go-containerregistry v0.7.0
github.com/google/go-containerregistry/pkg/authn/k8schain v0.0.0-20210216200643-d81088d9983e // indirect
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/ko v0.9.4-0.20211102213605-98211906053b
github.com/google/ko v0.9.4-0.20211117220415-2fbc9089eb17
github.com/google/uuid v1.3.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0
github.com/heroku/color v0.0.6
Expand Down Expand Up @@ -90,14 +90,14 @@ require (
go.opentelemetry.io/otel/sdk/metric v0.20.0
go.opentelemetry.io/otel/trace v0.20.0
golang.org/x/mod v0.4.2
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08
golang.org/x/term v0.0.0-20210503060354-a79de5458b56
golang.org/x/tools v0.1.7
google.golang.org/api v0.57.0
google.golang.org/genproto v0.0.0-20211005153810-c76a74d43a8e
google.golang.org/grpc v1.41.0
google.golang.org/genproto v0.0.0-20211111162719-482062a4217b
google.golang.org/grpc v1.42.0
google.golang.org/protobuf v1.27.1
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
Expand Down
Loading

0 comments on commit a75b82e

Please sign in to comment.