Skip to content
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

fix: do not download compilerOptions -> types when not type checking #24473

Merged

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jul 8, 2024

Closes #22738

@@ -481,7 +481,11 @@ impl ModuleGraphBuilder {
}
}

let maybe_imports = self.options.to_maybe_imports()?;
let maybe_imports = if options.graph_kind.include_types() {
self.options.to_compiler_option_types()?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error for these failing only gets surfaced when type checking.

/// Return any imports that should be brought into the scope of the module
/// graph.
pub fn to_maybe_imports(
pub fn to_compiler_option_types(
&self,
) -> Result<Vec<deno_graph::ReferrerImports>, AnyError> {
self.workspace.to_maybe_imports().map(|maybe_imports| {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a separate PR that I'll land over time to rename this here: denoland/deno_config#75

@dsherret dsherret added this to the 1.45 milestone Jul 9, 2024
@dsherret dsherret merged commit 43d10a5 into denoland:main Jul 9, 2024
17 checks passed
@dsherret dsherret deleted the fix_do_not_download_types_code_graph branch July 9, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deno (re)download type file every time running a script when using compilerOptions -> types
2 participants