Skip to content

Commit b5ca8be

Browse files
committed
monorepo tweaks
1 parent 1217490 commit b5ca8be

File tree

8 files changed

+23
-51
lines changed

8 files changed

+23
-51
lines changed

build-scripts/component-common.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,17 @@ ext.configureUniFFIBindgen = { crateName ->
117117
// in moz-central we can use an `Exec` task because we can assume the bindgen tool has already been built.
118118
generateUniffiBindings = tasks.register("generateUniffiBindings", Exec) {
119119
def libraryPath = "${gradle.mozconfig.topobjdir}/dist/bin/libmegazord.so"
120-
def megazordNative = "${gradle.mozconfig.topobjdir}/dist/host/bin/embedded-uniffi-bindgen"
120+
def bindgen = gradle.ext.mozconfig.substs.EMBEDDED_UNIFFI_BINDGEN
121121

122122
workingDir project.rootDir
123-
commandLine "${gradle.mozconfig.topobjdir}/dist/host/bin/embedded-uniffi-bindgen"
123+
commandLine bindgen
124124
args 'generate', '--library', libraryPath, "--crate", crateName, '--language', 'kotlin', '--out-dir', uniffiOutDir.get(), '--no-format'
125125

126126
outputs.dir uniffiOutDir
127-
// Re-generate when the native megazord library is rebuilt
128-
inputs.files megazordNative
127+
// Re-generate when the native megazord library is rebuilt ...
128+
inputs.files libraryPath
129129
// Re-generate if our uniffi-bindgen tooling changes.
130-
inputs.dir "${project.appServicesRootDir}/tools/embedded-uniffi-bindgen/"
130+
inputs.files bindgen
131131
}
132132
} else {
133133
// In app-services we can't use `Exec` because the megazord target isn't built yet, which we force via `doFirst`

components/ads-client/src/http_cache/clock.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
pub trait Clock: Send + Sync + 'static {
26
fn now_epoch_seconds(&self) -> i64;
37
#[cfg(test)]

components/support/nimbus-fml/moz.build

Lines changed: 0 additions & 19 deletions
This file was deleted.

components/viaduct/src/ohttp_client.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
15
use crate::ViaductError;
26
use parking_lot::Mutex;
37
use std::collections::HashMap;

examples/nimbus/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ error-support = { path = "../../components/support/error", features = ["testing"
1010
viaduct-hyper = { path = "../../components/support/viaduct-hyper" }
1111
clap = { version = "4.2", default-features = false, features = ["std", "derive"] }
1212
remote_settings = { path = "../../components/remote_settings" }
13-

tools/embedded-uniffi-bindgen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ license = "MPL-2.0"
1010
name = "embedded-uniffi-bindgen"
1111

1212
[dependencies]
13-
uniffi = { version = "0.29.0", features = ["cli"] }
13+
uniffi = { version = "0.29.0", default-features = false, features = ["cli"] }

tools/embedded-uniffi-bindgen/moz.build

Lines changed: 0 additions & 19 deletions
This file was deleted.

tools/import-app-services-to-central.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ export MOZ_AVOID_JJ_VCS=1
2727
moz-phab patch --apply-to=here --skip-dependencies --no-branch D260481
2828
# Bug 1981871 - Make `./mach rusttests` run some tests via cargo directly,
2929
moz-phab patch --apply-to=here --skip-dependencies --no-branch D260480
30-
# gradle
31-
moz-phab patch --apply-to=here --skip-dependencies --no-branch D245762
3230
# enable `--with-appservices-in-tree` config option by default
3331
moz-phab patch --apply-to=here --skip-dependencies --no-branch D263599
32+
# entire toolchain stack
33+
moz-phab patch --apply-to=here --no-branch D266035
34+
# unstub toolchain - depends on above but not stacked.
35+
moz-phab patch --apply-to=here --skip-dependencies --no-branch D274371
36+
3437
# vet nimbus, rc_crypto, ece, etc
3538
moz-phab patch --apply-to=here --skip-dependencies --no-branch D258722
3639
# lint
@@ -52,7 +55,7 @@ rm -rf gradle
5255
rm proguard-rules-consumer-jna.pro
5356
rm install-nimbus-cli.sh
5457
rm rust-toolchain.toml
55-
rm -rf components/external
58+
rm -rf components/external || true # `components/external` is going away - https://github.com/mozilla/application-services/pull/7103
5659
rm -rf docs/shared
5760
# need a story for these generated deps - bug 1963617
5861
rm DEPENDENCIES.md megazords/full/android/dependency-licenses.xml megazords/full/DEPENDENCIES.md megazords/ios-rust/DEPENDENCIES.md megazords/ios-rust/focus/DEPENDENCIES.md
@@ -215,7 +218,7 @@ cargo update -p gkrust-shared
215218
cargo update -p expect-test --precise 1.4.1
216219
cargo update -p fragile --precise 2.0.0
217220
cargo update -p mockito --precise 0.31.0
218-
cargo update -p predicates --precise 3.0.4
221+
cargo update -p predicates --precise 3.1.3
219222
cargo update -p predicates-core --precise 1.0.6
220223
cargo update -p predicates-tree --precise 1.0.9
221224

@@ -227,8 +230,8 @@ sed -e 's|/dom/webgpu/tests/cts/vendor/target/|/dom/webgpu/tests/cts/vendor/targ
227230
mv .gitignore.tmp .gitignore
228231
# .hgignore needs the same, but with a leading `^` instead of `/`
229232
sed -e 's|\^dom/webgpu/tests/cts/vendor/target/|^dom/webgpu/tests/cts/vendor/target/\
230-
^services/app-services/**/target/\
231-
^services/app-services/**/Cargo.lock|' \
233+
^services/app-services/.*/target/\
234+
^services/app-services/.*/Cargo.lock|' \
232235
.hgignore > .hgignore.tmp
233236
mv .hgignore.tmp .hgignore
234237

0 commit comments

Comments
 (0)