You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Uppy we recently introduced turbo. However we ran into race conditions with builds. Turbo is smart enough to first build dependencies of a package before building the package itself, however almost all of our packages depend on the peer dependency @uppy/core.
I could not find a way to guarantee @uppy/core is always build first so I added a turbo.json to every package just to add:
Now it seems that once dependsOn is added that becomes the single source of truth and turbo no longer builds the dependencies first, or so it seems because we have other race conditions now. Below are logs that kind of prove this as we only set @uppy/core in dependsOn while @uppy/rovider-views is in "dependencies".
@uppy/dropbox:build
cache miss, executing b433e035fd3e1293
Error: src/Dropbox.tsx(1[6](https://github.com/transloadit/uppy/actions/runs/16252201232/job/45883390176#step:11:7),31): error TS2306: File '/home/runner/work/uppy/uppy/packages/@uppy/provider-views/lib/index.d.ts' is not a module.
Error: command finished with error: command (/home/runner/work/uppy/uppy/packages/@uppy/dropbox) /tmp/xfs-ba39c088/yarn run build exited (2)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
For Uppy we recently introduced turbo. However we ran into race conditions with builds. Turbo is smart enough to first build dependencies of a package before building the package itself, however almost all of our packages depend on the peer dependency
@uppy/core
.I could not find a way to guarantee
@uppy/core
is always build first so I added aturbo.json
to every package just to add:Now it seems that once
dependsOn
is added that becomes the single source of truth and turbo no longer builds the dependencies first, or so it seems because we have other race conditions now. Below are logs that kind of prove this as we only set@uppy/core
in dependsOn while@uppy/rovider-views
is in"dependencies"
.What is the best way to solve this?
Order of preference:
turbo.json
's and have a way to make sure@uppy/core
is build first while keeping turbo's caching features.dependsOn
should not ignore dependenciesturbo.json
Additional information
No response
Example
https://github.com/transloadit/uppy/blob/main/turbo.json
Beta Was this translation helpful? Give feedback.
All reactions