-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow for specifying path of root turbo.json (#9087)
### Description Allow for setting the root `turbo.json` path via `--root-turbo-json=path/to/my.json` or `TURBO_ROOT_TURBO_JSON=path/to/my.json`. This option is not compatible with watch mode. Reviewing this PR should be done commit-wise, there's a lot of prefactoring before the final commit that implements the actual feature. Major changes as part of prefactor: - We parse `turbo.json` based on absolute paths instead of repo root relative ones. This allows us to read a `turbo.json` from wherever a user wants - Moved the reading of a trace generated `turbo.json` outside of the primary `turbo.json` reading logic and into `TaskAccess` - Changed ordering of how `config` layering happens instead of ordering them from least to most significant and always choosing a present value, we now go from most to least significant and only choose a value if we do not already have a value for it. This is necessary as we now have a config option (`TURBO_ROOT_TURBO_JSON`) that alters a less significant config source (`turbo.json`). - Move config sources out of `config.rs` - We are now lazy with evaluating our config sources. This allows us to change the path of the `turbo.json` we read after partial evaluation of config sources ### Testing Instructions Existing unit tests for the refactors. Manual testing of the traced config logic. Integration test for new feature. --------- Co-authored-by: Nicholas Yang <[email protected]>
- Loading branch information
1 parent
e3468ce
commit ac57dc7
Showing
19 changed files
with
1,460 additions
and
1,171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.