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

Unable to import github.com/dolthub/doltgresql/postgres/* #660

Open
fanyang01 opened this issue Aug 28, 2024 · 1 comment
Open

Unable to import github.com/dolthub/doltgresql/postgres/* #660

fanyang01 opened this issue Aug 28, 2024 · 1 comment

Comments

@fanyang01
Copy link

Hi Dolt creators,

Inspired by your blog post, I'm interested in using the postgres package to do some MySQL<->Postgresql transpiling tasks. However, I found that go build failed with:

../../go/pkg/mod/github.com/dolthub/[email protected]/postgres/parser/lex/predicates.go:59:17: undefined: reservedKeywords

After checking the contribution guide, I learned that the parser package relies on some source files generated by doltgresql/postgres/parser/build.sh. However, when importing the package in my project via import "github.com/dolthub/doltgresql/postgres/parser/types", it seems impossible to run the script manually since the go mod cache is a read-only directory:

mkdir: parser/gen: Permission denied
./build.sh: line 12: parser/gen/types_regex.tmp: No such file or directory

Could you consider keeping the generated files in the source tree to make the project more compatible with the standard Go toolchain? This would simplify the build process for users who want to integrate the postgres package into their projects.

I appreciate your time and look forward to your feedback.

@zachmu
Copy link
Member

zachmu commented Aug 28, 2024

Hi @fanyang01,

This is an important point I don't think we had considered. We'll discuss internally and get back to you.

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

No branches or pull requests

3 participants