Skip to content

[compiler] First cut at dep inference #31386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
prettier
  • Loading branch information
jbrown215 committed Nov 19, 2024
commit d77ad3d0bb3e6acab2ebcc283b507d2e48116484
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ function* runWithEnvironment(
name: 'PropagateScopeDependenciesHIR',
value: hir,
});

if (env.config.inferEffectDependencies) {
inferEffectDependencies(env, hir);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ const EnvironmentConfigSchema = z.object({
* the dependency.
*/
enableOptionalDependencies: z.boolean().default(true),

/**
* Enables inference and auto-insertion of effect dependencies. Still experimental.
*/
Expand Down
2 changes: 1 addition & 1 deletion compiler/packages/snap/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function makePluginOptions(
if (firstLine.includes('@inferEffectDependencies')) {
inferEffectDependencies = true;
}

let logs: Array<{filename: string | null; event: LoggerEvent}> = [];
let logger: Logger | null = null;
if (firstLine.includes('@logger')) {
Expand Down
Loading