-
Notifications
You must be signed in to change notification settings - Fork 189
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
Switch to explicit Turborepo config #2150
base: main
Are you sure you want to change the base?
Conversation
6d214aa
to
7d8ba50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that you are defining a lot of identical test
, lint
and fix
tasks? Maybe you could remove them and move their's inputs
to global ones instead?
This is the exact opposite what this PR tries to achieve. It tries to strictly and explicitly describe each task inputs, outputs, dependencies and persistence to avoid any clashes. Unfortunately, Turborepo doesn't seem to have a concept of default (template) task options. It only has:
So it's easier to just explicitly to define everything in case any of the tasks is going to have an exception to its options. It's also much better to see what's going on at a quick glance, without needing to know how Turborepo works under the hood. It's going to end up in some duplication, but that's not a big deal, IMO. |
I'm not a fan of this change... I think we can override tasks in the future if necessary, so we don't need to specify identical configurations right now. But I do like that you improved and specified some configurations (mainly |
7d8ba50
to
8fba682
Compare
This changes Turborepo config in the workspace root to be explicit. Explicity in this case means that all tasks are defined manually and all inputs are also specified manually. While that might seem redundant, this allows to orchestrate and adjust tasks more carefully - ignoring some files while taking other files into account, only hashing and providing project-specific variables, explicitly reviewing and specifying dependencies. That might come in handy in the future. There's an alternative way to approach this, which is to have every package contain "turbo.json" file, however, for now the flat approach has been chosen as it seems to be the most cleanest and easiest to review.
8fba682
to
ce57dbe
Compare
This changes Turborepo config in the workspace root to be explicit.
Explicity in this case means that all tasks are defined manually and all
inputs are also specified manually.
While that might seem redundant, this allows to orchestrate and adjust
tasks more carefully - ignoring some files while taking other files into
account, only hashing and providing project-specific variables,
explicitly reviewing and specifying dependencies. That might come in
handy in the future.
There's an alternative way to approach this, which is to have every
package contain "turbo.json" file, however, for now the flat approach
has been chosen as it seems to be the most cleanest and easiest to
review.