Skip to content

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

Open
@He-Pin

Description

@He-Pin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfmtIssues tied to the fmt sub-commandrequires scopingIssue requires a spike to revalidate it and assign an up-to date scope for its requirements.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions