Skip to content

Conversation

@usuyuki
Copy link

@usuyuki usuyuki commented Nov 20, 2025

Summary

This PR fixes build failures with Go 1.25+ by removing the reference to the deprecated VendorlessPath function from golang.org/x/tools/imports.

Problem

The VendorlessPath function was removed from golang.org/x/tools/imports in newer versions, causing build errors:

# github.com/xo/dbtpl/internal
internal/golang_org-x-tools-imports.go:16:45: undefined: imports.VendorlessPath

Solution

Removed the deprecated VendorlessPath reference from the auto-generated internal/golang_org-x-tools-imports.go file.

Files Changed

  • internal/golang_org-x-tools-imports.go: Removed VendorlessPath reference

VendorlessPath was removed from golang.org/x/tools/imports in newer versions,
causing build failures with Go 1.25+. This commit removes the reference to
maintain compatibility with current golang.org/x/tools versions.

Fixes build error:
undefined: imports.VendorlessPath
@usuyuki usuyuki changed the title fix: remove deprecated VendorlessPath reference fix: remove deprecated VendorlessPath reference for fix go 1.25 build errors Nov 20, 2025
@kenshaw
Copy link
Member

kenshaw commented Nov 21, 2025

@usuyuki did you use the yaegi tool to generate this?

@usuyuki
Copy link
Author

usuyuki commented Nov 21, 2025

@kenshaw
Thank you for checking.

I use go tool command like this

go tool dbtpl schema "postgres://postgres:dev-pass@postgres/umi_mikan?sslmode=disable" -o infrastructure/database

Then I got this error.

# github.com/xo/dbtpl/internal
internal/golang_org-x-tools-imports.go:16:45: undefined: imports.VendorlessPath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants