Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(templates): embed templates in go binary #921

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

davidmcnamee
Copy link
Contributor

I'm trying to integrate prisma-client-go into the bazel ecosystem (a polyglot ORM generator deserves a polyglot build system 😄), but I hit a snag when the prisma-client-go binary was calling go list github.com/steebchen/prisma-client-go via ctx.Import.

Calling the go sdk directly inside bazel requires a tricky workaround, but embedding the templates directly into the binary seemed a lot simpler (and more portable!) so I created this pull request in case you wanted to merge it upstream too.

Tests pass with go generate ./... && go test ./... -v

@steebchen steebchen changed the title Embed templates in go binary feat(templatse): embed templates in go binary Jul 16, 2023
@steebchen
Copy link
Owner

Thanks, this is awesome!

@steebchen steebchen linked an issue Jul 17, 2023 that may be closed by this pull request
@steebchen steebchen merged commit 003a5d5 into steebchen:main Jul 17, 2023
@steebchen steebchen changed the title feat(templatse): embed templates in go binary feat(templates): embed templates in go binary Jul 17, 2023
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.

use go:embed for prisma engines at runtime
2 participants