From d9a442163420f8bd4c3b4c6c87b426fe04a89764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?joseLu=C3=ADs?= Date: Mon, 12 Feb 2024 12:38:19 +0100 Subject: [PATCH] make each project a workspace This fixes the error "current package believes it's in a workspace", if the repository was cloned inside the directory structure of another workspace, as explained in cargo issue 5418. It doesn't affect anything else and will make the projects compile more reliably under those special conditions. --- ch01/a-assembly-dereference/Cargo.toml | 1 + ch02/a-os-threads/Cargo.toml | 1 + ch03/a-raw-syscall/Cargo.toml | 1 + ch03/b-normal-syscall/Cargo.toml | 1 + ch04/a-epoll/Cargo.toml | 1 + ch04/b-epoll-mio/Cargo.toml | 1 + ch05/a-stack-swap/Cargo.toml | 1 + ch05/b-show-stack/Cargo.toml | 1 + ch05/c-fibers/Cargo.toml | 1 + ch05/d-fibers-closure/Cargo.toml | 1 + ch05/e-fibers-windows/Cargo.toml | 1 + ch07/a-coroutine-bonus/Cargo.toml | 1 + ch07/a-coroutine/Cargo.toml | 1 + ch07/b-async-await/Cargo.toml | 1 + ch07/c-async-await/Cargo.toml | 1 + ch07/corofy/Cargo.toml | 1 + ch08/a-runtime/Cargo.toml | 1 + ch08/b-reactor-executor/Cargo.toml | 1 + ch08/c-reactor-executor/Cargo.toml | 1 + ch08/d-multiple-threads/Cargo.toml | 1 + ch09/a-coroutines-variables/Cargo.toml | 1 + ch09/b-coroutines-references/Cargo.toml | 1 + ch09/c-coroutines-problem/Cargo.toml | 1 + ch09/d-pin/Cargo.toml | 1 + ch09/e-coroutines-pin/Cargo.toml | 1 + ch10/a-rust-futures-bonus/Cargo.toml | 1 + ch10/a-rust-futures/Cargo.toml | 1 + ch10/b-rust-futures-experiments/Cargo.toml | 1 + ch10/parker-bonus/Cargo.toml | 1 + delayserver/Cargo.toml | 1 + 30 files changed, 30 insertions(+) diff --git a/ch01/a-assembly-dereference/Cargo.toml b/ch01/a-assembly-dereference/Cargo.toml index fee32a9..ab86940 100644 --- a/ch01/a-assembly-dereference/Cargo.toml +++ b/ch01/a-assembly-dereference/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "ac-assembly-dereference" version = "0.1.0" diff --git a/ch02/a-os-threads/Cargo.toml b/ch02/a-os-threads/Cargo.toml index 3fdebbf..66c9210 100644 --- a/ch02/a-os-threads/Cargo.toml +++ b/ch02/a-os-threads/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "a-os-threads" version = "0.1.0" diff --git a/ch03/a-raw-syscall/Cargo.toml b/ch03/a-raw-syscall/Cargo.toml index 3695600..005c250 100644 --- a/ch03/a-raw-syscall/Cargo.toml +++ b/ch03/a-raw-syscall/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "a-raw-syscall" version = "0.1.0" diff --git a/ch03/b-normal-syscall/Cargo.toml b/ch03/b-normal-syscall/Cargo.toml index 1801009..b2d949f 100644 --- a/ch03/b-normal-syscall/Cargo.toml +++ b/ch03/b-normal-syscall/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "b-normal-syscall" version = "0.1.0" diff --git a/ch04/a-epoll/Cargo.toml b/ch04/a-epoll/Cargo.toml index bdeae29..4b709ae 100644 --- a/ch04/a-epoll/Cargo.toml +++ b/ch04/a-epoll/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "a-epoll" version = "0.1.0" diff --git a/ch04/b-epoll-mio/Cargo.toml b/ch04/b-epoll-mio/Cargo.toml index b07ff74..9afa428 100644 --- a/ch04/b-epoll-mio/Cargo.toml +++ b/ch04/b-epoll-mio/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "b-epoll-mio" version = "0.1.0" diff --git a/ch05/a-stack-swap/Cargo.toml b/ch05/a-stack-swap/Cargo.toml index 20f7b2f..df6e1ed 100644 --- a/ch05/a-stack-swap/Cargo.toml +++ b/ch05/a-stack-swap/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "a-stack-swap" version = "0.1.0" diff --git a/ch05/b-show-stack/Cargo.toml b/ch05/b-show-stack/Cargo.toml index 09ccf93..a847612 100644 --- a/ch05/b-show-stack/Cargo.toml +++ b/ch05/b-show-stack/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "b-show-stack" version = "0.1.0" diff --git a/ch05/c-fibers/Cargo.toml b/ch05/c-fibers/Cargo.toml index 7f6923e..100cff7 100644 --- a/ch05/c-fibers/Cargo.toml +++ b/ch05/c-fibers/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "c-fibers" version = "0.1.0" diff --git a/ch05/d-fibers-closure/Cargo.toml b/ch05/d-fibers-closure/Cargo.toml index 5f7e4f8..2b5e55b 100644 --- a/ch05/d-fibers-closure/Cargo.toml +++ b/ch05/d-fibers-closure/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "d-fibers-closure" version = "0.1.0" diff --git a/ch05/e-fibers-windows/Cargo.toml b/ch05/e-fibers-windows/Cargo.toml index 72094d5..02acfd0 100644 --- a/ch05/e-fibers-windows/Cargo.toml +++ b/ch05/e-fibers-windows/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "e-fibers-windows" version = "0.1.0" diff --git a/ch07/a-coroutine-bonus/Cargo.toml b/ch07/a-coroutine-bonus/Cargo.toml index a964683..c2dc5c1 100644 --- a/ch07/a-coroutine-bonus/Cargo.toml +++ b/ch07/a-coroutine-bonus/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "a-coroutine-bonus" version = "0.1.0" diff --git a/ch07/a-coroutine/Cargo.toml b/ch07/a-coroutine/Cargo.toml index a947386..2403898 100644 --- a/ch07/a-coroutine/Cargo.toml +++ b/ch07/a-coroutine/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "a-coroutine" version = "0.1.0" diff --git a/ch07/b-async-await/Cargo.toml b/ch07/b-async-await/Cargo.toml index 0480a79..0c807ba 100644 --- a/ch07/b-async-await/Cargo.toml +++ b/ch07/b-async-await/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "b-async-await" version = "0.1.0" diff --git a/ch07/c-async-await/Cargo.toml b/ch07/c-async-await/Cargo.toml index 5a0c10f..08fef4d 100644 --- a/ch07/c-async-await/Cargo.toml +++ b/ch07/c-async-await/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "c-async-await" version = "0.1.0" diff --git a/ch07/corofy/Cargo.toml b/ch07/corofy/Cargo.toml index 11dfd14..7ddab44 100644 --- a/ch07/corofy/Cargo.toml +++ b/ch07/corofy/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "corofy" version = "0.1.0" diff --git a/ch08/a-runtime/Cargo.toml b/ch08/a-runtime/Cargo.toml index c2593cc..cb85780 100644 --- a/ch08/a-runtime/Cargo.toml +++ b/ch08/a-runtime/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "a-runtime" version = "0.1.0" diff --git a/ch08/b-reactor-executor/Cargo.toml b/ch08/b-reactor-executor/Cargo.toml index 884ca12..174a899 100644 --- a/ch08/b-reactor-executor/Cargo.toml +++ b/ch08/b-reactor-executor/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "b-reactor-executor" version = "0.1.0" diff --git a/ch08/c-reactor-executor/Cargo.toml b/ch08/c-reactor-executor/Cargo.toml index 8fd2aa9..0b0a047 100644 --- a/ch08/c-reactor-executor/Cargo.toml +++ b/ch08/c-reactor-executor/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "c-reactor-executor" version = "0.1.0" diff --git a/ch08/d-multiple-threads/Cargo.toml b/ch08/d-multiple-threads/Cargo.toml index 6aceac0..5afc963 100644 --- a/ch08/d-multiple-threads/Cargo.toml +++ b/ch08/d-multiple-threads/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "d-multiple-threads" version = "0.1.0" diff --git a/ch09/a-coroutines-variables/Cargo.toml b/ch09/a-coroutines-variables/Cargo.toml index f29c515..eae5352 100644 --- a/ch09/a-coroutines-variables/Cargo.toml +++ b/ch09/a-coroutines-variables/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "a-coroutines-variables" version = "0.1.0" diff --git a/ch09/b-coroutines-references/Cargo.toml b/ch09/b-coroutines-references/Cargo.toml index bb9c0e5..db46068 100644 --- a/ch09/b-coroutines-references/Cargo.toml +++ b/ch09/b-coroutines-references/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "b-coroutines-references" version = "0.1.0" diff --git a/ch09/c-coroutines-problem/Cargo.toml b/ch09/c-coroutines-problem/Cargo.toml index 9eb736e..c43b087 100644 --- a/ch09/c-coroutines-problem/Cargo.toml +++ b/ch09/c-coroutines-problem/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "c-coroutines-problem" version = "0.1.0" diff --git a/ch09/d-pin/Cargo.toml b/ch09/d-pin/Cargo.toml index 62b94ba..042e916 100644 --- a/ch09/d-pin/Cargo.toml +++ b/ch09/d-pin/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "d-pin" version = "0.1.0" diff --git a/ch09/e-coroutines-pin/Cargo.toml b/ch09/e-coroutines-pin/Cargo.toml index 4bcd5bb..1a5c2c6 100644 --- a/ch09/e-coroutines-pin/Cargo.toml +++ b/ch09/e-coroutines-pin/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "e-coroutines-pin" version = "0.1.0" diff --git a/ch10/a-rust-futures-bonus/Cargo.toml b/ch10/a-rust-futures-bonus/Cargo.toml index 9bebbe8..82e5eaa 100644 --- a/ch10/a-rust-futures-bonus/Cargo.toml +++ b/ch10/a-rust-futures-bonus/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "b-rust-futures-bonus" version = "0.1.0" diff --git a/ch10/a-rust-futures/Cargo.toml b/ch10/a-rust-futures/Cargo.toml index 7db83c0..b3ef86c 100644 --- a/ch10/a-rust-futures/Cargo.toml +++ b/ch10/a-rust-futures/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "a-rust-futures" version = "0.1.0" diff --git a/ch10/b-rust-futures-experiments/Cargo.toml b/ch10/b-rust-futures-experiments/Cargo.toml index 2aec260..e94f40c 100644 --- a/ch10/b-rust-futures-experiments/Cargo.toml +++ b/ch10/b-rust-futures-experiments/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "b-rust-futures-experiments" version = "0.1.0" diff --git a/ch10/parker-bonus/Cargo.toml b/ch10/parker-bonus/Cargo.toml index ce1abb7..d029203 100644 --- a/ch10/parker-bonus/Cargo.toml +++ b/ch10/parker-bonus/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "parker-bonus" version = "0.1.0" diff --git a/delayserver/Cargo.toml b/delayserver/Cargo.toml index 2a7bb17..bff8607 100644 --- a/delayserver/Cargo.toml +++ b/delayserver/Cargo.toml @@ -1,3 +1,4 @@ +[workspace] [package] name = "delayserver" version = "0.1.0"