Merge pull request #3184 from github/nickrolfe/go-overlay

Overlays: allow any build mode for Go
This commit is contained in:
Nick Rolfe
2025-10-08 10:48:40 +01:00
committed by GitHub
2 changed files with 15 additions and 2 deletions
+7 -1
View File
@@ -87863,7 +87863,13 @@ async function getOverlayDatabaseMode(codeql, repository, features, languages, s
return nonOverlayAnalysis;
}
if (buildMode !== "none" /* None */ && (await Promise.all(
languages.map(async (l) => await codeql.isTracedLanguage(l))
languages.map(
async (l) => l !== "go" /* go */ && // Workaround to allow overlay analysis for Go with any build
// mode, since it does not yet support BMN. The Go autobuilder and/or extractor will
// ensure that overlay-base databases are only created for supported Go build setups,
// and that we'll fall back to full databases in other cases.
await codeql.isTracedLanguage(l)
)
)).some(Boolean)) {
logger.warning(
`Cannot build an ${overlayDatabaseMode} database because build-mode is set to "${buildMode}" instead of "none". Falling back to creating a normal full database instead.`
+8 -1
View File
@@ -723,7 +723,14 @@ export async function getOverlayDatabaseMode(
buildMode !== BuildMode.None &&
(
await Promise.all(
languages.map(async (l) => await codeql.isTracedLanguage(l)),
languages.map(
async (l) =>
l !== KnownLanguage.go && // Workaround to allow overlay analysis for Go with any build
// mode, since it does not yet support BMN. The Go autobuilder and/or extractor will
// ensure that overlay-base databases are only created for supported Go build setups,
// and that we'll fall back to full databases in other cases.
(await codeql.isTracedLanguage(l)),
),
)
).some(Boolean)
) {