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.

Set default name for settings file as `project.scala`

See original GitHub issue

Describe what needs to be done and why In case of multiple files it might be useful to allow the user to specify all the using directives in a central file as one would expect similarly to build tools.

There was multiple discussions about what the name should and it seems the winning vote was on project.scala

We need to probably do a number of things:

  • warn users about multiple using directives and suggest using project.scala
  • automatically detect project as ScalaCLI in Metals when project.scala is present
  • create a g8 template with project.scala and also add it to new project wizard in Metals
  • add an automatic action to move all actions into project.scala
  • fix tapir templates to use project.scala
  • update all existing references in our docs from project.settings.scala to project.scala

This issue can act as a central point coordinate the work being done.

Nice to have:

  • automatically detect project as ScalaCLI in Intellij when project.scala is present
  • the existing docs on project.settings.scala seem to have been confusing to some users, so probably improve the docs a bit
    • we probably need a dedicated, small doc on this in the Guides section
    • the Project root directory doc should link to the aforementioned guide
  • Once all else is done, we probably should enable migrating directives to project.scala automatically with a sub-command, as our docs are implying we’ve been planning to do that for a long while.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tgodzikcommented, Oct 24, 2022

Thanks! Added to the description.

0reactions
tgodzikcommented, Dec 14, 2022

@tusharmath Thanks for the suggestion!

The plan currently is to only allow using directives a.k.a //> using... and project.scala just allows users to specify everything in a well defined single place without forcing everyone to use it. If we choose to enable json configuration that would mean that we would have 3 sources of truth: CLI args, using directives and json configuration, which will be very difficult to maintain and make sure that works well out of the box for most people. This is not a direction we want to take, but really thank you for your input! It’s really good to have a discussion about the finer points of ScalaCLI design decisions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set current project to default-6c6f02 (in build file:/home/ ...
scala - Set current project to default-6c6f02 (in build file:/home/user_name/Videos/ - Stack Overflow. Stack Overflow for Teams – Start ...
Read more >
Project settings | IntelliJ IDEA Documentation
To configure project settings, select IntelliJ IDEA | Preferences on macOS or File | Settings on Windows and Linux from the main menu....
Read more >
sbt Reference Manual — Build definition
To do this, create a file named project/build.properties that specifies the sbt ... Let's take a closer look at the build.sbt DSL: setting...
Read more >
Getting Started | Scala Documentation
Run the command sbt new scala/scala3.g8 to create a Scala 3 project, or sbt new scala/hello-world.g8 to create a Scala 2 project. This...
Read more >
sbt/sbt-assembly: Deploy über-JARs. Restart processes. ...
For example the name of the jar can be set as follows in build.sbt: lazy val app = (project in file("app")) .settings( assembly...
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