-
Notifications
You must be signed in to change notification settings - Fork 132
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
In monorepos, allow running commands from package directories #1237
Comments
I have wished for this before, and we don't have it yet because of UX concerns - I couldn't find a satisfactory answer to "what happens when there's no workspace in the current folder". That is, Spago will need workspace info for all the commands you mentioned (since it has to find the monorepo output folder, the lockfile, possibly resolve a build plan, etc). |
I think having a low max height to search would be reasonable (8?), perhaps with the option to increase it in the package config. If there's no workspace found, throw an informative error. This might not be perfect but I think it would be an improvement on the current UX in these situations. I agree that I wouldn't follow Stack's default project in home folder setup. |
Let's try this out, but keep it at 4 levels of directories (following symlinks), and with no additional configuration - if someone needs more than that we can discuss bumping up the limit, but the priority is to keep the amount of available configuration knobs as low as possible. |
How about Emacs
obviously point 3 is not helpful |
Looking here Lines 183 to 200 in f130b33
Lines 202 to 210 in f130b33
I would be happy to attempt to complete this issue, please assign to me |
@peterbecich thanks! Assigned - and these are good pointers. In there you'd see if there's a workspace in the current directory, and start recursing up if not, instead of calling The issue is a little thorny, since Spago does depend on the |
Please review #1253 |
In a monorepo it would more convenient to allow some commands (
build
,install
,uninstall
,run
,test
,bundle
) to be run from the package, instead of having to run them from the workspace directory with the package flag.As our project is very large, I often work on individual packages as the IDE is slow when working on the whole workspace. It is then a bit cumbersome to have to change directory and add the package flag in order to run any spago commands on the package.
Currently to install a dependency when working in a monorepo the commands look something like this:
ideally I would just like to run:
The text was updated successfully, but these errors were encountered: