question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use sbt's launcher, for now

See original GitHub issue

While I think, long-term, it would be excellent to kill off sbt/launcher, I’m concerned that it’s still premature and over-reaching to do so right now.

As such, I recommend that, instead of cs setup installing a bootstrap around coursier/sbt-launcher, it just bootstraps https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch/, even if that means that the process will resolve sbt (https://repo1.maven.org/maven2/org/scala-sbt/sbt/), and its internal and external dependencies, with old-man Apache Ivy.

(Whether that means changing https://github.com/coursier/apps/blob/master/apps/resources/sbt-launcher.json or creating a new descriptor, I’m not sure.)

AFAICT, there are 3 parts that cs setup impacts:

  1. build-time packaging (sbt “preloads” the bundles with the dependencies, and copies them during on first run)
  2. the “runner” part (before java), which does the preloading stuff above, and -D, -J support, etc (sbt/sbt-launcher-package vs paulp/sbt-extras)
  3. the “launcher” part (on the JVM), where sbt is just an “app”, with the complicated setup it has (components, locks, “installing” components, ScriptMain, etc).

This issue suggests deferring changing that last part to later.

For the first issue, I’ve always been sceptical of the preloading business, but we must, nonetheless, try not to regress, particularly for users behind corporate firewalls, the Great Firewall of China or the Great Barrier Reef (high latency).

For the second part, we already have unfortunate divergence with the history behind the two. But I also think it’s a much simpler problem to solve than the legacy behind sbt/launcher’s logic.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
alexarchambaultcommented, May 12, 2020

I wasn’t aware that cs launch org.scala-sbt:sbt-launch:1.3.10 basically works… Not sure what are the limitations of using just that. Beyond it using Ivy to fetch sbt, and not reading things like .sbtopts I guess.

The original reason I settled with coursier/sbt-launcher is that I knew I can launch it like any other JVM application, with cs launch or via an app descriptor.

1reaction
dwijnandcommented, May 15, 2020

That’s a good idea! I’ll try to find some time for it.

Thanks. I’m also asking because I want to do the same by porting dwijnand/scala-runners to Scala (or Java, if necessary), using an API-stable programmatic equivalent of cs launch, and then native-image that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apply Now | The Southern Baptist Theological Seminary
Start your application to study at Southern Seminary and train for gospel ministry. ... Create an account and start your application at the...
Read more >
Help | The Southern Baptist Theological Seminary
Plug-ins, Players & Readers. SBTS provides information on its website in a variety of file formats that best match the transfer and display...
Read more >
The Southern Baptist Theological Seminary
Trusted for Truth. Southern Seminary (SBTS) offers gospel-centered, theologically-grounded training for ministry. ... Apply now · Visit Campus ...
Read more >
Watch SBTS Chapel Live
Watch SBTS chapel live. The seminary community gathers to worship in Alumni Chapel on Tuesday and Thursday at 10 a.m. Get the current...
Read more >
Refer a Student | The Southern Baptist Theological Seminary
Tell us about someone you know who is interested in Boyce College or seminary and we will reach out to connect them to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found