diff --git a/build-scripts/component-common.gradle b/build-scripts/component-common.gradle index f4b1f5a78b..2d1266d18e 100644 --- a/build-scripts/component-common.gradle +++ b/build-scripts/component-common.gradle @@ -117,17 +117,17 @@ ext.configureUniFFIBindgen = { crateName -> // in moz-central we can use an `Exec` task because we can assume the bindgen tool has already been built. generateUniffiBindings = tasks.register("generateUniffiBindings", Exec) { def libraryPath = "${gradle.mozconfig.topobjdir}/dist/bin/libmegazord.so" - def megazordNative = "${gradle.mozconfig.topobjdir}/dist/host/bin/embedded-uniffi-bindgen" + def bindgen = gradle.ext.mozconfig.substs.EMBEDDED_UNIFFI_BINDGEN workingDir project.rootDir - commandLine "${gradle.mozconfig.topobjdir}/dist/host/bin/embedded-uniffi-bindgen" + commandLine bindgen args 'generate', '--library', libraryPath, "--crate", crateName, '--language', 'kotlin', '--out-dir', uniffiOutDir.get(), '--no-format' outputs.dir uniffiOutDir - // Re-generate when the native megazord library is rebuilt - inputs.files megazordNative + // Re-generate when the native megazord library is rebuilt ... + inputs.files libraryPath // Re-generate if our uniffi-bindgen tooling changes. - inputs.dir "${project.appServicesRootDir}/tools/embedded-uniffi-bindgen/" + inputs.files bindgen } } else { // In app-services we can't use `Exec` because the megazord target isn't built yet, which we force via `doFirst` diff --git a/components/ads-client/src/http_cache/clock.rs b/components/ads-client/src/http_cache/clock.rs index 81789b66eb..778a5ce7c9 100644 --- a/components/ads-client/src/http_cache/clock.rs +++ b/components/ads-client/src/http_cache/clock.rs @@ -1,3 +1,7 @@ +/* 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/. */ + pub trait Clock: Send + Sync + 'static { fn now_epoch_seconds(&self) -> i64; #[cfg(test)] diff --git a/components/support/nimbus-fml/moz.build b/components/support/nimbus-fml/moz.build deleted file mode 100644 index 996c19acdf..0000000000 --- a/components/support/nimbus-fml/moz.build +++ /dev/null @@ -1,19 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -HOST_RUST_PROGRAMS = ["nimbus-fml"] - -# copy-pasta from other moz.build file. -if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": - OS_LIBS += ["-framework CoreFoundation"] -elif CONFIG["OS_TARGET"] == "WINNT": - OS_LIBS += [ - "advapi32", - "wsock32", - "ws2_32", - "mswsock", - "winmm", - ] diff --git a/components/viaduct/src/ohttp_client.rs b/components/viaduct/src/ohttp_client.rs index 68369d6b64..6cdf6a5e8c 100644 --- a/components/viaduct/src/ohttp_client.rs +++ b/components/viaduct/src/ohttp_client.rs @@ -1,3 +1,7 @@ +/* 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/. */ + use crate::ViaductError; use parking_lot::Mutex; use std::collections::HashMap; diff --git a/examples/nimbus/Cargo.toml b/examples/nimbus/Cargo.toml index fde413c2f0..2da7290097 100644 --- a/examples/nimbus/Cargo.toml +++ b/examples/nimbus/Cargo.toml @@ -10,4 +10,3 @@ error-support = { path = "../../components/support/error", features = ["testing" viaduct-hyper = { path = "../../components/support/viaduct-hyper" } clap = { version = "4.2", default-features = false, features = ["std", "derive"] } remote_settings = { path = "../../components/remote_settings" } - diff --git a/tools/embedded-uniffi-bindgen/Cargo.toml b/tools/embedded-uniffi-bindgen/Cargo.toml index 68a0c9bbea..f5a3138409 100644 --- a/tools/embedded-uniffi-bindgen/Cargo.toml +++ b/tools/embedded-uniffi-bindgen/Cargo.toml @@ -10,4 +10,4 @@ license = "MPL-2.0" name = "embedded-uniffi-bindgen" [dependencies] -uniffi = { version = "0.29.0", features = ["cli"] } +uniffi = { version = "0.29.0", default-features = false, features = ["cli"] } diff --git a/tools/embedded-uniffi-bindgen/moz.build b/tools/embedded-uniffi-bindgen/moz.build deleted file mode 100644 index 24201609d9..0000000000 --- a/tools/embedded-uniffi-bindgen/moz.build +++ /dev/null @@ -1,19 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -HOST_RUST_PROGRAMS = ["embedded-uniffi-bindgen"] - -# copy-pasta from other moz.build file. -if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": - OS_LIBS += ["-framework CoreFoundation"] -elif CONFIG["OS_TARGET"] == "WINNT": - OS_LIBS += [ - "advapi32", - "wsock32", - "ws2_32", - "mswsock", - "winmm", - ] diff --git a/tools/import-app-services-to-central.sh b/tools/import-app-services-to-central.sh index ec5a6bedcb..aaf9d60716 100755 --- a/tools/import-app-services-to-central.sh +++ b/tools/import-app-services-to-central.sh @@ -27,10 +27,13 @@ export MOZ_AVOID_JJ_VCS=1 moz-phab patch --apply-to=here --skip-dependencies --no-branch D260481 # Bug 1981871 - Make `./mach rusttests` run some tests via cargo directly, moz-phab patch --apply-to=here --skip-dependencies --no-branch D260480 -# gradle -moz-phab patch --apply-to=here --skip-dependencies --no-branch D245762 # enable `--with-appservices-in-tree` config option by default moz-phab patch --apply-to=here --skip-dependencies --no-branch D263599 +# entire toolchain stack +moz-phab patch --apply-to=here --no-branch D266035 +# unstub toolchain - depends on above but not stacked. +moz-phab patch --apply-to=here --skip-dependencies --no-branch D274371 + # vet nimbus, rc_crypto, ece, etc moz-phab patch --apply-to=here --skip-dependencies --no-branch D258722 # lint @@ -52,7 +55,7 @@ rm -rf gradle rm proguard-rules-consumer-jna.pro rm install-nimbus-cli.sh rm rust-toolchain.toml -rm -rf components/external +rm -rf components/external || true # `components/external` is going away - https://github.com/mozilla/application-services/pull/7103 rm -rf docs/shared # need a story for these generated deps - bug 1963617 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 cargo update -p expect-test --precise 1.4.1 cargo update -p fragile --precise 2.0.0 cargo update -p mockito --precise 0.31.0 -cargo update -p predicates --precise 3.0.4 +cargo update -p predicates --precise 3.1.3 cargo update -p predicates-core --precise 1.0.6 cargo update -p predicates-tree --precise 1.0.9 @@ -227,8 +230,8 @@ sed -e 's|/dom/webgpu/tests/cts/vendor/target/|/dom/webgpu/tests/cts/vendor/targ mv .gitignore.tmp .gitignore # .hgignore needs the same, but with a leading `^` instead of `/` sed -e 's|\^dom/webgpu/tests/cts/vendor/target/|^dom/webgpu/tests/cts/vendor/target/\ -^services/app-services/**/target/\ -^services/app-services/**/Cargo.lock|' \ +^services/app-services/.*/target/\ +^services/app-services/.*/Cargo.lock|' \ .hgignore > .hgignore.tmp mv .hgignore.tmp .hgignore