Review feedback
This commit is contained in:
Родитель
821c163ba3
Коммит
6212c5bc18
|
@ -10,7 +10,6 @@ members = [
|
|||
"components/push",
|
||||
"components/push/ffi",
|
||||
"components/rc_log",
|
||||
"components/support/cli",
|
||||
"components/support/error",
|
||||
"components/support/ffi",
|
||||
"components/support/guid",
|
||||
|
@ -77,7 +76,6 @@ default-members = [
|
|||
"components/push",
|
||||
"components/push/ffi",
|
||||
"components/rc_log",
|
||||
"components/support/cli",
|
||||
"components/support/error",
|
||||
"components/support/ffi",
|
||||
"components/support/guid",
|
||||
|
|
|
@ -16,9 +16,9 @@ In an ideal world, cargo could run your tests as soon as it finished with the
|
|||
dependencies it needs for those tests, instead of waiting for your benchmark
|
||||
suite, or the arg-parser your examples use, or etc.
|
||||
|
||||
Unfortunately, all cargo knows that these are `dev-dependencies`, and not which
|
||||
targets actually use them. (Aside: Now that per-target feature selection is
|
||||
stable we actually could fix this, however it would be extremely tedious, far
|
||||
Unfortunately, all cargo knows is that these are `dev-dependencies`, and not
|
||||
which targets actually use them. (Aside: Now that per-target feature selection
|
||||
is stable we actually could fix this, however it would be extremely tedious, far
|
||||
worse than the approach outlined in this document).
|
||||
|
||||
Additionally, unqualified invocations of cargo (that is, without `-p`) might
|
||||
|
@ -33,7 +33,7 @@ careful about what shape the dependency graph ends up as when example code is
|
|||
taken into consideration (as it is by cargo during certain builds), and as a
|
||||
result, we have this problem. The problem is that this isn't really a problem we
|
||||
want to fix: Example code can and should depend on several different components,
|
||||
and use them together in intersting ways.
|
||||
and use them together in interesting ways.
|
||||
|
||||
So, because we don't really want to change the things our examples do, or make
|
||||
major architectural changes of the non-test code for something like this, we
|
||||
|
@ -43,10 +43,10 @@ need to do something.
|
|||
|
||||
To fix this, we manually insert "cuts" into the dependency graph to help cargo
|
||||
out. That is, we pull some of these build targets (e.g. examples, benchmarks,
|
||||
tests if they cause a substantial compile overhead) into their dedicated crates
|
||||
so that:
|
||||
tests if they cause a substantial compile overhead) into their own dedicated
|
||||
crates so that:
|
||||
|
||||
1. They can be built in parallel with eachother.
|
||||
1. They can be built in parallel with each other.
|
||||
2. Crates depending on the component itself are not waiting on the
|
||||
test/bench/example build in order for their test build to begin.
|
||||
3. A potentially smaller set of our crates need to be rebuilt -- and a smaller
|
|
@ -7,9 +7,9 @@ license = "MPL-2.0"
|
|||
|
||||
[dependencies]
|
||||
anyhow = "1.0"
|
||||
fxa-client = { path = "../../fxa-client" }
|
||||
fxa-client = { path = "../../components/fxa-client" }
|
||||
log = "0.4"
|
||||
sync15 = { path = "../../sync15" }
|
||||
sync15 = { path = "../../components/sync15" }
|
||||
url = "2.1"
|
||||
webbrowser = "0.5"
|
||||
# disable regex feature, as it's very costly for compile time and very rarely
|
|
@ -21,7 +21,7 @@ path = "src/oauth-flow.rs"
|
|||
|
||||
[dev-dependencies]
|
||||
viaduct-reqwest = { path = "../../components/support/viaduct-reqwest" }
|
||||
cli-support = { path = "../../components/support/cli" }
|
||||
cli-support = { path = "../cli-support" }
|
||||
fxa-client = { path = "../../components/fxa-client" }
|
||||
anyhow = "1.0"
|
||||
dialoguer = "0.6"
|
||||
|
|
|
@ -19,7 +19,7 @@ serde_derive = "1"
|
|||
serde_json = "1"
|
||||
log = "0.4"
|
||||
url = "2.1"
|
||||
cli-support = { path = "../../components/support/cli" }
|
||||
cli-support = { path = "../cli-support" }
|
||||
structopt = "0.3"
|
||||
fxa-client = { path = "../../components/fxa-client" }
|
||||
tempdir = "0.3"
|
||||
|
|
|
@ -21,7 +21,7 @@ prettytable-rs = "0.8"
|
|||
fxa-client = { path = "../../components/fxa-client" }
|
||||
chrono = "0.4"
|
||||
clap = "2.33"
|
||||
cli-support = { path = "../../components/support/cli" }
|
||||
cli-support = { path = "../cli-support" }
|
||||
tempdir = "0.3"
|
||||
serde_json = "1.0"
|
||||
|
||||
|
|
|
@ -17,5 +17,5 @@ log = "0.4"
|
|||
anyhow = "1.0"
|
||||
clipboard = "0.5"
|
||||
clap = "2.33"
|
||||
cli-support = { path = "../../components/support/cli" }
|
||||
cli-support = { path = "../cli-support" }
|
||||
viaduct-reqwest = { path = "../../components/support/viaduct-reqwest" }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Separated tests
|
||||
|
||||
These are pulled out for compile-time reasons. See `docs/test-faster.md` for an
|
||||
in-depth explanation and recommended guide for how to add things.
|
||||
These are pulled out for compile-time reasons. See `docs/design/test-faster.md`
|
||||
for an in-depth explanation and recommended guide for how to add things.
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! This test is a stress test meant to trigger some bugs seen prior to the use
|
||||
//! of handlemaps. See ./docs/test-faster.md for why it's split -- TLDR: it uses
|
||||
//! rayon and is hard to rewrite with normal threads.
|
||||
//! of handlemaps. See /docs/design/test-faster.md for why it's split -- TLDR:
|
||||
//! it uses rayon and is hard to rewrite with normal threads.
|
||||
|
||||
use ffi_support::{ConcurrentHandleMap, ExternError};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
|
Загрузка…
Ссылка в новой задаче