-
Notifications
You must be signed in to change notification settings - Fork 80
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
ER: ignore module
directive (for the time being)
#156
Comments
Hi @pkoppstein, I have also planned module support for 2.0. I'm not sure, though, about whether it's worth to support the |
By the way, you might perhaps know this: If we import some JSON data in a module # mod.jq
import "bench" as $bench;
def x: $bench::bench; If we import this module, can we refer to variables such as import "mod" as mod;
mod::x, # <--- this works
$mod::bench::bench # <--- this does not compile I suppose that this is not possible, but I guessed that I'd better ask. :) |
@01mf02 asked:
Yes. See e.g.
|
@01mf02 wrote:
I would not expect that to work, because "mod" has been imported as a jq module, not as data. Given your setup, however, one might reasonably expect As far as I can tell, not much thought was given to the importation of "data" (i.e. using the import directive) so I wouldn't read too much into the way things actually work. (In this regard, it's noteworthy that one can write Should we request |
Thanks for giving some examples of Also thanks for pointing out that $bench alone works as well. I thought that I had tried that and it didn't work, but I checked again just now, and it worked just fine. In that case, I think that I'd rather not support No, let's not request |
@01mf02 - Completed? I don't see a corresponding commit .... |
@pkoppstein, there were several commits in #196 that added module support, with the first one being: ef0b298 |
Perhaps one day jaq will support modules in some shape or form.
In the meantime, it would be very helpful if jaq could at least ignore a valid jq "module" directive
to facilitate the use of otherwise-compatible jq modules.
Thanks!
The text was updated successfully, but these errors were encountered: