WordPress / wporg-repo-tools

6 stars 4 forks source link

link our internal dependencies rather than installing built versions #24

Open iandunn opened 2 years ago

iandunn commented 2 years ago

when one of our repos depends on another (e.g., wporg-main-2022 requires wporg-mu-plugins), the dependencies are installed w/ composer. that makes it clunky to work on both at the same time, though. you have to delete the version composer installed, and then checkout the git repo in its place. when you run composer update, the git repo gets wiped out, including any unpushed changes.

there are a few options to solve that problem, similar to npm link.

iandunn commented 2 years ago

it may also be possible to just use composer to clone the git repos directly, rather than treating them as packages

ocean90 commented 2 years ago

You may want to take a look at the preferred-install config. It allows you to define which type (source or dist) should be installed, either for all packages or for specific packages.

iandunn commented 2 years ago

thanks!

iandunn commented 2 years ago

I tried that with wporg-main-2022 and it works well for working on wporg-mu-plugins. 👍🏻

One problem on our side, though, is that Core doesn't seem to like it when trying to switch to trunk in wporg-parent-2021. It says the theme is broken because the stylesheet is missing, even though I registered an additional theme directory for the new subdir path. I'm guessing that Core sees that there isn't a stylesheet in the root folder, and doesn't try any farther.

We might be able to work around that with a filter or something, but I haven't tried yet.