On Thursday, 18 August 2022 at 10:23:35 UTC, Bastiaan Veelo wrote:

## 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 *`


-- Bastiaan.

You can also simply to modify the tree in .dub or %appdata% and afterwards copy-paste the change to a git clone. It's more dangerous, but I think it's more straighforward too.

Reply via email to