Skip to content

Commit 94a6506

Browse files
committed
Clarify section on source resolution
1 parent 93ade49 commit 94a6506

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

docs/codeql/codeql-cli/about-codeql-workspaces.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ In most cases, you should store the CodeQL workspace and the CodeQL packs contai
1414
The ``codeql-workspace.yml`` file
1515
--------------------------------
1616

17-
A CodeQL workspace is defined by a ``codeql-workspace.yml`` yaml file. This file contains a ``provide`` block, and optionally an ``ignore`` block.
17+
A CodeQL workspace is defined by a ``codeql-workspace.yml`` yaml file. This file contains a ``provide`` block, and optionally an ``ignore`` block.
1818

19-
* The ``provide`` block contains a list of glob patterns that define the CodeQL packs that are available in the workspace.
20-
* The ``ignore`` block contains a list of glob patterns that define CodeQL packs that are not available in the workspace.
19+
* The ``provide`` block contains a list of glob patterns that define the CodeQL packs that are available in the workspace.
20+
* The ``ignore`` block contains a list of glob patterns that define CodeQL packs that are not available in the workspace.
2121

2222
Each entry in the ``provide`` or ``ignore`` section must map to the location of a ``qlpack.yml`` file. All glob patterns are defined relative to the directory that contains the workspace file. For a list of patterns accepted in this file, see" `@actions/glob <https://github.com/actions/toolkit/tree/main/packages/glob#patterns>`__ .
2323

@@ -30,7 +30,7 @@ For example, the following ``codeql-workspace.yml`` file defines a workspace tha
3030
ignore:
3131
- "*/codeql-packs/**/experimental/**/qlpack.yml"
3232
33-
To verify that you have the correct ``codeql-workspace.yml`` file, run ``codeql pack ls`` command in the same directory as your workspace. The result of the command is a list of all CodeQL packs in the workspace.
33+
To verify that your ``codeql-workspace.yml`` file includes the CodeQL packs that you expect, run ``codeql pack ls`` command in the same directory as your workspace. The result of the command is a list of all CodeQL packs in the workspace.
3434

3535

3636
CodeQL workspaces and query resolution
@@ -46,7 +46,12 @@ This ensures that any local changes you make to a query library in a dependency
4646

4747
Note
4848

49-
Source dependencies are CodeQL packs that are resolved from the filesystem. They might be in the same CodeQL workspace, or specified as a path option in the ``--additional-packs`` argument. Source dependencies override any dependencies found in the local package cache and version constraints are ignored. This ensures that during local development version mismatches can be ignored.
49+
Source dependencies are CodeQL packs that are resolved from the local file system. These dependencies can be in the same CodeQL workspace, or specified as a path option using the ``--additional-packs`` argument. When you compile and run queries locally, source dependencies override any dependencies found in the local package cache as well as version constraints defined in the ``qlpack.yml``.
50+
51+
This is particularly useful in the following situations:
52+
53+
- One of the dependencies of the query pack you are running is not yet published. Resolving from source is the only way to refernce that pack.
54+
- You are making changes to multiple packs at the same time and want to test them together. Resolving from source ensures that you are using the version of the pack with your changes in it.
5055

5156
Example
5257
~~~~~~~

0 commit comments

Comments
 (0)