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

Allow run with no sources / replacing cs launch #2840

Open
kubukoz opened this issue Apr 5, 2024 · 0 comments
Open

Allow run with no sources / replacing cs launch #2840

kubukoz opened this issue Apr 5, 2024 · 0 comments
Labels
enhancement New feature or request
Projects

Comments

@kubukoz
Copy link
Contributor

kubukoz commented Apr 5, 2024

Is your feature request related to a problem? Please describe.

scala-cli is almost capable of replacing cs launch from Coursier: the only thing that appears to be missing, in order to be able to run an arbitrary application from dependencies, is that scala-cli run requires at least one source file / directory.

For example:

scala-cli run --dep software.amazon.smithy:smithy-cli:1.45.0 . --main-class software.amazon.smithy.cli.SmithyCli

Describe the solution you'd like

If dependencies are provided, relax the requirement of having to pass a file/directory.

In addition, there are a couple nice-to-haves:

  • discover main classes from dependencies, maybe with a flag?
  • if no sources are passed, don't start a compilation server (assume --server=false?)

Describe alternatives you've considered

  • Using cs launch as usual
  • Using a dummy empty directory as the sources

Additional context

This would be nice to enable the usage of code generators, such as smithy4s, without waiting for #610. For example, at the moment:

scala-cli run --scala 2.13 --dep com.disneystreaming.smithy4s::smithy4s-codegen-cli:0.18.15 . --main-class smithy4s.codegen.cli.Main --server=false -- version

which isn't terrible, but still requires that dummy directory (.).

@kubukoz kubukoz added the enhancement New feature or request label Apr 5, 2024
@kubukoz kubukoz changed the title Allow run with no sources Allow run with no sources / replacing cs launch Apr 5, 2024
@tgodzik tgodzik added this to To do in Issue Board via automation Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant