You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/03/06 00:51:27 UTC

[GitHub] ccollins476ad opened a new pull request #140: newt - Repo dependencies

ccollins476ad opened a new pull request #140: newt - Repo dependencies
URL: https://github.com/apache/mynewt-newt/pull/140
 
 
   Allow a repo to specify which other repos it requires in its `repository.yml` file.  For example, a `repository.yml` file might contain the following:
   
   ```
       repository.deps:
           mynewt-nimble:
               type: git
               url: 'git@github.com:apache/mynewt-nimble.git'
               vers:
                   master:             0-dev
                   mynewt_1_4_0_tag:   >=1.4.0
   
           mynewt-nffs:
               type: git
               url: 'git@github.com:apache/mynewt-nffs.git'
               vers:
                   master:             0-dev
                   mynewt_1_4_0_tag:   1.4.0
   ```
   
   What this says is:
   * The master branch of of this repo depends on:
       * nimble 0-dev
       * nffs 0-dev
   * The mynewt_1_4_0_tag tag of of this repo depends on:
       * nimble 1.4.0 or later
       * nffs 1.4.0 only
   
   When the user performs an install, upgrade, or sync operation, newt includes the depended-on repos in the operation.  For example, if the user tells newt to install version 1.4.0 of the above repo, newt will also install suitable versions of nimble and nffs.  If the user then upgrades the above repo to 0.0.0, both nimble and nffs will be upgraded to 0.0.0 along with it.
   
   If the user's request cannot be completed due to conflicting repo version requirements, newt informs the user of the problem and leaves the project unchanged.
   
   In addition, the `-a` (`--ask`) flag has been added to the install, upgrade, and sync commands.  When this flag is specified, newt describes the operation it is about to perform and prompts the user for confirmation before proceeding.
   
   newt had an existing implementation of this feature that this PR replaces.  There were a number of things that the old implementation wasn't doing correctly (it may well have worked when it was originally added):
   
   * Issues with repos whose dependency list changes with version.  Each repo would initially load a set of dependencies corresponding to the currently-installed version.  This could be problematic when a dependent repo is upgraded, as the depended-on repos might no longer satisfy the dependent's requirements.
   
   * Failure to treat version aliases as equivalent.  For example, the `mynewt_arduino_zero` repo maps both 0.0.0 and 0.0.1 to the master branch, making both versions identical.  This could result in conflicts being reported when there actually were none.
   
   Finally, sorry about the size of the "Repo dependencies" commit in this PR!  I tried to break it up into something that would be easier to review, but I found it impossible.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services