Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Natoandro committed Aug 29, 2024
1 parent 643adcd commit c464d14
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions files/MergedEnvs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export class ParentEnvs {
posixDirs: Array<PosixDirProvision>,
dynamicPosixDirs: Array<DynamicPosixDirProvision>,
) {
logger.debug("merge posix dirs", { posixDirs, dynamicPosixDirs });
this.#posixDirs.push(...posixDirs);
this.#dynamicPosixDirs.push(...dynamicPosixDirs);
}
Expand Down
4 changes: 2 additions & 2 deletions files/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,10 @@ export class Ghjkfile {
prov,
);
}),
...base.posixDirs,
...final.posixDirs,
...base.dynamicPosixDirs,
...base.posixDirs,
...final.dynamicPosixDirs,
...base.dynamicPosixDirs,
// env hooks
...hooks,
],
Expand Down
1 change: 1 addition & 0 deletions modules/envs/posix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export async function cookPosixEnv(
},
) {
logger.debug("cooking env", envKey, { envDir });
logger.debug("recipe", recipe);
const reducedRecipe = await reduceStrangeProvisions(gcx, recipe);
await $.removeIfExists(envDir);
// create the shims for the user's environment
Expand Down
2 changes: 2 additions & 0 deletions modules/envs/reducer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { unwrapZodRes } from "../../port.ts";
import logger from "../../utils/logger.ts";
import { execTask } from "../tasks/exec.ts";
import { getTasksCtx } from "../tasks/inter.ts";
import type { GhjkCtx } from "../types.ts";
Expand Down Expand Up @@ -66,6 +67,7 @@ export async function reduceStrangeProvisions(
const reducerStore = getProvisionReducerStore(gcx);
// Replace by `Object.groupBy` once the types for it are fixed
const bins = {} as Record<string, Provision[]>;
logger(import.meta).debug("provides", env.provides);
for (const item of env.provides) {
let bin = bins[item.ty];
if (!bin) {
Expand Down

0 comments on commit c464d14

Please sign in to comment.