On Monday, 15 August 2022 at 21:32:23 UTC, WebFreak001 wrote:
Hi all, I'm currently working on new revamped DUB documentation, check it out if you want, it currently contains most old documentation plus a big bunch of new documentation:

https://docs.webfreak.org/

Thank you for doing this!

Not sure if this would be the right place, or if it is addressed already, but I repeatedly find myself looking for the right way to use a local checkout of a package instead of the dub registry, because I keep forgetting. It would be nice to have a section like (assuming I got it right):

## 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.

Reply via email to