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

in Toolkit sbt example, use flat single-project style #3016

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SethTisue
Copy link
Member

a language newcomer on Discord was bitten by this today

note that the examples weren't just unnecessarily complicated, they also used file("example") instead of file("."), so the user ended up having both a root and an example project, and they didn't understand that they needed to put their sources in example/src, because how on earth would they know that?

we can avoid issues like that by simply using the flat style

@SethTisue SethTisue force-pushed the fix-toolkit-sbt-instructions branch from 932d4a2 to 70dbf7c Compare May 7, 2024 15:50
@SethTisue SethTisue requested a review from adpi2 May 7, 2024 15:54
@adpi2
Copy link
Member

adpi2 commented May 8, 2024

I am not convince about that because I think we should slowly discourage people from using the sbt flat style:

  • the difference between flat, and ThisBuild, and Global and project.in(file(".")) is non-obvious for beginners
  • for single module project we should better use Scala CLI whose syntax is as flat as it can be

However I am okay to use file(".") instead of file("example"). It seems that's what we do in scala/scala3.g8 template.

@SethTisue
Copy link
Member Author

okay, I'll make the change

@SethTisue SethTisue marked this pull request as draft May 8, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants