I'm a high school teacher, and I'm using Scala to teach my Intro to Programming class. It's a little scary, but I'm excited.
However, since these are beginners, I want to give them as simple a
project structure as possible. In the beginning, everything will just
be at the top level, and at the very beginning, everything will
probably be in one .scala
file.
Unfortunately, I can't figure out how to convince Eclipse that I don't
want src/main/scala
, src/test/scala
, etc. and not get errors. Here's
my best crack at build.sbt so far:
scalaSource in Compile <<= baseDirectory
scalaSource in Test <<= baseDirectory
resourceDirectory <<= baseDirectory
unmanagedSourceDirectories in Compile <<= Seq(scalaSource in Compile).join
unmanagedSourceDirectories in Test <<= Seq(scalaSource in Test).join
Unfortunately, when I run eclipse and refresh, Eclipse complains that there are duplicate entries in the build path and that it can't link to the base directory--which it represents as the absolute path to the project directory, but with hyphens substituted for slashes.
I can fix up the Eclipse project manually, but it'd be great if I could figure out how not to have to do that.
Instead you can go with the scala interpreter and you start as it from the scratch. it will be very basic for the beginners. All the best!!!
You shouldn't teach things one way for people to later discover it doesn't work in the real world. I see your point, they are beginners, but a folder structure is not the hard part.
Do a step by step, minimum level, but real world intro into things.
If they go home and try on their own they have to waste time with build.sbt
changes that are for more difficult than a simple General -> Import in Eclipse.
Stick with the standards, if they will learn anything about Scala, they won't have a problem with the folders. My 2 cents.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With