Skip to content

Conversation

@MathiasVP
Copy link

Microsoft keeps a submodule pointer into this repository in our public fork of the CodeQL repository, and I imagine this is how most people will interact with this repository since the directory layout matches each language directory in the public GitHub CodeQL repository. However, having a .codeqlmanifest ifile n this repository makes QLpack resolution fail with a very hard-to-diagnose error:

Recording pack reference MICROSOFT-IAC-QUERIES at PATH-TO-INTERNAL-MICROSOFT-IAC-QUERIES.
Resolving query at normalized path PATH-TO-INTERNAL-MICROSOFT-IAC-QUERIES\QUERY-NAME.ql.
Found enclosing pack 'MICROSOFT-IAC-QUERIES' at PATH-TO-INTERNAL-MICROSOFT-IAC-QUERIES.
Adding compilation cache at C:\Users\mapeder\.codeql\compile-cache.
Resolving library dependencies from PATH-TO-INTERNAL-MICROSOFT-IAC-QUERIES\qlpack.yml.
[INCOMPATIBILITY] MICROSOFT-IAC-QUERIES: not 0.0.1 {root: [email protected]}
[DERIVATION] MICROSOFT-IAC-QUERIES: 0.0.1 {MICROSOFT-IAC-QUERIES: not 0.0.1 {root: [email protected]}}
[INCOMPATIBILITY] MICROSOFT-IAC-QUERIES: * [*], advanced-security/iac-queries: not * [*] {dependency: MICROSOFT-IAC-QUERIES@* [*] requires advanced-security/[email protected]}
[INCOMPATIBILITY] MICROSOFT-IAC-QUERIES: * [*], MICROSOFT-SHARED-QLPACKS: not * [*] {dependency: MICROSOFT-IAC-QUERIES@* [*] requires [email protected]}
[DECISION 1] MICROSOFT-IAC-QUERIES: 0.0.1
[DERIVATION] MICROSOFT-SHARED-QLPACKS: * [*] {MICROSOFT-IAC-QUERIES: * [*], MICROSOFT-SHARED-QLPACKS: not * [*] {dependency: MICROSOFT-IAC-QUERIES@* [*] requires [email protected]}}
[DERIVATION] advanced-security/iac-queries: * [*] {MICROSOFT-IAC-QUERIES: * [*], advanced-security/iac-queries: not * [*] {dependency: MICROSOFT-IAC-QUERIES@* [*] requires advanced-security/[email protected]}}
[INCOMPATIBILITY] advanced-security/iac-queries: * [*], advanced-security/iac-all: not * [*] {dependency: advanced-security/iac-queries@* [*] requires advanced-security/[email protected]}
[DECISION 2] advanced-security/iac-queries: 0.5.1
[DERIVATION] advanced-security/iac-all: * [*] {advanced-security/iac-queries: * [*], advanced-security/iac-all: not * [*] {dependency: advanced-security/iac-queries@* [*] requires advanced-security/[email protected]}}
[INCOMPATIBILITY] advanced-security/iac-all: * [*], codeql/util: not * [*] {dependency: advanced-security/iac-all@* [*] requires codeql/util@^1.0.12}
[INCOMPATIBILITY] advanced-security/iac-all: * [*], codeql/yaml: not * [*] {dependency: advanced-security/iac-all@* [*] requires codeql/yaml@^1.0.25}
[DECISION 3] advanced-security/iac-all: 0.5.1
[DERIVATION] codeql/yaml: * [*] {advanced-security/iac-all: * [*], codeql/yaml: not * [*] {dependency: advanced-security/iac-all@* [*] requires codeql/yaml@^1.0.25}}
[DERIVATION] codeql/util: * [*] {advanced-security/iac-all: * [*], codeql/util: not * [*] {dependency: advanced-security/iac-all@* [*] requires codeql/util@^1.0.12}}
[DECISION 4] codeql/util: 2.0.19
[DECISION 5] codeql/yaml: 1.0.32
[INCOMPATIBILITY] MICROSOFT-SHARED-QLPACKS: * [*], codeql/util: not * [*] {dependency: MICROSOFT-SHARED-QLPACKS@* [*] requires codeql/[email protected]}
[DECISION 6] MICROSOFT-SHARED-QLPACKS: 0.0.1
ERROR: Dependency on pack 'advanced-security/iac-queries' uses '${workspace}', but that pack was not found in the workspace. (PATH-TO-INTERNAL-MICROSOFT-IAC-QUERIES\qlpack.yml:1,1-1)
A fatal error occurred: Could not resolve library path for PATH-TO-INTERNAL-MICROSOFT-IAC-QUERIES

