MCPcopy Create free account
hub / github.com/vercel/vercel / enqueueDeps

Function enqueueDeps

packages/python/src/dependency-externalizer.ts:1064–1095  ·  view source on GitHub ↗
(pkg: UvLockPackage)

Source from the content-addressed store, hash-verified

1062
1063 // Seed the BFS with the root package's compatible dependencies
1064 async function enqueueDeps(pkg: UvLockPackage): Promise<void> {
1065 if (!pkg.dependencies) return;
1066 for (const dep of pkg.dependencies) {
1067 const normalized = normalizePackageName(dep.name);
1068 if (visited.has(normalized)) continue;
1069 if (dep.marker) {
1070 try {
1071 const compatible = await evaluateMarker(
1072 dep.marker,
1073 pythonMajor,
1074 pythonMinor,
1075 sysPlatform,
1076 platformMachine
1077 );
1078 if (!compatible) {
1079 debug(
1080 `Skipping dependency ${dep.name}: marker "${dep.marker}" not satisfied on ${sysPlatform}`
1081 );
1082 continue;
1083 }
1084 } catch (err) {
1085 // If we can't evaluate the marker, conservatively include the dependency
1086 debug(
1087 `Failed to evaluate marker "${dep.marker}" for ${dep.name}, including conservatively: ${
1088 err instanceof Error ? err.message : String(err)
1089 }`
1090 );
1091 }
1092 }
1093 queue.push(normalized);
1094 }
1095 }
1096
1097 await enqueueDeps(rootPkg);
1098

Callers 1

Calls 5

normalizePackageNameFunction · 0.90
evaluateMarkerFunction · 0.90
debugFunction · 0.90
pushMethod · 0.65
hasMethod · 0.45

Tested by

no test coverage detected