-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Nested workspace ignored after upgrading to 1.12.2 from 1.11.3 #7227
Comments
Same issue on our side, we have a package inside a package that is ignored now, the turbo prune command fails on 1.12. We are stuck to 1.11 from now until a package architecture refactor. |
@edgarrroussille Can you update your example so that the |
Sorry about that, just updated the repo :) |
We're looking into this. While nested packages aren't technically supported, we did previously find them and allow scripts to run. I suspect, but haven't confirmed, that caching won't work very well in a nested scenario. @edgarrroussille the team is interested in use cases for nested packages. If you don't mind, can you describe what you are aiming to accomplish with your setup? |
Thank you @gsoltis To be honest if I could avoid it I would. My use case is pretty specific, but maybe others would face similar issues with the serverless/reduced context part: We're using a Backend As A Service (nhost.io) and the issue lays with their "build on push" logic (same as vercel) : as we're in a monorepo, I point nhost to a subdirectory. This subdirectory's structure is constrained, and their build system can't go up (out of the registered subdirectory) to use the whole monorepo as context... (no private packages either) Here's the constrained structure:
We faced a blocker when using their serverless functions (exposed through HTTP endpoints generated based on the contents of ./functions). As we needed to use some core/reusable business logic within these functions. Obviously I got other apps that also need access to this custom business logic code. So we ended up with this structure:
Within our serverless functions code, we'd import what we need using Again, if I had total control over the deployment process I would not use nested workspaces, pruning and --docker flag work just great in all our other apps. |
We've also bumped into this issue, our use case for nested packages is the following: We have an application, but ripped certain packages out that are used by 3rd parties to integrate the application (as an example,
We opted to colocate those packages under the app, as they're only relevant for that specific application. We can move these packages to the top level as well, but liked that we could nest these under the main application. |
Thank you all for the use cases. We're continuing to look at what Turborepo should do in these situations. Can you all verify that |
|
I am using turbo@1.13.0 and it sill has the same issue. Nested workspaces are getting ignored when running tasks. |
@gsoltis at our company, nested workspaces are necessary because of Shopify. |
Verify canary release
Link to code that reproduces this issue
https://github.com/edgarrroussille/turbo-1.12.2-ignored-workspaces/tree/main
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
turbo 1.12.3-canary.0
Describe the Bug
TLDR:
Using nested packages worked with turbo@1.11.3
Using same directory structure with turbo@1.12.0 doesn't work anymore
Consider this directory structure:
with this
pnpm-workspace.yaml
:Running
pnpm turbo build
with turbo@1.11.3 would build apps-bRunnin same command with turbo@1.12.0 and later would not build apps-b
Expected Behavior
Searching through past issues, #942 states that nested directory wasn't actually supposed to be supported... but it worked since we migrated to turborepo (summer '23) and from our point of view it's definitely a regression :(
As this folder structure worked in earlier versions, I'd love a way to keep it working as is...
To Reproduce
cd 1.11.3 && pnpm i && pnpm turbo build
4
cd ../1.12.0 && pnpm i && pnpm turbo build
Additional context
Not an expert, but it's most probably coming from #7025
The text was updated successfully, but these errors were encountered: