Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,3 @@ ifneq ($(SKIP_PUBLISH),--skip-publish)
publish_with_retries "@turbo/types" "$(CLI_DIR)/../turbo-types-$(TURBO_VERSION).tgz"
endif

# use target fixture-<some directory under turborepo-tests/integration/fixtures> to set up the testbed directory
.PHONY=fixture-%
fixture-%:
$(eval $@_FIXTURE := $(@:fixture-%=%))
@echo "fixture setup $($@_FIXTURE)"
rm -rf testbed
mkdir -p testbed
../turborepo-tests/helpers/setup_integration_test.sh ./testbed $($@_FIXTURE)
3 changes: 0 additions & 3 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"private": true,
"version": "1.0.0",
"scripts": {
"clean": "cargo clean --package turbo",
"build": "cargo build --package turbo",
"build:release": "cargo build --package turbo --profile release-turborepo",
"release-native": "turboreleaser --version-path ../version.txt"
},
"dependencies": {
Expand Down
36 changes: 4 additions & 32 deletions cli/turbo.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,11 @@
{
"$schema": "../docs/public/schema.json",
"extends": ["//"],
// Building the turbo binary is handled natively: the `turbo` crate is a
// Turborepo package with its own `build` task (`cargo build
// --package=turbo`) and derived closure hashing. This package only hosts
// release tooling.
"tasks": {
// A task that is used for detecting if any turborepo Rust sources change
"rust-src": {
"env": ["RUNNER_OS"],
"inputs": [
"$TURBO_ROOT$/version.txt",
"$TURBO_ROOT$/crates/**/*.rs",
// Rust crates
"$TURBO_ROOT$/crates/*/Cargo.toml",
"$TURBO_ROOT$/Cargo.toml",
"$TURBO_ROOT$/Cargo.lock",
"!$TURBO_ROOT$/crates/**/target"
]
},
"build": {
"outputs": [
"$TURBO_ROOT$/target/debug/turbo",
"$TURBO_ROOT$/target/debug/turbo.exe",
"$TURBO_ROOT$/target/release/turbo",
"$TURBO_ROOT$/target/release/turbo.exe"
],
"dependsOn": ["rust-src"],
"passThroughEnv": [
"ProgramData",
// sccache related flags
"SCCACHE_BUCKET",
"SCCACHE_REGION",
"RUSTC_WRAPPER",
"CARGO_INCREMENTAL",
"AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY"
]
},
"release-native": {
"dependsOn": ["@turbo/releaser#build"],
"cache": false
Expand Down
4 changes: 0 additions & 4 deletions crates/turborepo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ serde_json = { workspace = true }
tempfile = { workspace = true }
which = { workspace = true }

[[bin]]
name = "echo_args"
path = "../../turborepo-tests/helpers/echo_args.rs"

[lints]
workspace = true

Expand Down
4 changes: 4 additions & 0 deletions lockfile-tests/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"extends": ["//"],
"tasks": {
"check-lockfiles": {
// The harness runs the turbo binary from target/; depending on the
// crate's build task guarantees it exists and re-runs this check
// whenever the binary's transitive Rust sources change.
"dependsOn": ["turbo#build"],
"passThroughEnv": ["VERCEL_TOKEN"]
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"build": "turbo run build",
"build:turbo": "pnpm run --filter=@turbo/cli build",
"build:turbo": "cargo build --package turbo",
"build:ts": "tsc -b tsconfig.project.json",
"lint": "pnpm exec oxlint --deny-warnings .",
"lint:fix": "pnpm exec oxlint --fix .",
Expand Down
10 changes: 8 additions & 2 deletions packages/turbo-repository/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@turbo/cli#rust-src"],
"env": ["NODE_VERSION", "CARGO_BUILD_JOBS", "RUSTFLAGS"],
// The napi crate is a real Turborepo package: depending on its build
// task invalidates this one whenever the crate's transitive Rust
// sources change — a cross-toolchain edge scoped to the crate's
// actual closure rather than a global "any Rust changed" bit.
// CARGO_BUILD_JOBS only affects parallelism, not artifacts, so it no
// longer participates in the hash.
"dependsOn": ["turborepo-napi#build"],
"env": ["NODE_VERSION", "RUSTFLAGS"],
"outputs": ["js/dist/**/*", "native/**/*"]
},
"test": {
Expand Down
13 changes: 13 additions & 0 deletions packages/turbo-types/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
"copy-schema": {
"dependsOn": ["build"],
"outputs": ["$TURBO_ROOT$/packages/turbo/schema.json"]
},
// Both schema tasks shell out to the turborepo-schema-gen crate;
// depending on its build task guarantees the binary exists and re-runs
// them whenever the generator's Rust sources change.
"generate-schema": {
"dependsOn": ["turborepo-schema-gen#build"],
// Writes generated files into the source tree, so it is not a
// cacheable artifact producer.
"cache": false
},
"verify-schema": {
"dependsOn": ["turborepo-schema-gen#build"],
"cache": false
}
}
}
6 changes: 0 additions & 6 deletions pnpm-lock.yaml

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

2 changes: 0 additions & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ packages:
- cli
- docs/*
- packages/*
- turborepo-tests/*
- "!packages/turbo"
- crates/*/js
- examples
- "!examples/non-monorepo"
- lockfile-tests
Expand Down
11 changes: 11 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"$schema": "https://turborepo.dev/schema.json",
"ui": "tui",
"noUpdateNotifier": true,
// Dogfood native Cargo support: every crate in this workspace is a
// Turborepo package. Requires a turbo that knows this key (>= 2.10.4
// canaries); older binaries hard-error on unknown future flags — update
// your global turbo if the pre-push hook fails here.
Comment thread
anthonyshew marked this conversation as resolved.
Resolved
"futureFlags": { "experimentalCargoWorkspaces": true },
// The following are used by tools such as pnpm, gh actions to setup pnpm, etc.
"globalPassThroughEnv": [
"Path",
Expand Down Expand Up @@ -76,6 +81,12 @@
"persistent": true,
"env": ["AI_GATEWAY_API_KEY"]
},
// turborepo-lib embeds version.txt via include_str!; it lives outside
// every crate directory, so the automatic crate-closure hashing can't
// see it. $TURBO_DEFAULT$ keeps the automatic inputs and appends it.
"turbo#build": {
"inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/version.txt"]
},
"package-checks": {
"dependsOn": ["package:types"]
},
Expand Down
9 changes: 0 additions & 9 deletions turborepo-tests/helpers/package.json

This file was deleted.

11 changes: 0 additions & 11 deletions turborepo-tests/helpers/turbo.json

This file was deleted.

14 changes: 0 additions & 14 deletions turborepo-tests/integration/turbo.json

This file was deleted.

Loading