-
Notifications
You must be signed in to change notification settings - Fork 158
Description
Is your feature request related to a problem? Please describe.
Recently there was a Bloop issue where it tried to bootstrap itself from Sonatype snapshots, and the snapshot repository was unavailable / broken: scalacenter/bloop#2870
In corporate environments we rely on internal artifact mirrors/proxies to avoid issues with public infrastructure and to ensure reproducible, policy-compliant builds (network egress restrictions, auditing, caching, etc.).
We configure scala-cli to use our internal mirror, e.g.:
scala-cli --power config repositories.default $REPO_URL/mavenThis should configure the whole dependency resolution stack that scala-cli relies on.
We go a step further and set also:
COURSIER_REPOSITORIES=$REPO_URL/mavenHowever, despite both of the above, in our case Bloop still attempted to download artifacts from oss.sonatype.org during bootstrap. This makes scala-cli builds unreliable and it defeats the purpose of central repository configuration.
Describe the solution you'd like
Provide a simple and consistent way to configure repositories used by scala-cli and all tools/components it invokes (including Bloop bootstrap), such that:
- Setting
repositories.default(or any related scala-cli option) becomes a single source of truth for repository configuration across the entire stack. - Include an option/behavior like "no default repositories" (e.g. --no-default-repositories or similar), so corporate setups can guarantee zero external repo access.
Describe alternatives you've considered
For now we just disabled bloop in scala-cli via server=false.