Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Make bsb watcher to also watch symlinks in node_modules #3521

Closed
jchavarri opened this issue Apr 18, 2019 · 17 comments
Closed

[Feature] Make bsb watcher to also watch symlinks in node_modules #3521

jchavarri opened this issue Apr 18, 2019 · 17 comments
Labels
enhancement stale Old issues that went stale

Comments

@jchavarri
Copy link
Contributor

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 and package-2, each one with their own bsconfig.json (image source):

image

If package-1 depends on package-2 there is no way at the moment (that I know of) to run bsb -w from package-1 folder, and have the compiler pick up the changes on package-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?

@justgage
Copy link

justgage commented May 8, 2019

Would this happen even if it's not in a monorepo?

@cknitt
Copy link
Member

cknitt commented Sep 17, 2019

👍 This would be absolutely great to have!

Our use case is a yarn workspaces monorepo with the following packages:

  • A: Web app (built with reason-react)
  • B: Mobile app (built with reason-react-native)
  • C: Common business logic (one or more packages built in Reason)

with both A and B depending on C.

Currently, when running bsb -w in A or B, changes in C are not picked up.

@Coobaha
Copy link
Contributor

Coobaha commented Oct 3, 2019

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.

@Coobaha
Copy link
Contributor

Coobaha commented Oct 14, 2019

Sorry for bumping this again, but this is very very annoying with mono repo setups :/ will this issue be prioritised at some point?

@bobzhang
Copy link
Member

Note @Coobaha raised several separate issues, watching dependent packages and shared packages

@cknitt
Copy link
Member

cknitt commented Oct 15, 2019

@bobzhang Would you like me to provide an example repo with a monorepo setup as described above?

@Coobaha
Copy link
Contributor

Coobaha commented Dec 15, 2019

Very naive implementation #4047 should add symlinks to watch list

@BlueHotDog
Copy link

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?

@BlueHotDog
Copy link

Looks like it works on bs 8. @jchavarri maybe close?

@fhammerschmidt
Copy link
Member

@BlueHotDog Do you have a working sample repo, by any chance?

@BlueHotDog
Copy link

Actually, on second check, it still doesnt work :(((( but, it does behave a bit better.

@BlueHotDog
Copy link

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.

@BlueHotDog
Copy link

isnt this closed/fixed by pinned-deps thingie?

@Freddy03h
Copy link

Nope #4361 (comment)

@stale
Copy link

stale bot commented May 3, 2023

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.

@stale stale bot added the stale Old issues that went stale label May 3, 2023
@Freddy03h
Copy link

😞

@fhammerschmidt
Copy link
Member

If this does not get reopened, I still want to reference #6248 here so that it does not get forgotten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement stale Old issues that went stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants