-
Notifications
You must be signed in to change notification settings - Fork 341
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
Macro for @graknlabs_grakn_core dependencies, to be loaded by other workspaces #4867
Comments
This should be the content of the macro: https://github.com/graknlabs/client-python/blob/master/WORKSPACE#L46 |
The original idea was to create a macro containing grakn-core's dependency in a
which can be loaded from other repositories such as docs or client-python like this:
This is apparently not possible because |
I think we need to take inspiration from
It then gets called in the
So let's look at how @vmax do you know how it works by looking at the code? |
Me and @vmax had a brief discussion and think we can still improve readability by quite a lot simply by improving the structure of the For example, for
|
@haikalpribadi There is a technical limitation where a Bazel macro can't call another macro. Without that ability, there's no way the macro solution can be implemented. Right @vmax ? As of now, each Bazel project have a slightly different structure. It's making it hard for the team to understand and being able to modify it with confidence. |
Okay then I'd say lets put this on the back burner for now, @lolski @vmax. We can tidy up the organisation of the dependency declaration in the |
Sounds good to me |
I'm not sure if we have ever covered this, but it seems like Let's say we way to use
And when you look into Is there anything we can learn from their technique, @vmax @lolski ? |
I tried implementing this strategy for
When I tried loading it from |
@haikalpribadi @vmax From investigating
Our macro is more complicated since we want to load a macro which is loaded by another macro:
As stated in #4867 (comment), we can't make them a single macro like this since a Bazel macro can't contain
The solution would be to wait until Bazel has what's called the "recursive workspaces". There are demands for it and we can only wait and see: |
One idea to try out in the future is to have the macro of a given repository to load the macro of its dependency first; i.e. a recursive macro declaration which we will resolve to the full list of transitive dependencies of workspaces. @lolski |
No description provided.
The text was updated successfully, but these errors were encountered: