Since I've tried to help @bobeff in the development of the new Nimble features 
and I've had many discussions with him regarding the new functionality, I'll 
try to explain a bit how the new develop mode is supposed to be used in 
practice. I do agree that the README has been presenting this information 
rather poorly, so hopefully my post will be helpful for anyone looking to 
improve the README.

As @bobeff already explained, the major difference is that the new develop mode 
has its effects restricted to specific projects. You can have different 
overrides in different projects (or groups of projects) specified by a 
`nimble.develop` placed in the project directory. The rationale for this is 
that the old develop mode was too polluting. Let's say that you are a web 
developer with a large number of projects using jester. In your latest project, 
you discover an issue in jester that you know how to fix. You put jester in 
develop mode in order to work on the fix, but now some of your older projects 
might be broken, because they used to rely on older version of jester which 
won't be used any more due to the global develop mode override. Switching 
between your projects is now quite complicated and error-prone. The new develop 
mode aims to make it easy for you to configure the layout of your projects once 
and to switch between them without pain.

You might argue here that you have a lot of packages in development mode and 
configuring each and every project to use them would be quite the hassle in 
comparison to the old mode, but this is where the feature of develop file 
includes comes in. Let's say you work in a large team such as our own at 
Status. You're likely to adopt the following directory structure:
    
    
    ./status/
      nim-chronos/
      nim-libp2p/
      nim-chronicles/
      ...
      nimbus-eth2/
      workspace.develop
    
    
    Run

The `workspace.develop` file will reference all the checked out packages that 
you are actively working on. In each and every sub-directory, you have a very 
simple develop file that just includes the shared workspace file:
    
    
    {
      "version": 1,
      "includes": ["../wokspace.develop"],
      "dependencies": []
    }
    
    
    Run

Thus, adding and removing develop mode packages in your workspace by hand is 
quite easy and it can be further easily automated with shell scripts.

To some extent, simulating the old develop mode is also quite possible. You can 
create one global `nimble.develop` file and then define some command aliases 
that manipulate it and include it automatically in your projects. 

Reply via email to