From 4a7f3bac7cadff129d15e3b0a6471a7ed3c4aaa4 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Tue, 18 Jun 2024 11:22:08 +0200 Subject: [PATCH] Use workspace definitions for all crates and update to the 2021 edition (#32544) --- Cargo.lock | 2 +- Cargo.toml | 7 +++++++ components/allocator/Cargo.toml | 10 +++++----- components/background_hang_monitor/Cargo.toml | 10 +++++----- components/bluetooth/Cargo.toml | 10 +++++----- components/canvas/Cargo.toml | 10 +++++----- components/compositing/Cargo.toml | 10 +++++----- components/config/Cargo.toml | 10 +++++----- components/config_plugins/Cargo.toml | 10 +++++----- components/constellation/Cargo.toml | 10 +++++----- components/deny_public_fields/Cargo.toml | 10 +++++----- components/devtools/Cargo.toml | 10 +++++----- components/dom_struct/Cargo.toml | 10 +++++----- components/domobject_derive/Cargo.toml | 10 +++++----- components/geometry/Cargo.toml | 10 +++++----- components/gfx/Cargo.toml | 11 +++++------ components/hyper_serde/Cargo.toml | 2 +- components/jstraceable_derive/Cargo.toml | 10 +++++----- components/jstraceable_derive/lib.rs | 2 +- components/layout/Cargo.toml | 10 +++++----- components/layout_2020/Cargo.toml | 10 +++++----- components/layout_thread/Cargo.toml | 10 +++++----- components/layout_thread_2020/Cargo.toml | 10 +++++----- components/media/Cargo.toml | 10 +++++----- components/metrics/Cargo.toml | 10 +++++----- components/net/Cargo.toml | 10 +++++----- components/pixels/Cargo.toml | 10 +++++----- components/profile/Cargo.toml | 10 +++++----- components/rand/Cargo.toml | 10 +++++----- components/range/Cargo.toml | 10 +++++----- components/script/Cargo.toml | 11 +++++------ components/script/dom/htmlscriptelement.rs | 6 +++++- components/script/dom/macros.rs | 2 +- components/servo/Cargo.toml | 10 +++++----- components/shared/background_hang_monitor/Cargo.toml | 10 +++++----- components/shared/base/Cargo.toml | 10 +++++----- components/shared/bluetooth/Cargo.toml | 10 +++++----- components/shared/canvas/Cargo.toml | 10 +++++----- components/shared/compositing/Cargo.toml | 10 +++++----- components/shared/devtools/Cargo.toml | 10 +++++----- components/shared/embedder/Cargo.toml | 10 +++++----- components/shared/gfx/Cargo.toml | 10 +++++----- components/shared/net/Cargo.toml | 10 +++++----- components/shared/profile/Cargo.toml | 10 +++++----- components/shared/script/Cargo.toml | 10 +++++----- components/shared/script_layout/Cargo.toml | 10 +++++----- components/shared/webrender/Cargo.toml | 10 +++++----- components/url/Cargo.toml | 10 +++++----- components/webdriver_server/Cargo.toml | 10 +++++----- components/webgpu/Cargo.toml | 10 +++++----- ports/jniapi/Cargo.toml | 10 +++++----- ports/servoshell/Cargo.toml | 11 +++++------ python/tidy/tidy.py | 2 ++ support/crown/Cargo.toml | 9 +++++---- support/rust-task_info/Cargo.toml | 11 +++++------ tests/unit/deny_public_fields/Cargo.toml | 9 +++++---- tests/unit/malloc_size_of/Cargo.toml | 9 +++++---- tests/unit/metrics/Cargo.toml | 9 +++++---- tests/unit/profile/Cargo.toml | 9 +++++---- tests/unit/script/Cargo.toml | 9 +++++---- 60 files changed, 283 insertions(+), 268 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 93d19f6d3683..ac379cfda68d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1113,7 +1113,7 @@ checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crown" -version = "0.1.0" +version = "0.0.1" dependencies = [ "compiletest_rs", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index 04b02dfd27bd..3a6a79632893 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,13 @@ members = [ default-members = ["ports/servoshell"] exclude = [".cargo"] +[workspace.package] +version = "0.0.1" +authors = ["The Servo Project Developers"] +license = "MPL-2.0" +edition = "2021" +publish = false + [workspace.dependencies] accountable-refcell = "0.2.0" app_units = "0.7" diff --git a/components/allocator/Cargo.toml b/components/allocator/Cargo.toml index e5a5bc67457c..3c8ab902dc8d 100644 --- a/components/allocator/Cargo.toml +++ b/components/allocator/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "servo_allocator" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] path = "lib.rs" diff --git a/components/background_hang_monitor/Cargo.toml b/components/background_hang_monitor/Cargo.toml index d126fd3059a8..ce3ca08d3745 100644 --- a/components/background_hang_monitor/Cargo.toml +++ b/components/background_hang_monitor/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "background_hang_monitor" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -publish = false -edition = "2018" +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "background_hang_monitor" diff --git a/components/bluetooth/Cargo.toml b/components/bluetooth/Cargo.toml index 536a29e583fc..863a46f8f1e8 100644 --- a/components/bluetooth/Cargo.toml +++ b/components/bluetooth/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "bluetooth" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "bluetooth" diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index 3a56aba1024f..a0d2e41ffb5b 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "canvas" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "canvas" diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index 3269f61ae02d..c5004e9b26d3 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "compositing" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false build = "build.rs" +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "compositing" diff --git a/components/config/Cargo.toml b/components/config/Cargo.toml index ea92a1d99f8f..223e1e08fba0 100644 --- a/components/config/Cargo.toml +++ b/components/config/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "servo_config" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "servo_config" diff --git a/components/config_plugins/Cargo.toml b/components/config_plugins/Cargo.toml index 79dd5614eef4..cc0bc97a9be9 100644 --- a/components/config_plugins/Cargo.toml +++ b/components/config_plugins/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "servo_config_plugins" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "servo_config_plugins" diff --git a/components/constellation/Cargo.toml b/components/constellation/Cargo.toml index 851d207dfc23..edcf2293844f 100644 --- a/components/constellation/Cargo.toml +++ b/components/constellation/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "constellation" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "constellation" diff --git a/components/deny_public_fields/Cargo.toml b/components/deny_public_fields/Cargo.toml index 96365d752de4..22e7ae8e513e 100644 --- a/components/deny_public_fields/Cargo.toml +++ b/components/deny_public_fields/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "deny_public_fields" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] path = "lib.rs" diff --git a/components/devtools/Cargo.toml b/components/devtools/Cargo.toml index 20aaced297f1..4ed635416ab2 100644 --- a/components/devtools/Cargo.toml +++ b/components/devtools/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "devtools" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "devtools" diff --git a/components/dom_struct/Cargo.toml b/components/dom_struct/Cargo.toml index 38ba2d74d055..1babcae0f45f 100644 --- a/components/dom_struct/Cargo.toml +++ b/components/dom_struct/Cargo.toml @@ -1,10 +1,10 @@ [package] -authors = ["The Servo Project Developers"] -license = "MPL-2.0" name = "dom_struct" -edition = "2018" -publish = false -version = "0.0.1" +edition.workspace = true +version.workspace = true +authors.workspace = true +license.workspace = true +publish.workspace = true [dependencies] quote = { workspace = true } diff --git a/components/domobject_derive/Cargo.toml b/components/domobject_derive/Cargo.toml index 778bb39a17b6..ebac6fb87303 100644 --- a/components/domobject_derive/Cargo.toml +++ b/components/domobject_derive/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "domobject_derive" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +edition.workspace = true +version.workspace = true +authors.workspace = true +license.workspace = true +publish.workspace = true [lib] path = "lib.rs" diff --git a/components/geometry/Cargo.toml b/components/geometry/Cargo.toml index a816b6f52780..be846b39d046 100644 --- a/components/geometry/Cargo.toml +++ b/components/geometry/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "servo_geometry" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "servo_geometry" diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index a10ad8f01244..879fcbb29bee 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -1,11 +1,10 @@ [package] - name = "gfx" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "gfx" diff --git a/components/hyper_serde/Cargo.toml b/components/hyper_serde/Cargo.toml index 566027fc279c..6288066be13f 100644 --- a/components/hyper_serde/Cargo.toml +++ b/components/hyper_serde/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "hyper_serde" version = "0.13.2" -edition = "2018" +edition.workspace = true authors = ["The Servo Project Developers"] description = "Serde support for hyper types." license = "MIT OR Apache-2.0" diff --git a/components/jstraceable_derive/Cargo.toml b/components/jstraceable_derive/Cargo.toml index aebfffac0626..a430aa0dc884 100644 --- a/components/jstraceable_derive/Cargo.toml +++ b/components/jstraceable_derive/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "jstraceable_derive" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +edition.workspace = true +version.workspace = true +authors.workspace = true +license.workspace = true +publish.workspace = true [lib] path = "lib.rs" diff --git a/components/jstraceable_derive/lib.rs b/components/jstraceable_derive/lib.rs index f58ec04ac093..34de9c135746 100644 --- a/components/jstraceable_derive/lib.rs +++ b/components/jstraceable_derive/lib.rs @@ -157,7 +157,7 @@ fn js_traceable_derive(s: synstructure::Structure) -> proc_macro2::TokenStream { } return None; } else if attr.path().is_ident("custom_trace") { - return Some(quote!(::trace(#binding, tracer);)); + return Some(quote!(::trace(#binding, tracer);)); } } Some(quote!(#binding.trace(tracer);)) diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 41eff374fb82..edd0a1a88dc8 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "layout_2013" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "layout_2013" diff --git a/components/layout_2020/Cargo.toml b/components/layout_2020/Cargo.toml index 45283da02576..0ffa3aa3fb0e 100644 --- a/components/layout_2020/Cargo.toml +++ b/components/layout_2020/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "layout_2020" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "layout_2020" diff --git a/components/layout_thread/Cargo.toml b/components/layout_thread/Cargo.toml index a95c7f9b8aa7..61cd1c2fb141 100644 --- a/components/layout_thread/Cargo.toml +++ b/components/layout_thread/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "layout_thread_2013" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "layout_thread_2013" diff --git a/components/layout_thread_2020/Cargo.toml b/components/layout_thread_2020/Cargo.toml index 6b96f358b2a8..e1bdd6648958 100644 --- a/components/layout_thread_2020/Cargo.toml +++ b/components/layout_thread_2020/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "layout_thread_2020" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "layout_thread_2020" diff --git a/components/media/Cargo.toml b/components/media/Cargo.toml index 9691d9893120..21ce8db22014 100644 --- a/components/media/Cargo.toml +++ b/components/media/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "media" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "media" diff --git a/components/metrics/Cargo.toml b/components/metrics/Cargo.toml index 888fabc2dd67..44864913a7aa 100644 --- a/components/metrics/Cargo.toml +++ b/components/metrics/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "metrics" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "metrics" diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml index fb6c47209cb4..2ca1b035e3ab 100644 --- a/components/net/Cargo.toml +++ b/components/net/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "net" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true autotests = false # Inhibit lookup for tests/*.rs without [[test]] sections [lib] diff --git a/components/pixels/Cargo.toml b/components/pixels/Cargo.toml index 3330ca1a34c6..0cd8e198c1dd 100644 --- a/components/pixels/Cargo.toml +++ b/components/pixels/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "pixels" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "pixels" diff --git a/components/profile/Cargo.toml b/components/profile/Cargo.toml index c12bb7010004..e32e195822f0 100644 --- a/components/profile/Cargo.toml +++ b/components/profile/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "profile" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "profile" diff --git a/components/rand/Cargo.toml b/components/rand/Cargo.toml index b89846f34bbe..8eb479cd612c 100644 --- a/components/rand/Cargo.toml +++ b/components/rand/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "servo_rand" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "servo_rand" diff --git a/components/range/Cargo.toml b/components/range/Cargo.toml index c674d5a799c8..211d99451079 100644 --- a/components/range/Cargo.toml +++ b/components/range/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "range" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "range" diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index 5cf7b65ba4d6..f8a26d207901 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -1,12 +1,11 @@ [package] name = "script" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false - build = "build.rs" +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "script" diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs index e0563f91bf35..f18c827fcfa5 100644 --- a/components/script/dom/htmlscriptelement.rs +++ b/components/script/dom/htmlscriptelement.rs @@ -116,8 +116,12 @@ unsafe extern "C" fn off_thread_compilation_callback( let cx = GlobalScope::get_cx(); let _ar = enter_realm(&*global); - let compiled_script = FinishOffThreadStencil(*cx, token.0, ptr::null_mut()); + // TODO: This is necessary because the rust compiler will otherwise try to move the *mut + // OffThreadToken directly, which isn't marked as Send. The correct fix is that this + // type is marked as Send in mozjs. + let used_token = token; + let compiled_script = FinishOffThreadStencil(*cx, used_token.0, ptr::null_mut()); let load = if compiled_script.is_null() { Err(NoTrace(NetworkError::Internal( "Off-thread compilation failed.".into(), diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs index 97f06695265a..fb57bd502a47 100644 --- a/components/script/dom/macros.rs +++ b/components/script/dom/macros.rs @@ -157,7 +157,7 @@ macro_rules! make_labels_getter( #[macro_export] macro_rules! make_enumerated_getter( - ( $attr:ident, $htmlname:tt, $default:expr, $($choices: pat)|+) => ( + ( $attr:ident, $htmlname:tt, $default:expr, $($choices:pat_param)|+) => ( fn $attr(&self) -> DOMString { use $crate::dom::bindings::inheritance::Castable; use $crate::dom::element::Element; diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 18181c40e309..1ca1ee275628 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "libservo" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "servo" diff --git a/components/shared/background_hang_monitor/Cargo.toml b/components/shared/background_hang_monitor/Cargo.toml index c8d0685a377c..1ac91d57a7c4 100644 --- a/components/shared/background_hang_monitor/Cargo.toml +++ b/components/shared/background_hang_monitor/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "background_hang_monitor_api" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "background_hang_monitor_api" diff --git a/components/shared/base/Cargo.toml b/components/shared/base/Cargo.toml index bdf4237bb277..1d1aa0bb7017 100644 --- a/components/shared/base/Cargo.toml +++ b/components/shared/base/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "base" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "base" diff --git a/components/shared/bluetooth/Cargo.toml b/components/shared/bluetooth/Cargo.toml index c83b15c4cdc5..a2eb015b7e00 100644 --- a/components/shared/bluetooth/Cargo.toml +++ b/components/shared/bluetooth/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "bluetooth_traits" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "bluetooth_traits" diff --git a/components/shared/canvas/Cargo.toml b/components/shared/canvas/Cargo.toml index dc8e9e510d4f..663e831d419a 100644 --- a/components/shared/canvas/Cargo.toml +++ b/components/shared/canvas/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "canvas_traits" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "canvas_traits" diff --git a/components/shared/compositing/Cargo.toml b/components/shared/compositing/Cargo.toml index b454cae37fa5..ca31ce4201f7 100644 --- a/components/shared/compositing/Cargo.toml +++ b/components/shared/compositing/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "compositing_traits" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "compositing_traits" diff --git a/components/shared/devtools/Cargo.toml b/components/shared/devtools/Cargo.toml index d68e3bbb6123..cc54bbb27654 100644 --- a/components/shared/devtools/Cargo.toml +++ b/components/shared/devtools/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "devtools_traits" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "devtools_traits" diff --git a/components/shared/embedder/Cargo.toml b/components/shared/embedder/Cargo.toml index f68e3b47d2cd..ecef60b73f30 100644 --- a/components/shared/embedder/Cargo.toml +++ b/components/shared/embedder/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "embedder_traits" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "embedder_traits" diff --git a/components/shared/gfx/Cargo.toml b/components/shared/gfx/Cargo.toml index 292cd58b92c7..ffcbcc53c9fb 100644 --- a/components/shared/gfx/Cargo.toml +++ b/components/shared/gfx/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "gfx_traits" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "gfx_traits" diff --git a/components/shared/net/Cargo.toml b/components/shared/net/Cargo.toml index cf174100febf..ab1b1ba5e388 100644 --- a/components/shared/net/Cargo.toml +++ b/components/shared/net/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "net_traits" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "net_traits" diff --git a/components/shared/profile/Cargo.toml b/components/shared/profile/Cargo.toml index 7e3650bed0e3..718912a820d1 100644 --- a/components/shared/profile/Cargo.toml +++ b/components/shared/profile/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "profile_traits" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "profile_traits" diff --git a/components/shared/script/Cargo.toml b/components/shared/script/Cargo.toml index 6b3a2384d41a..7624b5424986 100644 --- a/components/shared/script/Cargo.toml +++ b/components/shared/script/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "script_traits" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "script_traits" diff --git a/components/shared/script_layout/Cargo.toml b/components/shared/script_layout/Cargo.toml index 803a247bc2d7..f4e310510ee9 100644 --- a/components/shared/script_layout/Cargo.toml +++ b/components/shared/script_layout/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "script_layout_interface" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "script_layout_interface" diff --git a/components/shared/webrender/Cargo.toml b/components/shared/webrender/Cargo.toml index 4031e3815cc9..e2e2fec74e7b 100644 --- a/components/shared/webrender/Cargo.toml +++ b/components/shared/webrender/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "webrender_traits" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "webrender_traits" diff --git a/components/url/Cargo.toml b/components/url/Cargo.toml index 65c3fa759678..152748656206 100644 --- a/components/url/Cargo.toml +++ b/components/url/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "servo_url" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "servo_url" diff --git a/components/webdriver_server/Cargo.toml b/components/webdriver_server/Cargo.toml index d0871e205bf2..e21cca357d3f 100644 --- a/components/webdriver_server/Cargo.toml +++ b/components/webdriver_server/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "webdriver_server" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "webdriver_server" diff --git a/components/webgpu/Cargo.toml b/components/webgpu/Cargo.toml index 2cd37b08ed47..0d46cf235056 100644 --- a/components/webgpu/Cargo.toml +++ b/components/webgpu/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "webgpu" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "webgpu" diff --git a/ports/jniapi/Cargo.toml b/ports/jniapi/Cargo.toml index b89fdb73f696..cd7ea52ae137 100644 --- a/ports/jniapi/Cargo.toml +++ b/ports/jniapi/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "simpleservo_jniapi" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true build = "build.rs" [lib] diff --git a/ports/servoshell/Cargo.toml b/ports/servoshell/Cargo.toml index 93a311dcd882..aa0ea6cf4274 100644 --- a/ports/servoshell/Cargo.toml +++ b/ports/servoshell/Cargo.toml @@ -1,12 +1,11 @@ [package] - name = "servoshell" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2021" build = "build.rs" -publish = false +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "servoshell" diff --git a/python/tidy/tidy.py b/python/tidy/tidy.py index 2129cd051142..21179885148b 100644 --- a/python/tidy/tidy.py +++ b/python/tidy/tidy.py @@ -465,6 +465,8 @@ def check_toml(file_name, lines): yield (idx + 1, "found asterisk instead of minimum version number") for license_line in licenses_toml: ok_licensed |= (license_line in line) + if "license.workspace" in line: + ok_licensed = True if not ok_licensed: yield (0, ".toml file should contain a valid license.") diff --git a/support/crown/Cargo.toml b/support/crown/Cargo.toml index 37ccebca2b97..30eeaa6c16c7 100644 --- a/support/crown/Cargo.toml +++ b/support/crown/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "crown" -authors = ["The Servo Project Developers"] -version = "0.1.0" -edition = "2021" -license = "MPL-2.0" +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true # Do not use workspace dependencies in this package! # In etc/shell.nix, we filter Cargo.lock and build this package in isolation, diff --git a/support/rust-task_info/Cargo.toml b/support/rust-task_info/Cargo.toml index 2286cc5ccaa2..91e758870206 100644 --- a/support/rust-task_info/Cargo.toml +++ b/support/rust-task_info/Cargo.toml @@ -1,11 +1,10 @@ [package] - name = "task_info" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" - +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true build = "build.rs" [build-dependencies] diff --git a/tests/unit/deny_public_fields/Cargo.toml b/tests/unit/deny_public_fields/Cargo.toml index 1fab23f0f8a9..5401a64d9963 100644 --- a/tests/unit/deny_public_fields/Cargo.toml +++ b/tests/unit/deny_public_fields/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "deny_public_fields_tests" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] path = "lib.rs" diff --git a/tests/unit/malloc_size_of/Cargo.toml b/tests/unit/malloc_size_of/Cargo.toml index 50051762a652..dd9591ed8892 100644 --- a/tests/unit/malloc_size_of/Cargo.toml +++ b/tests/unit/malloc_size_of/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "malloc_size_of_tests" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] path = "lib.rs" diff --git a/tests/unit/metrics/Cargo.toml b/tests/unit/metrics/Cargo.toml index 7f410d5701ab..4310797207df 100644 --- a/tests/unit/metrics/Cargo.toml +++ b/tests/unit/metrics/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "metrics_tests" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "metrics_tests" diff --git a/tests/unit/profile/Cargo.toml b/tests/unit/profile/Cargo.toml index b423d43b65d2..8c2c7c38d152 100644 --- a/tests/unit/profile/Cargo.toml +++ b/tests/unit/profile/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "profile_tests" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "profile_tests" diff --git a/tests/unit/script/Cargo.toml b/tests/unit/script/Cargo.toml index 2af8ced21094..01b9cacae5f3 100644 --- a/tests/unit/script/Cargo.toml +++ b/tests/unit/script/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "script_tests" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" +version.workspace = true +authors.workspace = true +license.workspace = true +edition.workspace = true +publish.workspace = true [lib] name = "script_tests"