Skip to content

Make scala-cli repository configuration a single source of truth (including Bloop bootstrap) #4118

@ghostbuster91

Description

@ghostbuster91

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/maven

This should configure the whole dependency resolution stack that scala-cli relies on.

We go a step further and set also:

COURSIER_REPOSITORIES=$REPO_URL/maven

However, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BloopIssues tied with Bloop integration.enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions