New WIP DUB documentation

Sönke Ludwig sludwig at outerproduct.org
Thu Aug 18 14:06:41 UTC 2022


Am 18.08.2022 um 12:23 schrieb Bastiaan Veelo:
> ## Hacking on a local copy of a package
> 
> If your project depends on a package in which you have found a problem, 
> or you would like to experiment with changes to it, you can force Dub to 
> use a local copy of the package by following these steps:
> 
> 1. Fork the git repository
> 2. Check out a local clone at `/path/to/the_package`
> 3. Let Dub know about it:
>     `dub add-local /path/to/the_package`
> 4. Make Dub ignore any configured release tag, so you'll see the effect 
> of current changes:
>     `dub add-override the_package * /path/to/the_package`
> 
> Now you can go ahead and play. Once your PR has been merged and 
> released, or you want to revert to upstream, undo your changes by
> 
> 5. `dub remove-local /path/to/the_package`
> 6. `dub remove-override the_package *`

If have a branch checked out whose latest version tag matches the 
version selected by your main project, you can skip the `add-override` 
step, as dub will prefer a repository added with `add-local` over cached 
ones from the registry.

Also, using `add-path` on the parent directory allows you to clone and 
delete repositories at will, without having to use `add-local` and 
`remove-local` each time individually.



More information about the Digitalmars-d-announce mailing list