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(npm): cache bust npm specifiers more aggressively #18636

Merged

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Apr 8, 2023

Part 1: #18622
Part 2: This PR

Closes #16901

@dsherret dsherret marked this pull request as ready for review April 11, 2023 22:13
@dsherret dsherret force-pushed the fix_cache_bust_npm_specifiers_more_aggressively branch from 0832cfb to d13d3f9 Compare April 11, 2023 23:28
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, thanks so much for fixing this problem 🙏

Comment on lines +40 to +47
) -> FuturesOrdered<
impl Future<
Output = Result<
(&NpmPackageReq, Arc<deno_npm::registry::NpmPackageInfo>),
NpmRegistryPackageInfoLoadError,
>,
>,
> {
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised clippy doesn't complain about too complex type here.

Comment on lines +104 to +107
if inner.npm_registry_api.mark_force_reload() {
log::debug!("Failed to resolve package. Retrying. Error: {err:#}");
// re-initialize
inner.npm_registry_api.clear_memory_cache();
Copy link
Member

Choose a reason for hiding this comment

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

👍

@dsherret dsherret merged commit 0e3f62d into denoland:main Apr 12, 2023
@dsherret dsherret deleted the fix_cache_bust_npm_specifiers_more_aggressively branch April 12, 2023 12:36
levex pushed a commit that referenced this pull request Apr 12, 2023
Part 1: #18622 
Part 2: This PR

Closes #16901

---------

Co-authored-by: Luca Casonato <[email protected]>
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.

Cache bust npm specifiers more aggressively
3 participants