Skip to content

Commit 9d37fa9

Browse files
partoufclaude
andcommitted
Handle go_ prefix when matching Go libraries from Conan server
Go library packages are stored with a go_ prefix (e.g. go_uuid) but the CE API lists them without it (e.g. uuid). Directories starting with go_ now skip C++/Rust/Fortran lookups and match directly against the Go library list with the prefix stripped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a3a806e commit 9d37fa9

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

index.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,25 @@ async function refreshConanLibraries(forceall) {
233233
const libraryId = libraryDir.name;
234234
availableLibraryIds.push(libraryId);
235235
let language = 'cpp';
236+
let ceLib;
236237

237-
let ceLib = _.find(allCppLibrariesAndVersions, (lib) => lib.id === libraryId);
238-
if (!ceLib) {
239-
ceLib = _.find(allRustLibrariesAndVersions, (lib) => lib.id === libraryId);
240-
if (ceLib) {
241-
language = 'rust';
242-
} else {
243-
ceLib = _.find(allFortranLibrariesAndVersions, (lib) => lib.id === libraryId);
238+
if (libraryId.startsWith('go_')) {
239+
ceLib = _.find(allGoLibrariesAndVersions, (lib) => `go_${lib.id}` === libraryId);
240+
if (ceLib) language = 'go';
241+
} else {
242+
ceLib = _.find(allCppLibrariesAndVersions, (lib) => lib.id === libraryId);
243+
if (!ceLib) {
244+
ceLib = _.find(allRustLibrariesAndVersions, (lib) => lib.id === libraryId);
244245
if (ceLib) {
245-
language = 'fortran';
246+
language = 'rust';
246247
} else {
247-
ceLib = _.find(allGoLibrariesAndVersions, (lib) => lib.id === libraryId);
248-
if (ceLib) language = 'go';
248+
ceLib = _.find(allFortranLibrariesAndVersions, (lib) => lib.id === libraryId);
249+
if (ceLib) {
250+
language = 'fortran';
251+
} else {
252+
ceLib = _.find(allGoLibrariesAndVersions, (lib) => lib.id === libraryId);
253+
if (ceLib) language = 'go';
254+
}
249255
}
250256
}
251257
}

0 commit comments

Comments
 (0)