You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But this currently doesn't work. I suspect there are pretty good reasons for this. But would something like this ever be achievable?
Part of the issue I think is just that the API for 'load' is awkward here, because I think it's supposed to introduce the symbols into the module context, not the local scope. But I really just want locally bound names here. So having something like e = load_single_expr(path, name) would be nice. But again I assume there are reasons for this.
The text was updated successfully, but these errors were encountered:
Why are you defining all your bxl rules in the same file? Would it be easier to have them in separate files? Is this your #86 approach? Could you change that alias so it was $1.bxl:$1?
We follow the Starlark standard from https://github.com/bazelbuild/starlark/blob/master/spec.md, so our usual way of extending would be to propose additions to the language. This does seem quite a departure from the existing approach though.
I was mostly doing it to keep some code centralized in top.bxl, but I just simplified the example a bunch here. That said, I figured it would be a lot of rigamarole to get this working since it seems like this is a pretty fundamental change, so I figured I'd just open a ticket and ask. :)
So I think for now I'll just do some refactoring another way and close this. In the future a parameterized load() statement might be useful but another ticket is probably better for that, since this case can be handled another way. (I mean I can probably think of some good use cases if you gave me some time, but I don't have any other ones right now.)
I have:
I want:
But this currently doesn't work. I suspect there are pretty good reasons for this. But would something like this ever be achievable?
Part of the issue I think is just that the API for 'load' is awkward here, because I think it's supposed to introduce the symbols into the module context, not the local scope. But I really just want locally bound names here. So having something like
e = load_single_expr(path, name)
would be nice. But again I assume there are reasons for this.The text was updated successfully, but these errors were encountered: