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

Configurable sbt-launch-repo #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sideeffffect
Copy link

No description provided.

@sideeffffect
Copy link
Author

Could you please have a look at this PR? @alexarchambault @dwijnand

sbt
echo "https://github.com/coursier/sbt-launcher/releases/download/v$version/csbt"
local base="${sbt_launch_repo:-$(url_base "$version")}"

echo "$base/io/get-coursier/sbt-launcher_2.12/$version/sbt-launcher_2.12-$version.jar"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no io/get-coursier/sbt-launcher_2.12 anything under https://repo.scala-sbt.org/scalasbt/maven-releases.

And even if this were point to https://repo1.maven.org/maven2/io/get-coursier/sbt-launcher_2.12/1.2.19/sbt-launcher_2.12-1.2.19.jar I'm not 100% sure if that's equivalent to https://github.com/coursier/sbt-launcher/releases/download/v1.2.19/csbt (I remember something about Alex saying that there's a specific process in packaging coursier/sbt-launcher.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexarchambault so what needs to be done to make coursier/sbt-launcher equivalent to csbt?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And even if this were point to https://repo1.maven.org/maven2/io/get-coursier/sbt-launcher_2.12/1.2.19/sbt-launcher_2.12-1.2.19.jar I'm not 100% sure if that's equivalent to https://github.com/coursier/sbt-launcher/releases/download/v1.2.19/csbt (I remember something about Alex saying that there's a specific process in packaging coursier/sbt-launcher.

Yes, the csbt jar at https://github.com/coursier/sbt-launcher/releases/download/v1.2.19/csbt is generated roughly with

$ cs bootstrap -o csbt sbt-launcher

It's a coursier "bootstrap", containing a list of URLs, which includes https://repo1.maven.org/maven2/io/get-coursier/sbt-launcher_2.12/1.2.19/sbt-launcher_2.12-1.2.19.jar and its dependencies.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sideeffffect IIUC, you'd like this JAR (csbt) to be downloaded from a repository of yours, rather than from GitHub?

For that to work, I think you'll have to generate your own csbt, like

$ cs bootstrap sbt-launcher:1.2.19 -o csbt --no-default -r https://your-custom-repo -r htttps://other-custom-repo

I guess that scenario would be made easier if / when the official sbt launcher were to be reworked based on https://github.com/coursier/sbt-launcher.

@sideeffffect
Copy link
Author

I probably don't have a very good overview of Coursier and its features (bootstrap, setup, and others), so please excuse me if I sound confused.
In the light of coursier/coursier#1714 having being merged, has the situation changed?
To summarize what I/my team are looking for: Is there a launch script, that

  • doesn't use ivy
  • but uses Coursier exclusively
  • doesn't need dedicated cs bootstrap
  • but gets the bootstrap repository from a parameter/env variable/.sbtopts file like paulp/sbt-extras does
  • and thus works behind different corporate firewalls?

If not, did we get closer to this? Thank you :)

@alexarchambault
Copy link
Member

coursier/coursier#1714 doesn't really get you closer to that, as it goes back to using Ivy to fetch sbt - it relies on the vanilla sbt launcher (as most people involved in sbt are more familiar with it).

Maybe we could push a bootstrap on Maven Central, so that you could get it via an internal mirror of Maven Central…

@sideeffffect
Copy link
Author

Maybe we could push a bootstrap on Maven Central, so that you could get it via an internal mirror of Maven Central…

What would be the workflow with it then? The coursier/sbt-extras script would

  • take the internal mirror (-sbt-launch-repo) from parameter/env variable/.sbtopts file (like paulp/sbt-extras does)
  • download "the bootstrap" from given mirror
  • launch the bootstrap
  • the bootstrap would honor the prescribed repositories file from .sbtopts (-Dsbt.repository.config=project/repositories -Dsbt.override.build.repos=true)

Something like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants