Files
traefik-llmgateway/.gitattributes
T
lukaszraczylo 2a5b086020 fix: ship vendor/ in the release archive so the catalog can import
The Traefik Plugin Catalog analyzer rejected v1.0.43:

  import "github.com/lukaszraczylo/oss-telemetry" error:
  unable to find source related to: "github.com/lukaszraczylo/oss-telemetry"

piceus fetches the source archive at the released tag and interprets it
with Yaegi. It never runs go mod download, so every non-stdlib import in
production code must exist in the archive own vendor/ tree.

.gitattributes carried "vendor/ export-ignore" with an explicit warning
to remove it the moment production code imported a third-party package.
That happened when llmgateway.go took on oss-telemetry for anonymous
usage reporting, and the warning was missed. The tag itself always had
vendor/; git archive stripped it, so the tarball shipped a go.mod
requiring a module whose source was absent.

Verified by reproducing the analyzer: the v1.0.43 archive contains 0
vendor entries, the fixed archive contains 71, and interpreting the
extracted archive under yaegi passes.
2026-08-23 10:35:46 +01:00

45 lines
2.2 KiB
Plaintext

# export-ignore controls what `git archive` leaves out of the tree it
# packs. GoReleaser's `source:` block runs `git archive` under the hood
# (.goreleaser.yaml), so these entries are the actual filter for the
# release source tarball — not the archive block's own file globs, which
# have no negation syntax and cannot exclude anything.
# vendor/ is deliberately NOT export-ignored, and must stay that way.
#
# It WAS export-ignored until 2026-08-23, on the reasoning that every
# dependency was test-only (github.com/stretchr/testify and its
# go.yaml.in/yaml/v3 indirect), imported solely by *_test.go files that
# are themselves export-ignored below — so the tarball never contained
# code needing vendor/ to build. That comment carried an explicit warning
# to remove the line the moment production code imported a third-party
# package.
#
# That happened, and the warning was missed: llmgateway.go took on
# github.com/lukaszraczylo/oss-telemetry as a RUNTIME dependency. The
# release tarball then shipped a go.mod requiring a module whose source
# had been stripped, and the Traefik Plugin Catalog analyzer (piceus)
# rejected v1.0.43 with:
#
# import "github.com/lukaszraczylo/oss-telemetry" error:
# unable to find source related to: "github.com/lukaszraczylo/oss-telemetry"
#
# piceus fetches the source ARCHIVE at the released tag and interprets it
# with Yaegi. It never runs `go mod download`, so every non-stdlib import
# in production code must be present in the archive's own vendor/ tree.
# Shipping vendor/ also costs the test-only deps a few hundred KB in the
# tarball, which is the correct trade against being unimportable.
integration/ export-ignore
tools/ export-ignore
docs/ export-ignore
examples/ export-ignore
testdata/ export-ignore
.superpowers/ export-ignore
.github/ export-ignore
*_test.go export-ignore
.gitattributes export-ignore
# webui/ is the Vue admin panel's SOURCE (Vite/npm project) — CI and a
# release build never need node: admin_assets_gen.go (repo root, `make
# admin-ui`'s committed output) is the only artifact the plugin build
# actually depends on, exactly like vendor/ above is safe to drop because
# nothing at the repo root imports it directly.
webui/ export-ignore