jq Module Search Order: How the jq Linker Resolves `import` Statements
The jq linker resolves module imports by searching directories in a strict six-step priority, starting with the current working directory, then checking paths specified by -L flags or JQ_LIBRARY_PATH, followed by $ORIGIN substitution, and finally resolving relative to the importing module's location.
When writing complex jq programs, organizing code into reusable modules is essential. Understanding the jq module search order ensures your import and include statements resolve correctly across different environments. This behavior is implemented in the jqlang/jq repository,
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →