finos / morphir-elm

Tools to work with the Morphir IR in Elm.
https://package.elm-lang.org/packages/finos/morphir-elm/latest
Apache License 2.0
45 stars 63 forks source link

Improve how the Morphir CLI handles dependencies and add "includes" to allow providing dependencies at the command line #1165

Closed DamianReeves closed 3 months ago

DamianReeves commented 4 months ago

Feature - Dependency Management improvement

Improve how the Morphir CLI handles dependencies and add "includes" to allow providing dependencies at the command line

Dependency Management Improvement

The Morphir CLI has had support for some time for models to depend on other models using localDependencies in their morphir.json file. While this feature is not particularly well documented, users who have taken advantage of this feature have hit on some difficulties. The primary issue is that the dependencies must be a local IR file, as each local dependency expected to be an existing Morphir IR on local disk (this means a JSON serialized Morphir IR File).

Users have expressed desires to be able to load dependencies from remote locations. Also, it would be nice if it were easier to share dependencies.

Ways we want to enable to load dependencies:

Local Dependencies

Remote Dependencies

NOTE: That to start we are focused on directly loading Morphir IR JSON files, but another feature we would look to support, but most likely not in this PR is to pull out the Morphir IR JSON files from a zip or tar archive as well as the more advanced function of triggering a build of the Morphir IR JSON given a dependency on a morphir.json project file which may be located at a local or remote location.

Includes

Includes allow you to support the use-cases mentioned above but using the -I command-line option. With the -I option it would be easy for example to inject additional IR includes to the morphir make, outside of what is provided in the morphir.json project file.

Terms

THIS SOFTWARE IS CONTRIBUTED SUBJECT TO THE TERMS OF THE TERMS OF THE CCLA DATED 2017-11-07 WITH FINOS/LINUX FOUNDATION (FORMERLY THE SYMPHONY SOFTWARE FOUNDATION CCLA).

THIS SOFTWARE IS LICENSED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS SOFTWARE MAY BE REDISTRIBUTED TO OTHERS ONLY BY EFFECTIVELY USING THIS OR ANOTHER EQUIVALENT DISCLAIMER IN ADDITION TO ANY OTHER REQUIRED LICENSE TERMS.