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
Copy file name to clipboardExpand all lines: docs/language/ql-handbook/name-resolution.rst
+8-16Lines changed: 8 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,31 +61,23 @@ following import statement::
61
61
62
62
import examples.security.MyLibrary
63
63
64
-
To find the precise location of this library module, the QL compiler processes the import
64
+
To find the precise location of this :ref:`library module<library-modules>`, the QL compiler processes the import
65
65
statement as follows:
66
66
67
67
#. The ``.``\ s in the qualified reference correspond to file path separators, so it first looks
68
68
up ``examples/security/MyLibrary.qll`` from the directory containing ``Example.ql``.
69
69
70
-
#. If that fails, it looks up ``examples/security/MyLibrary.qll`` relative to the enclosing query
71
-
directory, if any.
72
-
This query directory is a directory containing a |queries.xml file|_, and where the contents
73
-
of that file is compatible with the current database schema.
74
-
(For example, if you are querying a JavaScript database, then the |queries.xml file|_ should
75
-
contain ``<queries language="javascript"/>``.)
70
+
#. If that fails, it looks up ``examples/security/MyLibrary.qll`` relative to the query
71
+
directory, if any.
72
+
The query directory is the first enclosing directory containing a file called ``qlpack.yml``. (Or, in legacy products, a file called ``queries.xml``.)
76
73
77
-
#. If no file is found using the above two checks, it looks up ``examples/security/MyLibrary.qll``
78
-
relative to each library path entry. The library path depends on the environment where you
79
-
run your query, and whether you have specified any extra settings.
74
+
#. If the compiler can't find the library file using the above two checks, it looks up ``examples/security/MyLibrary.qll``
75
+
relative to each library path entry.
76
+
The library path is usually specified using the ``libraryPathDependencies`` of the ``qlpack.yml`` file, though it may also depend on the tools you use to run your query, and whether you have specified any extra settings.
77
+
For more information, see `Library path <https://help.semmle.com/QL/ql-spec/language.html#library-path>`__ in the QL language specification.
0 commit comments