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

Feature request: Do not break the progress if there is a networking problem. #3403

Open
He-Pin opened this issue Jan 5, 2025 · 1 comment
Labels
enhancement New feature or request fmt Issues tied to the fmt sub-command requires scoping Issue requires a spike to revalidate it and assign an up-to date scope for its requirements.

Comments

@He-Pin
Copy link

He-Pin commented Jan 5, 2025

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

[error]  Error fetching artifacts:
https://github.com/virtuslab/scalafmt-native-image/releases/download/v3.8.3/scalafmt-aarch64-apple-darwin.gz: download error: Caught java.net.ConnectException (Operation timed out) while downloading https://github.com/virtuslab/scalafmt-native-image/releases/download/v3.8.3/scalafmt-aarch64-apple-darwin.gz

I lives in China, and there is a GFW, so the networking is not stable. I have a local 3.8.3 fmt which has been downloaded by scala-cli.
But everytime I run a scala-cli fmt , scala-cli will try to download the same 3.8.3, and then if the networking is bad, it will break the whole progress.

Describe the solution you'd like
Check if there is a local cache, if there is, skip the network checking, just run it.
if the local cache is broken, a user can run scala-cli fmt -f to run the whole progress, eg redownloading.

Describe alternatives you've considered
Run it from sbt shell

Additional context
Please support this thanks.

@He-Pin He-Pin added the enhancement New feature or request label Jan 5, 2025
@Gedochao Gedochao added fmt Issues tied to the fmt sub-command requires scoping Issue requires a spike to revalidate it and assign an up-to date scope for its requirements. labels Jan 7, 2025
@He-Pin
Copy link
Author

He-Pin commented Jan 10, 2025

Would it be possible to have this in next version? this will make my life easier .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fmt Issues tied to the fmt sub-command requires scoping Issue requires a spike to revalidate it and assign an up-to date scope for its requirements.
Projects
None yet
Development

No branches or pull requests

2 participants