Skip to content

Add refresh flag to force refresh of the Registry state#1372

Merged
f-f merged 7 commits intomasterfrom
f-f/add-refresh-flag
Jan 26, 2026
Merged

Add refresh flag to force refresh of the Registry state#1372
f-f merged 7 commits intomasterfrom
f-f/add-refresh-flag

Conversation

@f-f
Copy link
Member

@f-f f-f commented Jan 24, 2026

Fix #1320

@f-f f-f requested a review from fsoikin January 24, 2026 23:44
@thomashoneyman
Copy link
Member

I think getMetadataForPackagesImpl needs this too, or else --refresh won't affect metadata looksup from the db cache.

  getMetadataForPackagesImpl :: Db -> OnlineStatus -> Array PackageName -> Spago (LogEnv ()) (Either String (Map PackageName Metadata))
  getMetadataForPackagesImpl db onlineStatus names = do
- (map Map.fromFoldable <<< sequence) <$> case onlineStatus == OnlineBypassCache of
+ (map Map.fromFoldable <<< sequence) <$> case onlineStatus == OnlineBypassCache || onlineStatus == OnlineRefreshRegistry of

@f-f
Copy link
Member Author

f-f commented Jan 25, 2026

Ha, great catch! I have added the fix and extended the new test to cover this case

@f-f f-f merged commit 3d63a26 into master Jan 26, 2026
7 of 8 checks passed
@f-f f-f deleted the f-f/add-refresh-flag branch February 2, 2026 16:49
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.

Provide a way to force a refresh of the registry index

2 participants