Files
zeekay a6a6264f91 refactor: own the module path (github.com/hanzoai/yaegi)
Per the standing fork rule, a hanzoai fork declares its OWN module path and
is required directly -- never resolved via a `replace` against the upstream
path. Keeping the upstream path meant every import line in every consumer
carried the upstream brand.

  module github.com/traefik/yaegi -> module github.com/hanzoai/yaegi

Mechanical and behaviour-neutral: every occurrence is an import path
(package self-imports, cmd/, _test/ fixtures interpreted at test time, and
the guthib.com/<org>/{fromage,cheese,vin} fake vendor trees under
example/pkg, whose directory components were renamed in lockstep with the
import strings that reference them).

GOPATH-mode source-import tests (interp TestFile) resolve the module by its
path under $GOPATH/src, so the required checkout location moves with the
module path -- as README already documents. Verified green at
$GOPATH/src/github.com/hanzoai/yaegi.

LICENSE is untouched: "Copyright 2020 Traefik Labs SAS" is the Apache-2.0
attribution and is a legal obligation, not a brand leak.

Also drops the inherited CONTRIBUTING.md CLA clause, which named an
upstream agreement this fork does not administer.
2026-07-25 12:26:31 -07:00

42 lines
1.3 KiB
Makefile

# Static linting of source files. See .golangci.toml for options
check:
golangci-lint run
# Generate stdlib/syscall/syscall_GOOS_GOARCH.go for all platforms
gen_all_syscall: internal/cmd/extract/extract
@for v in $$(go tool dist list); do \
echo syscall_$${v%/*}_$${v#*/}.go; \
GOOS=$${v%/*} GOARCH=$${v#*/} go generate ./stdlib/syscall ./stdlib/unrestricted; \
done
internal/cmd/extract/extract:
rm -f internal/cmd/extract/extract
go generate ./internal/cmd/extract
generate: gen_all_syscall
go generate
install:
GOFLAGS=-ldflags=-X=main.version=$$(git describe --tags) go install ./...
tests:
go test -v ./...
go test -race ./interp
# https://github.com/goreleaser/godownloader
install.sh: .goreleaser.yml
godownloader --repo=hanzoai/yaegi -o install.sh .goreleaser.yml
generic_list = cmp/cmp.go slices/slices.go slices/sort.go slices/zsortanyfunc.go maps/maps.go \
sync/oncefunc.go sync/atomic/type.go
# get_generic_src imports stdlib files containing generic symbols definitions
get_generic_src:
eval "`go env`"; echo $$GOROOT; gov=$${GOVERSION#*.}; gov=$${gov%.*}; \
for f in ${generic_list}; do \
nf=stdlib/generic/go1_$${gov}_`echo $$f | tr / _`.txt; echo "nf: $$nf"; \
cat "$$GOROOT/src/$$f" > "$$nf"; \
done
.PHONY: check gen_all_syscall internal/cmd/extract/extract get_generic_src install