(Note: I've replaced some internal pack and directory names with placeholders.)

However, simply deleting this file makes everything work:

Recording pack reference MICROSOFT-IAC-QUERIES at MICROSOFT-IAC-QUERIES.
Resolving query at normalized path MICROSOFT-IAC-QUERIES\QUERY-NAME.ql
Found enclosing pack 'MICROSOFT-IAC-QUERIES' at MICROSOFT-IAC-QUERIES.
Adding compilation cache at C:\Users\mapeder\.codeql\compile-cache.
Resolving library dependencies from MICROSOFT-IAC-QUERIES\qlpack.yml.
[INCOMPATIBILITY] MICROSOFT-IAC-QUERIES: not 0.0.1 {root: [email protected]}
[DERIVATION] MICROSOFT-IAC-QUERIES: 0.0.1 {MICROSOFT-IAC-QUERIES: not 0.0.1 {root: [email protected]}}
[INCOMPATIBILITY] MICROSOFT-IAC-QUERIES: * [*], advanced-security/iac-queries: not * [*] {dependency: MICROSOFT-IAC-QUERIES@* [*] requires advanced-security/[email protected]}
[INCOMPATIBILITY] MICROSOFT-IAC-QUERIES: * [*], MICROSOFT-SHARED-QLPACKS: not * [*] {dependency: MICROSOFT-IAC-QUERIES@* [*] requires [email protected]}
[DECISION 1] MICROSOFT-IAC-QUERIES: 0.0.1
[DERIVATION] MICROSOFT-SHARED-QLPACKS: * [*] {MICROSOFT-IAC-QUERIES: * [*], MICROSOFT-SHARED-QLPACKS: not * [*] {dependency: MICROSOFT-IAC-QUERIES@* [*] requires [email protected]}}
[DERIVATION] advanced-security/iac-queries: * [*] {MICROSOFT-IAC-QUERIES: * [*], advanced-security/iac-queries: not * [*] {dependency: MICROSOFT-IAC-QUERIES@* [*] requires advanced-security/[email protected]}}
[INCOMPATIBILITY] advanced-security/iac-queries: * [*], advanced-security/iac-all: not * [*] {dependency: advanced-security/iac-queries@* [*] requires advanced-security/[email protected]}
[DECISION 2] advanced-security/iac-queries: 0.5.1
[DERIVATION] advanced-security/iac-all: * [*] {advanced-security/iac-queries: * [*], advanced-security/iac-all: not * [*] {dependency: advanced-security/iac-queries@* [*] requires advanced-security/[email protected]}}
[INCOMPATIBILITY] advanced-security/iac-all: * [*], codeql/util: not * [*] {dependency: advanced-security/iac-all@* [*] requires codeql/util@^1.0.12}
[INCOMPATIBILITY] advanced-security/iac-all: * [*], codeql/yaml: not * [*] {dependency: advanced-security/iac-all@* [*] requires codeql/yaml@^1.0.25}
[DECISION 3] advanced-security/iac-all: 0.5.1
[DERIVATION] codeql/yaml: * [*] {advanced-security/iac-all: * [*], codeql/yaml: not * [*] {dependency: advanced-security/iac-all@* [*] requires codeql/yaml@^1.0.25}}
[DERIVATION] codeql/util: * [*] {advanced-security/iac-all: * [*], codeql/util: not * [*] {dependency: advanced-security/iac-all@* [*] requires codeql/util@^1.0.12}}
[DECISION 4] codeql/util: 2.0.19
[DECISION 5] codeql/yaml: 1.0.32
[INCOMPATIBILITY] MICROSOFT-SHARED-QLPACKS: * [*], codeql/util: not * [*] {dependency: MICROSOFT-SHARED-QLPACKS@* [*] requires codeql/[email protected]}
[DECISION 6] MICROSOFT-SHARED-QLPACKS: 0.0.1
QL pack dependencies for MICROSOFT-IAC-QUERIES resolved OK

Sidenote: The .codeqlmanifest file is an old format that was renamed to codeql-workspace.yml (and converted to yaml) more than 3 years ago. So deleting this file also means we don't depend on this deprecated name.

I think it makes sense to delete this file since it makes a submodule pointer in a fork of the public CodeQL repository look directory-wise identical to having an additional directory in the CodeQL repository.

@Copilot Copilot AI review requested due to automatic review settings October 21, 2025 10:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the deprecated .codeqlmanifest.json file that was causing QLpack resolution failures when using this repository as a submodule in Microsoft's fork of the CodeQL repository. The .codeqlmanifest format was replaced by codeql-workspace.yml over 3 years ago, and its presence prevents proper dependency resolution with cryptic error messages.

Key changes:

  • Deletion of the obsolete .codeqlmanifest.json configuration file

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MathiasVP
Copy link
Author

Bahh... This obviously breaks CI testing. I'll figure out if there's anything else we can do!

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

Successfully merging this pull request may close these issues.

1 participant