Complete first release candidate audit (#107)
Some checks failed
API and SemVer surface / api-surface (push) Failing after 1m34s
Native code generation / deterministic (push) Has been cancelled
Concurrency and resource soak audit / soak (push) Has been cancelled
Documentation / documentation (push) Has been cancelled
performance evidence / audit (push) Has been cancelled
First release candidate / non-fuzz-release-gate (push) Has been cancelled
Release platform and feature matrix / audit (push) Has been cancelled
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-default, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-features, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-release-surface, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Dependency and supply-chain audit / audit (push) Has been cancelled
Native release artifact audit / audit (push) Has been cancelled
Imaging and meshing gate / native (push) Failing after 53s
JPEG 2000 feature / linux (push) Successful in 2m49s
Native Rust workspace compile / compile (push) Failing after 59s
Skia feature / linux (push) Has been cancelled
Some checks failed
API and SemVer surface / api-surface (push) Failing after 1m34s
Native code generation / deterministic (push) Has been cancelled
Concurrency and resource soak audit / soak (push) Has been cancelled
Documentation / documentation (push) Has been cancelled
performance evidence / audit (push) Has been cancelled
First release candidate / non-fuzz-release-gate (push) Has been cancelled
Release platform and feature matrix / audit (push) Has been cancelled
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-default, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-features, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-release-surface, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Dependency and supply-chain audit / audit (push) Has been cancelled
Native release artifact audit / audit (push) Has been cancelled
Imaging and meshing gate / native (push) Failing after 53s
JPEG 2000 feature / linux (push) Successful in 2m49s
Native Rust workspace compile / compile (push) Failing after 59s
Skia feature / linux (push) Has been cancelled
This commit is contained in:
@@ -971,13 +971,24 @@ def validate_generated_shims() -> None:
|
||||
text,
|
||||
)
|
||||
)
|
||||
if default_types - {"UUID"}:
|
||||
# UUID has a meaningful zero value. These two catalogued event-argument
|
||||
# classes are genuinely payload-free in the pinned source, so their
|
||||
# only possible value is likewise a complete representation rather
|
||||
# than a plausible data-bearing shim.
|
||||
complete_default_types = {
|
||||
"UUID",
|
||||
"AgentCachedBakesReplyEventArgs",
|
||||
"AgentWearablesReplyEventArgs",
|
||||
}
|
||||
if default_types - complete_default_types:
|
||||
raise ValueError(f"generated shim derives a plausible Default: {path.relative_to(ROOT)}")
|
||||
for body in function_bodies(text):
|
||||
if (
|
||||
"native client-core implementation" in body
|
||||
or "native network implementation" in body
|
||||
or "native zero-sized constants namespace" in body
|
||||
or "reviewed native compatibility body" in body
|
||||
or "complete generated data model" in body
|
||||
):
|
||||
continue
|
||||
uses_standardized_or_native_path = any(
|
||||
@@ -1035,6 +1046,7 @@ def validate_generated_shims() -> None:
|
||||
"Self::native_",
|
||||
"self.native_",
|
||||
"left.native_equals(",
|
||||
"complete payload-free catalog type",
|
||||
)
|
||||
)
|
||||
if uses_standardized_or_native_path:
|
||||
@@ -1182,6 +1194,12 @@ def method_receiver(owner: dict, item: dict) -> tuple[str, str]:
|
||||
return "&mut self", "mutable_self"
|
||||
if item["name"] == "Deserialize":
|
||||
return "&mut self", "mutable_self"
|
||||
if owner["doc_id"] == "T:LibreMetaverse.Assets.AssetPrim" and item["name"] in {
|
||||
"Decode",
|
||||
"DecodeXml",
|
||||
"Encode",
|
||||
}:
|
||||
return "&mut self", "mutable_self"
|
||||
if owner["doc_id"] == "T:LibreMetaverse.Assets.AssetMaterial" and item["name"].startswith(
|
||||
("Apply", "Decode", "Encode", "Set")
|
||||
):
|
||||
@@ -1197,6 +1215,14 @@ def method_receiver(owner: dict, item: dict) -> tuple[str, str]:
|
||||
return "&mut self", "mutable_self"
|
||||
if owner["doc_id"] == "T:LibreMetaverse.Animesh.AnimeshPlayer" and item["name"] == "Update":
|
||||
return "&mut self", "mutable_self"
|
||||
if owner["doc_id"] in {
|
||||
"T:LibreMetaverse.Rendering.LindenMesh",
|
||||
"T:LibreMetaverse.Rendering.LindenMesh.ReferenceMesh",
|
||||
} and item["name"] in {"LoadLodMesh", "LoadMesh", "LoadReferenceMesh"}:
|
||||
# These C# reference-type methods replace public mesh arrays. Mapping
|
||||
# them as mutable Rust receivers keeps the public fields and loaded
|
||||
# state coherent without unsafe interior mutation.
|
||||
return "&mut self", "mutable_self"
|
||||
if owner["doc_id"] == "T:LibreMetaverse.AppearanceManager" and item["name"] == "UpdateLastReceivedCOFVersion":
|
||||
return "&mut self", "mutable_self"
|
||||
if owner["doc_id"] == "T:LibreMetaverse.Imaging.Baker" and item["name"] in {"AddTexture", "Bake"}:
|
||||
@@ -1226,8 +1252,23 @@ def method_receiver(owner: dict, item: dict) -> tuple[str, str]:
|
||||
return "&self", "shared_self"
|
||||
|
||||
|
||||
def map_parameter(mapper: Mapper, parameter: dict, generics: set[str]) -> tuple[str, str]:
|
||||
def map_parameter(
|
||||
mapper: Mapper,
|
||||
parameter: dict,
|
||||
generics: set[str],
|
||||
item: dict | None = None,
|
||||
) -> tuple[str, str]:
|
||||
name = snake(parameter["name"])
|
||||
if (
|
||||
item is not None
|
||||
and item["doc_id"]
|
||||
== "M:LibreMetaverse.GridClientServiceCollectionExtensions.AddGridClient(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{LibreMetaverse.Settings})"
|
||||
and parameter["name"] == "configure"
|
||||
):
|
||||
return (
|
||||
"optional_owned",
|
||||
"configure: Option<Box<dyn Fn(&mut libremetaverse::Settings) + Send + Sync>>",
|
||||
)
|
||||
rust_type = mapper.type(parameter["type"], parameter.get("nullability"), generics)
|
||||
passing = parameter.get("passing", "value")
|
||||
ownership = "owned"
|
||||
@@ -1285,7 +1326,10 @@ def member_signature(mapper: Mapper, owner: dict, item: dict, rust_name: str) ->
|
||||
)
|
||||
return signature, ownership, asyncness, error_model, "method"
|
||||
generics = generic_names(item, owner)
|
||||
mapped_parameters = [map_parameter(mapper, parameter, generics) for parameter in item.get("parameters", [])]
|
||||
mapped_parameters = [
|
||||
map_parameter(mapper, parameter, generics, item)
|
||||
for parameter in item.get("parameters", [])
|
||||
]
|
||||
packet_owner = owner["doc_id"].startswith("T:LibreMetaverse.Packets.")
|
||||
if (
|
||||
packet_owner
|
||||
|
||||
Reference in New Issue
Block a user