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, avoid having two subprojects #3016

Merged
merged 1 commit into from
Aug 14, 2024

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
@SethTisue SethTisue changed the title in Toolkit sbt example, use flat single-project style in Toolkit sbt example, avoid having two subprojects Aug 9, 2024
@SethTisue SethTisue force-pushed the fix-toolkit-sbt-instructions branch from 70dbf7c to b91f2a9 Compare August 9, 2024 02:59
@adpi2
Copy link
Member

adpi2 commented Aug 9, 2024

LGTM! Is it ready to be merged?

@SethTisue SethTisue marked this pull request as ready for review August 13, 2024 01:15
@SethTisue SethTisue merged commit 860b588 into scala:main Aug 14, 2024
1 check passed
@SethTisue SethTisue deleted the fix-toolkit-sbt-instructions branch August 14, 2024 23:54
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.

2 participants