Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
May 22, 2024

Conversation

DamianReeves
Copy link
Member

@DamianReeves DamianReeves commented May 20, 2024

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

  • file paths - Morphir IR JSON at a file path
  • Data URLs - Morphir IR JSON encoded as a Data URL

Remote Dependencies

  • - http(s) - Morphir IR JSON provided via http(s)
  • - github - Morphir IR JSON at a github location and/or release
  • - ftp - Morphir IR JSON at a FTP URL

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.

@DamianReeves DamianReeves marked this pull request as ready for review May 22, 2024 11:37
@DamianReeves DamianReeves merged commit aac22df into finos:main May 22, 2024
1 check passed
@DamianReeves DamianReeves deleted the includes-and-dependencies branch May 22, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant