Improve how the Morphir CLI handles dependencies and add "includes" to allow providing dependencies at the command line #1165
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theirmorphir.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 themorphir make
, outside of what is provided in themorphir.json
project file.Terms