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

Prevent resolution of packages to check if updates are available permanently or limit it to once per day #2814

Open
lbialy opened this issue Mar 25, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request isolated environments Issues tied with running the CLI in isolated (or corporate) environments. UX

Comments

@lbialy
Copy link

lbialy commented Mar 25, 2024

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:

  1. 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

  2. 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.

@lbialy lbialy added the enhancement New feature or request label Mar 25, 2024
@sjrd
Copy link

sjrd commented Mar 25, 2024

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.

@SethTisue
Copy link
Contributor

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.

@Gedochao Gedochao added the UX label Mar 26, 2024
@Gedochao Gedochao added the isolated environments Issues tied with running the CLI in isolated (or corporate) environments. label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request isolated environments Issues tied with running the CLI in isolated (or corporate) environments. UX
Projects
None yet
Development

No branches or pull requests

4 participants