spago icon indicating copy to clipboard operation
spago copied to clipboard

Provide a way to force a refresh of the registry index

Open natefaubion opened this issue 10 months ago • 3 comments

As a user it's not obvious to me how spago manages it's internal registry index. If I need a newly published version of a library, even when explicitly declaring it's version, spago will refuse to install it until it also decides it should refresh it's index. This is a frustrating experience, and it would be nice to have some control over this process.

natefaubion avatar Jan 26 '25 23:01 natefaubion

It seems like this option is supported internally as OnlineBypassCache, but I don't think this is exposed as any sort of CLI option.

natefaubion avatar Jan 26 '25 23:01 natefaubion

Agreed, we should expose this with a flag. OnlineBypassCache was recently added (together with the registry transfer command), so we didn't get around to exposing this yet.

f-f avatar Jan 31 '25 16:01 f-f

I'm interested in adding this as I'm hitting the issue very frequently, but just adding a parser for this flag isn't enough, I don't think. I ran an install --ensure-ranges --bypass-cache, and it just seems to be pulling the registry over and over again in a loop 😄. I'm assuming it's doing this for every package as it attempts to make some sort of build plan.

natefaubion avatar Feb 16 '25 16:02 natefaubion