forked from vercel/turborepo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store TaskDefinitions in the Graph by Task ID (vercel#3428)
Moves TaskDefinitions in the `CompleteGraph` struct, so we can look it up during execution. We want to do this here, because _during_ execution, The TaskGraph has already been constructed, so it is too late to change the definition at the point. Although this commit does not try to change any TaskDefinitions, we will implement that for composable configs in the future.
- Loading branch information
Showing
15 changed files
with
475 additions
and
281 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
.turbo | ||
.npmrc |
9 changes: 9 additions & 0 deletions
9
cli/integration_tests/topological_deps/monorepo/apps/my-app/package.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "my-app", | ||
"scripts": { | ||
"build": "echo 'building'" | ||
}, | ||
"dependencies": { | ||
"util": "*" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "monorepo", | ||
"workspaces": [ | ||
"apps/**", | ||
"packages/**" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
cli/integration_tests/topological_deps/monorepo/packages/util/package.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "util", | ||
"scripts": { | ||
"build": "echo 'building'" | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
cli/integration_tests/topological_deps/monorepo/turbo.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://turbo.build/schema.json", | ||
"pipeline": { | ||
"build": { | ||
"dependsOn": ["^build"] | ||
}, | ||
"//#build": { | ||
"dependsOn": [] | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Setup | ||
$ . ${TESTDIR}/../setup.sh | ||
$ . ${TESTDIR}/setup.sh $(pwd) | ||
|
||
Check my-app#build output | ||
$ ${TURBO} run build | ||
\xe2\x80\xa2 Packages in scope: //, my-app, util (esc) | ||
\xe2\x80\xa2 Running build in 3 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
util:build: cache miss, executing 04c404a8edf3d3cb | ||
util:build: | ||
util:build: > build | ||
util:build: > echo 'building' | ||
util:build: | ||
util:build: building | ||
my-app:build: cache miss, executing 4f4f453dc15cbe8c | ||
my-app:build: | ||
my-app:build: > build | ||
my-app:build: > echo 'building' | ||
my-app:build: | ||
my-app:build: building | ||
|
||
Tasks: 2 successful, 2 total | ||
Cached: 0 cached, 2 total | ||
Time:\s*[\.0-9]+m?s (re) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]}) | ||
TARGET_DIR=$1 | ||
cp -a ${SCRIPT_DIR}/monorepo/. ${TARGET_DIR}/ | ||
${SCRIPT_DIR}/../setup_git.sh ${TARGET_DIR} |
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.