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

Extract dependencies from scala-cli via sbt export #2933

Merged
merged 16 commits into from
Jan 19, 2023

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Jan 18, 2023

This implements the idea sketched in #2686 (comment). ScalaCliAlg extracts dependencies and resolvers from a Scala CLI "project" via an export to a sbt build and then leveraging the already existing SbtAlg for the actual data extraction.

These two PRs demonstrate that this works:

Note that the base branch of these PRs only contain a single script.scala file. There are no other files.

Copy link
Member

@alejandrohdezma alejandrohdezma left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Jan 18, 2023

Codecov Report

Base: 90.57% // Head: 90.61% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (15a1c08) compared to base (1f0282a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2933      +/-   ##
==========================================
+ Coverage   90.57%   90.61%   +0.04%     
==========================================
  Files         154      155       +1     
  Lines        3045     3059      +14     
  Branches      196      208      +12     
==========================================
+ Hits         2758     2772      +14     
  Misses        287      287              
Impacted Files Coverage Δ
...g/scalasteward/core/buildtool/maven/MavenAlg.scala 87.50% <ø> (ø)
...org/scalasteward/core/buildtool/mill/MillAlg.scala 78.04% <ø> (ø)
...la/org/scalasteward/core/application/Context.scala 75.32% <100.00%> (+0.32%) ⬆️
...lasteward/core/buildtool/BuildToolDispatcher.scala 100.00% <100.00%> (ø)
...asteward/core/buildtool/scalacli/ScalaCliAlg.scala 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fthomas
Copy link
Member Author

fthomas commented Jan 18, 2023

Btw, this integration could be nicer and less hacky with a dump / export --json command as described in VirtusLab/scala-cli#1005 / VirtusLab/scala-cli#1791.

Copy link
Member

@mzuehlke mzuehlke left a comment

Choose a reason for hiding this comment

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

Cool idea to use the sbtexport

@fthomas fthomas added this to the 0.21.0 milestone Jan 18, 2023
@fthomas fthomas added enhancement New feature or request cat:build-tool labels Jan 18, 2023
@fthomas fthomas linked an issue Jan 18, 2023 that may be closed by this pull request
@fthomas fthomas merged commit bf941ea into main Jan 19, 2023
@fthomas fthomas deleted the topic/scala-cli-support branch January 19, 2023 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:build-tool enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Scala CLI dependencies via using directives
3 participants