Replies: 5 comments 3 replies
-
The recommended project templates are in the docs. There are quite a number of examples. Anything else is left up in the air, and I don't think there is consensus on a lot of it e.g. the folder layout within src/. If you wish to discuss it you can open a thread on the discussions forum, but most of the decisions you brought up are basically out of scope for Mill as of today |
Beta Was this translation helpful? Give feedback.
-
I've studied the examples before opening the ticket, and they don't answer the questions posed above. I don't understand how these questions can be out of scope, because the tool would have it's own opinion about the structure. Sure, the structure can be customized, but that, by definition, means deviating from the default, and the default is unclear (to me). |
Beta Was this translation helpful? Give feedback.
-
Welcome to Mill! I guess, the Giter8 template already shows an idiomatic project layout. Except, it does not use the Here is the out-of-the-box layout of the Giter8 template.
If you change it as follows -object foo extends ScalaModule {
+object foo extends RootModule with ScalaModule { the resulting layout will avoid the extra nested
Please keep in Mind that Mill itself is a general purpose build tool which enbeds it's project definition into a Scala script and provides rich generic features like caching or introspectability. You can customize the opinionated modules provided in IMHO, we show a lot of examples in the docs, and there is also the Mill project's own
This is essentially what the Giter8 template provides. To have another module, just duplicate the
This isn't enforced by the modules in
This is easy. As
This is already the case. By default, resources are located in the |
Beta Was this translation helpful? Give feedback.
-
Sigh... The only way I got the RootModule to work out as expected was the following: In import mill._, scalalib._
object `package` extends RootModule with ScalaModule {
def scalaVersion="2.13.14"
} This is underdocumented. Anyhow... Examples do matter. |
Beta Was this translation helpful? Give feedback.
-
AFAICT, a recommended project structure for Mill is non-existent. As a new user, I'm faced with the following issues:
2 and 3 differ substantially.
The Gitter template generates the following directory structure:
Although the top-level directory and the only Mill module are both named
foo
, it appears that this isn’t a requirement, and the top-levelfoo
may contain multiple Mill modules named whatever necessary.The package is under the
src
directories, and iscom.example
above.This ticket asks that the following is clarified/documented:
src
). The assumption is that a multi-module project is simply a collection of several single-module (potentially interdependent) projects.A screenshot from the Scala Days talk is shown below as evidence that it doesn't answer any of the questions above.
Beta Was this translation helpful? Give feedback.
All reactions