Use workspace definitions for all crates and update to the 2021 edition (#32544)

This commit is contained in:
Martin Robinson 2024-06-18 11:22:08 +02:00 committed by GitHub
parent 42b09d483f
commit 4a7f3bac7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
60 changed files with 283 additions and 268 deletions

2
Cargo.lock generated
View file

@ -1113,7 +1113,7 @@ checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "crown"
version = "0.1.0"
version = "0.0.1"
dependencies = [
"compiletest_rs",
"once_cell",

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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 }

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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!(<crate::dom::bindings::trace::CustomTraceable>::trace(#binding, tracer);));
return Some(quote!(<dyn crate::dom::bindings::trace::CustomTraceable>::trace(#binding, tracer);));
}
}
Some(quote!(#binding.trace(tracer);))

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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]

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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(),

View file

@ -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;

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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]

View file

@ -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"

View file

@ -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.")

View file

@ -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,

View file

@ -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]

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"