-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Sample client and generators for built-in queries/languages. #528
Conversation
I suppose this paves the way or removing the compile-time configuration of the directory which contains the (installed) query files, doesn't it? |
I think this would work nicely for the |
Hmm, I wonder if my sample works only because I use a path dependency, and I happen to have the query files where the compiler expects to find them. I need to investigate. |
#511 would only be an issue with external Nix builds, I think. |
|
OK, I see what's going on. |
Although it looks like we cannot include files from parent directories, so the symlink route is the way to go anyway: |
So the PR should be fine now. |
Hmm, not directly. Because Topiary doesn't itself use these convenience generator functions for now. It could, but we already have some more complex logic for looking up query files. We need to keep this, because it allows users to override the built-in queries.
|
Actually, making sure the Maybe it's best to drop them right now. I won't object to that. @vkleen Can you check if this branch helps you, even without using the new convenience functions? |
Building with crane and Nix fails with the branch as it is. Crane ends up copying dangling symlinks into the cargo vendor directory. Maybe that is an issue that should be addressed in crane upstream. Once topiary makes its way to crates.io, I imagine it will work fine. As you say, Just putting the query files into the package sources for cargo wouldn't help with accessing those files in |
I was trying to be clever, and switched the direction of the symlinks, so the real files could stay in root. But it sounds like that's what breaking Crane. Please try again now.
I see. Then we'll keep them. But I wonder what the scalable, future solution should be when at some point we consider languages something that is loaded dynamically. @ErinvanderVeen |
The nix builds succeed with the switch symlinks 👍 |
It will sure be interesting to see how we solve this in the future! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks great!
Co-authored-by: Erin van der Veen <erin.vanderveen@tweag.io>
76dacff
to
e360043
Compare
Fixes #137 and #509.