generated from finos/software-project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Add Data.Basic EnumWrappers. Move derivers to datamodel base. (#…
…282)
- Loading branch information
1 parent
7459c47
commit 299d9f8
Showing
18 changed files
with
613 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Customizing the Build | ||
|
||
## Using build.user.conf | ||
|
||
* Add a build.user.conf to the root directory. | ||
* This file can be used to set BuildSettings -> ScalaSettings. | ||
* The path to each setting is based on the path in the BuildSettings case class | ||
|
||
For example, to disable the JavaScript and Native builds, as well as | ||
to only build with Scala 3.3.0 do the following: | ||
|
||
``` | ||
# build.user.conf | ||
js.enable=false | ||
native.enable=false | ||
scala.defaultCrossScalaVersions=3.3.0 | ||
``` | ||
|
||
It is very useful to generate the IntelliJ settings file in this mode | ||
as it will radically increase IntelliJ's build performance. | ||
|
||
```bash | ||
./mill mill.scalalib.GenIdea/idea | ||
``` | ||
|
||
## Command Environment Variables | ||
|
||
Another way to specify certain properties on the command line is | ||
through environment variables. | ||
``` | ||
MORPHIR_BUILD_JVM_ENABLE=false ./mill -i showBuildSettings | ||
``` | ||
Make sure to use `./mill -i` with this feature in order to | ||
for these settings to take effect. Otherwise mill will use the background | ||
mill server which is on a separate JVM and these settings will not take | ||
effect (however the build.user.conf approach above will still work). | ||
|
||
## Modifying JVM Properties | ||
|
||
Use `.mill-jvm-opts` to set Java properties for the build. | ||
|
||
## Dev Mode | ||
|
||
In order to easily disable Native/JS builds and set the Scala | ||
version to 3.3.0 you can also use a global environment variable. | ||
Add the following to your `.zprofile` (on OSX) or `.bashrc` (on Linux) | ||
etc... | ||
|
||
``` | ||
export MORPHIR_SCALA_DEV_MODE='true' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
examples/morphir-elm-projects/evaluator-tests/src/Morphir/Examples/App/EnumTest.elm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Morphir.Examples.App.EnumTest exposing (..) | ||
|
||
type Amount = Amount Int | ||
|
||
amount: Amount | ||
amount = Amount 123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.finos.morphir.datamodel | ||
|
||
// Stub so Scala 2 can compile org.finos.morphir.datamodel package since it requires the Deriver trait | ||
trait Deriver[T] { | ||
def derive(value: T): Data | ||
def concept: Concept | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.