Morphir is a library of tools that works to capture business logic as data.
For the first time, business logic can be shared, stored, translated and visualised, all with the reliability of standardisation ensured in the Morphir framework.
Provides Scala language bindings and JVM based tooling for Morphir.
The libraries are built on Kyo. The classic ZIO-based library (morphir_3 and its
morphir-interop-*, morphir-model-lowering, morphir-runtime-classic, morphir-tools and morphir-tests
siblings) was removed in 0.5.0-M13. morphir/README.md lists what replaces each artifact.
The Morphir desktop and web UI now lives at finos/morphir-ui.
morphir-scala continues as the Scala implementation and capability provider behind it, for
example the Markdown tooling (morphir/langkit/markdown) and the GitHub connector
(morphir/connector/github), the shared UI library (morphir/ui), and reusable web-host modules
(morphir/web). The Scala CLI's morphir server launch command has retired.
The human-facing Morphir CLI is the Rust implementation in finos/morphir. Follow the official CLI installation guide. This repository's Scala CLI, root launchers, installer, and Coursier channels have retired. Existing scripts must be checked against the Rust CLI's documented commands; command parity is not assumed.
This repository still provides Scala libraries and the morphir-scala-elm compiler extension. The extension
is a Morphir Extension Protocol provider, installed and invoked by a compatible Morphir host.
See packaging and release for its native artifacts.
Click the button below to start a new development environment and start contributing right away:
Morphir-jvm use mill as its build tool.
If you are using IntelliJ IDEA to edit morphir-jvm's Scala code, you can create the IntelliJ project files via:
./mill mill.idea.GenIdea/ideaIf you are using Visual Studio Code, IntelliJ, or any of the Editors which support BSP you can also generate BSP config files via:
./mill mill.bsp.BSP/install
You can also try the following to use the mill-contrib-bloop plugin to install and use the Bloop based BSP setup.
NOTE: The recommended BSP based setup for mill is to run:
./mill mill.bsp.BSP/installas mentioned above.
./mill __.testor in watch mode:
./mill -w __.testBefore checking test coverage, ensure that all tests have been run using the following command:
./mill __.testTo generate a human-readable coverage report, run the following command:
./mill scoverage.htmlReportAllTo view the resulting coverage report, open out/scoverage/htmlReportAll.dest/index.html
To generate an XML coverage report, run the following command:
./mill scoverage.xmlReportAllThe report will be generated at this location out/scoverage/xmlReportAll.dest/scoverage.xml
Code needs to be formatted according to scalafmt rules. Mill owns the entrypoint:
./mill format --kind scalaFor a few known files (preferred during iteration):
./mill format --paths path/to/File.scalaor git-touched paths:
./mill format --changedSee CONTRIBUTING.md — Formatting for the full command table (--sources, --check, etc.).
Mill formats Elm files with the repo-pinned elm-format binary (no global npm install -g elm-format). Give it the
paths to format:
./mill format --kind elm --paths path/to/File.elmA full ./mill format does not format Elm. The tracked .elm files are test fixtures, and elm-format must not
rewrite them.
Windows on ARM64 needs a native build JVM for Scala.js linking. Mill's managed JDK may resolve to an x64 build and
run under emulation, which makes the Closure phase of fullLinkJS much slower. Select the native Microsoft OpenJDK
and add the ignored local Mill override:
scoop install microsoft-lts-jdk # only when it is not already installed
scoop reset microsoft-lts-jdk
Set-Content .mill-jvm-version system
.\mill.bat --no-server --versionThe last command must report os.arch: aarch64. See the
Windows ARM64 contributor setup for the explanation.
If you are using IntelliJ IDEA to edit morphir-scala's Scala code, you can create the IntelliJ project files via or use the BSP Setup option (BSP is the recommended approach):
.\mill -i mill.scalalib.GenIdea/idea
If you are using Visual Studio Code, IntelliJ, or any of the Editors which support BSP you can also generate BSP config files via:
.\mill mill.bsp.BSP/install
You can also try the following to use the mill-contrib-bloop plugin to install and use the Bloop based BSP setup.
NOTE: The recommended BSP based setup for mill is to run:
.\mill mill.bsp.BSP/installas mentioned above.
.\mill -i --import ivy:com.lihaoyi::mill-contrib-bloop: mill.contrib.bloop.Bloop/install
.\mill -i __.test
or in watch mode:
.\mill -i -w __.test
Code needs to be formatted according to scalafmt rules. Prefer the Mill entrypoint:
.\mill -i format
Narrow selection during iteration:
.\mill -i format --changed
.\mill -i format --paths path\to\File.scala
See CONTRIBUTING.md — Formatting.
Watch for updates.
- Fork it (https://github.com/finos/morphir-scala/fork)
- Create your feature branch (
git checkout -b feature/fooBar) - Read our contribution guidelines and Community Code of Conduct
- Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
NOTE: Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool (or EasyCLA). Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.
Need an ICLA? Unsure if you are covered under an existing CCLA? Email help@finos.org
Copyright 2022 FINOS
Distributed under the Apache License, Version 2.0.
SPDX-License-Identifier: Apache-2.0