kitlangton / given

A tool for interactively updating your Scala dependencies.
43 stars 1 forks source link

Support Scala-cli projects #2

Open spamegg1 opened 3 months ago

spamegg1 commented 3 months ago

Scala-cli is about to become the default scala command via SIP 46, so it's going to see a lot more usage. More people will be using "build-tool-less" small single module projects.

At least support the project.scala file with the using directives for dependencies only.

Right now we get: Screenshot from 2024-06-07 19-23-52

Here's an example project.scala

//> using scala 3.4.2
//> using platform jvm native
//> using nativeVersion 0.5.2
//> using resourceDir ./src/main/resources
//> using test.resourceDir ./test/main/resources
//> using toolkit default
//> using dep org.scala-lang.modules::scala-parallel-collections::1.0.4
//> using dep org.scalafx::scalafx:21.0.0-R32
//> using dep org.creativescala::doodle:0.21.0
//> using dep net.ruippeixotog::scala-scraper:3.1.1
//> using dep io.spray::spray-json:1.3.6
//> using dep org.scala-lang.modules::scala-xml:2.2.0
//> using dep org.xerial:sqlite-jdbc:3.45.2.0
//> using dep com.typesafe.slick::slick:3.5.0
//> using dep org.scala-graph:graph-core_2.13:2.0.1
//> using dep at.logic.gapt:gapt_2.13:2.16.0
//> using dep com.github.cascala:galileo_2.13:0.1.3
kitlangton commented 3 months ago

I'll definitely do this :)

spamegg1 commented 3 months ago

Scala-cli already does this both on CLI and in IDE:

Screenshot from 2024-06-07 21-55-49

I'm not sure if that helps you or not.