Skip to content

Commit e8c3edc

Browse files
committed
docs: 📝 add notes about vendor fighting
go and jsonnet/jb/tanka fight over the `vendor` directory. This is somewhat fixed with `-mod=readonly` or `-mod=mod` as an explicit flag to go commands, or `GOFLAGS=-mod=mod`, however, Jetbrains GOLAND still has problems if the `vendor` directory exists and doesn't have go files in it. See https://youtrack.jetbrains.com/issue/GO-10952/No-way-to-disable-vendoring-for-Sync-Dependencies-quick-fix. To get Goland to not freak out, `rm -rfd vendor`. This of course breaks all the Jsonnet, so when you are ready to do anything else, run `task jb:install`. Another possible way to fix this is if tanka supported other vendor directories. See grafana/tanka#356 and grafana/tanka#820.
1 parent 31961e4 commit e8c3edc

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,4 @@ Configuration is done via environment variables. Standard AWS SDK Environment va
8686

8787
1. There's a slew of app optimizations still left, such as separating `/ping` and `/metrics` endpoints onto different listeners (separate for application endpoints), make logging configurable between text/color and JSON and some other things. This was my first time using Gin.
8888
2. I didn't configure test coverage or pay attention to that much. Just wrote a few small unit tests and a sanity-check end2end test (just verifies that the app runs and I can /ping it) via docker-compose.
89+
3. go and jsonnet/jb/tanka fight over the `vendor` directory. This is somewhat fixed with `-mod=readonly` or `-mod=mod` as an explicit flag to go commands, or `GOFLAGS=-mod=mod`, however, Jetbrains GOLAND still has problems if the `vendor` directory exists and doesn't have go files in it. See https://youtrack.jetbrains.com/issue/GO-10952/No-way-to-disable-vendoring-for-Sync-Dependencies-quick-fix. To get Goland to not freak out, `rm -rfd vendor`. This of course breaks all the Jsonnet, so when you are ready to do anything else, run `task jb:install`. Another possible way to fix this is if tanka supported other vendor directories. See https://github.com/grafana/tanka/issues/356 and https://github.com/grafana/tanka/issues/820.

taskfile.jsonnet

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ taskfile +
77
(import "github.com/ghostsquad/practice-layers/taskfile/go.libsonnet") +
88
(import "./config.libsonnet") +
99
{
10+
env+: {
11+
// TODO contribute this upstream
12+
GOFLAGS: "-mod=mod",
13+
},
1014
vars+: {
1115
EXPECTED_GO_VERSION: $.config_.go.expectedVersion,
1216
K3D_APP_IMAGE: std.join("/", [$.config_.kubernetes.k3d.registry, $.config_.project.repoShort]) + ":{{.GIT_COMMIT}}"

0 commit comments

Comments
 (0)