Skip to content

Commit

Permalink
Merge branch 'main' into chrisolszewski/turbo-537-improve-changed-wor…
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-olszewski authored Jan 20, 2023
2 parents fadb510 + a96e7e9 commit a00f42c
Show file tree
Hide file tree
Showing 333 changed files with 8,281 additions and 1,230 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ graph*.html

# generated by cargo xtask publish
packages/node-module-trace/npm
packages/turbo-codemod/__tests__/test-runtime
artifacts
.turbo
.vercel
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ pnpm-lock.yaml
__generated__/
/docs/public/schema.json
/packages/eslint-plugin-turbo/__tests__/fixtures/
/packages/turbo-codemod/templates/
/docs/components/pages/pack-home/benchmark-data/data.json
/examples/with-svelte


# crates
crates/next-core/js/src/compiled
crates/turbopack-node/js/src/compiled
Expand Down
57 changes: 50 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ members = [
"crates/next-core",
"crates/next-dev",
"crates/next-transform-dynamic",
"crates/next-dev-tests",
"crates/next-transform-strip-page-exports",
"crates/node-file-trace",
"crates/swc-ast-explorer",
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/turbo/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

const turboVersion = "1.7.1-canary.1"
const turboVersion = "1.7.1-canary.2"
103 changes: 103 additions & 0 deletions cli/integration_tests/basic_monorepo/dry_run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
Setup
$ . ${TESTDIR}/../setup.sh
$ . ${TESTDIR}/setup.sh $(pwd)

Check my-app#build output
$ ${TURBO} run build --dry | grep "Packages in Scope" -A 4
Packages in Scope
Name Path
my-app apps/my-app
util packages/util

$ ${TURBO} run build --dry | grep "my-app#build" -A 12
my-app#build
Task = build
Package = my-app
Hash = 7438505b97329a3d
Cached (Local) = false
Cached (Remote) = false
Directory = apps/my-app
Command = echo 'building'
Outputs = apple.json, banana.txt
Log File = apps/my-app/.turbo/turbo-build.log
Dependencies =
Dependendents =
ResolvedTaskDefinition = {"outputs":["apple.json","banana.txt"],"cache":true,"dependsOn":[],"inputs":[],"outputMode":0,"env":[],"persistent":false}
$ ${TURBO} run build --dry | grep "util#build" -A 12
util#build
Task = build
Package = util
Hash = 6dec18f9f767112f
Cached (Local) = false
Cached (Remote) = false
Directory = packages/util
Command = echo 'building'
Outputs =
Log File = packages/util/.turbo/turbo-build.log
Dependencies =
Dependendents =
ResolvedTaskDefinition = {"outputs":[],"cache":true,"dependsOn":[],"inputs":[],"outputMode":0,"env":[],"persistent":false}

# Validate output of my-app#build task
$ ${TURBO} run build --dry=json | jq '.tasks | map(select(.taskId == "my-app#build")) | .[0]'
{
"taskId": "my-app#build",
"task": "build",
"package": "my-app",
"hash": "7438505b97329a3d",
"cacheState": {
"local": false,
"remote": false
},
"command": "echo 'building'",
"outputs": [
"apple.json",
"banana.txt"
],
"excludedOutputs": null,
"logFile": "apps/my-app/.turbo/turbo-build.log",
"directory": "apps/my-app",
"dependencies": [],
"dependents": [],
"resolvedTaskDefinition": {
"outputs": [
"apple.json",
"banana.txt"
],
"cache": true,
"dependsOn": [],
"inputs": [],
"outputMode": 0,
"env": [],
"persistent": false
}
}

# Validate output of util#build task
$ ${TURBO} run build --dry=json | jq '.tasks | map(select(.taskId == "util#build")) | .[0]'
{
"taskId": "util#build",
"task": "build",
"package": "util",
"hash": "6dec18f9f767112f",
"cacheState": {
"local": false,
"remote": false
},
"command": "echo 'building'",
"outputs": null,
"excludedOutputs": null,
"logFile": "packages/util/.turbo/turbo-build.log",
"directory": "packages/util",
"dependencies": [],
"dependents": [],
"resolvedTaskDefinition": {
"outputs": [],
"cache": true,
"dependsOn": [],
"inputs": [],
"outputMode": 0,
"env": [],
"persistent": false
}
}
4 changes: 4 additions & 0 deletions cli/integration_tests/basic_monorepo/monorepo/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"pipeline": {
"build": {
"outputs": []
},

"my-app#build": {
"outputs": ["banana.txt", "apple.json"]
}
}
}
16 changes: 8 additions & 8 deletions cli/integration_tests/basic_monorepo/verbosity.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Verbosity level 1
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache bypass, force executing 238262ce1218fd3a
util:build: cache bypass, force executing 6dec18f9f767112f
util:build:
util:build: > build
util:build: > echo 'building'
Expand All @@ -24,7 +24,7 @@ Verbosity level 1
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache bypass, force executing 238262ce1218fd3a
util:build: cache bypass, force executing 6dec18f9f767112f
util:build:
util:build: > build
util:build: > echo 'building'
Expand All @@ -42,15 +42,15 @@ Verbosity level 2
[-0-9:.TWZ+]+ \[DEBUG] turborepo_lib::shim: Running command as global turbo (re)
[-0-9:.TWZ+]+ \[INFO] turbo: skipping turbod since we appear to be in a non-interactive context (re)
[-0-9:.TWZ+]+ \[DEBUG] turbo: global hash env vars: vars=\["VERCEL_ANALYTICS_ID"] (re)
[-0-9:.TWZ+]+ \[DEBUG] turbo: global hash: value=c1fb8f74a026cdb8 (re)
[-0-9:.TWZ+]+ \[DEBUG] turbo: global hash: value=430b3790556340cb (re)
[-0-9:.TWZ+]+ |[DEBUG] turbo: local cache folder: path="" (re)
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
[-0-9:.TWZ+]+ \[DEBUG] turbo.: start (re)
[-0-9:.TWZ+]+ \[DEBUG] turbo: task hash env vars for util:build: vars=\[] (re)
[-0-9:.TWZ+]+ \[DEBUG] turbo: task hash: value=238262ce1218fd3a (re)
util:build: cache bypass, force executing 238262ce1218fd3a
[-0-9:.TWZ+]+ \[DEBUG] turbo: task hash: value=6dec18f9f767112f (re)
util:build: cache bypass, force executing 6dec18f9f767112f
util:build:
util:build: > build
util:build: > echo 'building'
Expand All @@ -68,15 +68,15 @@ Verbosity level 2
[-0-9:.TWZ+]+ \[DEBUG] turborepo_lib::shim: Running command as global turbo (re)
[-0-9:.TWZ+]+ \[INFO] turbo: skipping turbod since we appear to be in a non-interactive context (re)
[-0-9:.TWZ+]+ \[DEBUG] turbo: global hash env vars: vars=\["VERCEL_ANALYTICS_ID"] (re)
[-0-9:.TWZ+]+ \[DEBUG] turbo: global hash: value=c1fb8f74a026cdb8 (re)
[-0-9:.TWZ+]+ \[DEBUG] turbo: global hash: value=430b3790556340cb (re)
[-0-9:.TWZ+]+ \[DEBUG] turbo: local cache folder: path="" (re)
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
[-0-9:.TWZ+]+ \[DEBUG] turbo.: start (re)
[-0-9:.TWZ+]+ \[DEBUG] turbo: task hash env vars for util:build: vars=\[] (re)
[-0-9:.TWZ+]+ \[DEBUG] turbo: task hash: value=238262ce1218fd3a (re)
util:build: cache bypass, force executing 238262ce1218fd3a
[-0-9:.TWZ+]+ \[DEBUG] turbo: task hash: value=6dec18f9f767112f (re)
util:build: cache bypass, force executing 6dec18f9f767112f
util:build:
util:build: > build
util:build: > echo 'building'
Expand Down
32 changes: 22 additions & 10 deletions cli/integration_tests/single_package/dry-run.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ Check

Tasks to Run
build
Task = build
Hash = 7bf32e1dedb04a5d
Cached (Local) = false
Cached (Remote) = false
Command = echo 'building' > foo
Outputs = foo
Log File = .turbo/turbo-build.log
Dependencies =
Dependendents =
Task = build
Hash = 7bf32e1dedb04a5d
Cached (Local) = false
Cached (Remote) = false
Command = echo 'building' > foo
Outputs = foo
Log File = .turbo/turbo-build.log
Dependencies =
Dependendents =
ResolvedTaskDefinition = {"outputs":["foo"],"cache":true,"dependsOn":[],"inputs":[],"outputMode":0,"env":[],"persistent":false}

$ ${TURBO} run build --dry=json --single-package
{
Expand All @@ -34,7 +35,18 @@ Check
"excludedOutputs": null,
"logFile": ".turbo/turbo-build.log",
"dependencies": [],
"dependents": []
"dependents": [],
"resolvedTaskDefinition": {
"outputs": [
"foo"
],
"cache": true,
"dependsOn": [],
"inputs": [],
"outputMode": 0,
"env": [],
"persistent": false
}
}
]
}
Loading

0 comments on commit a00f42c

Please sign in to comment.