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

modulemeta failure when module location is found by "search" #3145

Open
pkoppstein opened this issue Jun 28, 2024 · 0 comments
Open

modulemeta failure when module location is found by "search" #3145

pkoppstein opened this issue Jun 28, 2024 · 0 comments

Comments

@pkoppstein
Copy link
Contributor

When a jq module location is specified by a "search" key, modulemeta can fail even when the module is successfully located.

To Reproduce

$ mkdir obscure

$ cat << EOF > obscure/amod.jq
module {"name": "amod", "foo": "bar"};
def a: "a";
EOF

# First verify our setup is valid:
$ jq -n -Lobscure 'import "amod" as amod; "amod" | modulemeta'
{
  "name": "amod",
  "foo": "bar",
  "deps": [],
  "defs": [
    "a/0"
  ]
}
# Now illustrate the problem:
$ jq -n 'import "amod" as amod {search: "obscure"}; "amod" | modulemeta'
jq: error (at <unknown>): module not found: amod

Context
jq-1.7.1 and other versions as well

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

No branches or pull requests

1 participant