Closed jchavarri closed 1 year ago
Would this happen even if it's not in a monorepo?
👍 This would be absolutely great to have!
Our use case is a yarn workspaces monorepo with the following packages:
with both A and B depending on C.
Currently, when running bsb -w
in A or B, changes in C are not picked up.
Any plans on this @bobzhang?
I've also noticed that if you are building multiple apps that are sharing same symlinked package bs will warn about package name duplicates and that first one was picked.
Another issue is parallel builds with shared packages. They are not possible because of race conditions, we are using concurrency 1 everywhere.
Sorry for bumping this again, but this is very very annoying with mono repo setups :/ will this issue be prioritised at some point?
Note @Coobaha raised several separate issues, watching dependent packages and shared packages
@bobzhang Would you like me to provide an example repo with a monorepo setup as described above?
Very naive implementation https://github.com/BuckleScript/bucklescript/pull/4047 should add symlinks to watch list
Adding to the request queue. monorepos have a lot of benefits for modern web development. Any kind of guidance would be appreciated, I'm happy to pitch in but no idea why this doesn't work. @bobzhang any clue as to when this will be fixed?
Looks like it works on bs 8. @jchavarri maybe close?
@BlueHotDog Do you have a working sample repo, by any chance?
Actually, on second check, it still doesnt work :(((( but, it does behave a bit better.
Also this: Trying to run yarn in a yarn workspace monorepo getting crypting errors. Please Please Please - how can we make monorepo usable?
Error: https://gist.github.com/BlueHotDog/e70733c751e69a802570e08f3bf773cb
Thanks.
isnt this closed/fixed by pinned-deps thingie?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
😞
If this does not get reopened, I still want to reference https://github.com/rescript-lang/rescript-compiler/issues/6248 here so that it does not get forgotten.
In Yarn workspaces, shared deps are "hoisted" to a parent folder. Workspaces are symlinked like.
Let's say I am working in a monorepo with two Yarn workspaces,
package-1
andpackage-2
, each one with their ownbsconfig.json
(image source):If
package-1
depends onpackage-2
there is no way at the moment (that I know of) to runbsb -w
frompackage-1
folder, and have the compiler pick up the changes onpackage-2
.I was thinking if the watcher could somehow detect if the folder in
node_modules
is a symlink, and in that case watch for changes in it as well?