Skip to content

Commit d2af337

Browse files
committed
Overlays: allow any build mode for Go
We have a check that a traced language can only run overlay analysis with build-mode: none, but Go does not currently declare support for BMN, even though it has a similar autobuild mode that will work for overlay analysis. This commit adds a hard-coded exception to that check, allowing any build mode for Go. This is intended as a short-term solution until Go declares BMN support. It should be safe, since we can choose not to enable the feature flag for Go repos using traced builds.
1 parent 065c6cf commit d2af337

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

lib/init-action.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/config-utils.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,12 @@ export async function getOverlayDatabaseMode(
723723
buildMode !== BuildMode.None &&
724724
(
725725
await Promise.all(
726-
languages.map(async (l) => await codeql.isTracedLanguage(l)),
726+
languages.map(
727+
async (l) =>
728+
l !== KnownLanguage.go && // Workaround to allow overlay analysis for Go with any build
729+
// mode, since it does not support BMN.
730+
(await codeql.isTracedLanguage(l)),
731+
),
727732
)
728733
).some(Boolean)
729734
) {

0 commit comments

Comments
 (0)