scala-cli
scala-cli copied to clipboard
Prevent resolution of packages to check if updates are available permanently or limit it to once per day
Is your feature request related to a problem? Please describe.
I'm always frustrated when scala-cli spends few seconds resolving packages of my project on each run to verify whether they can be updated. It is even more frustrating when this happens in transit when internet access is spotty (for instance, in trains) and suddenly an innocent scala-cli compile command hangs after several successful runs (so all the deps are resolved and lie in cache, they are not missing!).
Describe the solution you'd like A --power tier setting with two options:
-
disable resolution of packages if they are present in the local cache completely (in other words: do not inform about updates at all, maybe just inform that package updates are disabled), might be per project, might be globally set for all projects
-
limit resolution of packages for update reasons per project per day or given time period so, for example, if I set this for my project to 1 day I should get at most one warning about new versions of packages used in it per 24 hours
Describe alternatives you've considered There are no alternatives.
Additional context For small libraries (one of primary use cases of scala-cli) it is quite common that one can't just update versions of libraries that are dependencies because of compat reasons. In these cases it is just tiresome to be informed on any scala-cli command run about possible upgrades.
I volunteer to implement this, I'll ping you @Gedochao.
Big +1 here. This has been pretty annoying in one of my projects. IMO, in general, by default, checking for updates should not slow down any normal command. An explicit check-update command can spend the time it wants. Other regular commands, when they already have all their dependencies, should not contact the Internet at the expense of latency.
If we must be proactive about updates, then IMO it should be done in a way that does not reduce latency. For example, it could try to reach the Internet in parallel with the actual command, and if it receives a positive result before the normal command has completed, then display the warning.
I'm interested in seeing this improved as well. Both the performance aspect and the annoyance aspect. I would prefer to ask scala-cli to update my dependencies, rather than have it ask me.