Skip to content

docs.rs cannot build 0.6.1: skia-safe 0.82 is broken there #214

Description

@LeadcodeDev

rustmotion 0.6.1 published, but docs.rs could not build it:
https://docs.rs/crate/rustmotion/0.6.1/builds/4176083

Cause

skia-bindings 0.82.0 has a docs.rs-specific path in its build script, and it is
broken:

DETECTED DOCS_RS BUILD
COPYING bindings_docs.rs to OUT_DIR/skia/bindings.rs
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }

The build script exits 1, so rustdoc never runs.

This is upstream, not ours: skia-safe 0.82.0 has no documentation on docs.rs
either — its own build failed the same way. skia-safe 0.99.0 builds fine. The
fix is to move off 0.82.

Scope, measured rather than estimated

Bumping the three crates to skia-safe = "0.99" and running cargo check --workspace produces 30 errors, all of one kind: Skia made SkPath immutable
and moved construction into SkPathBuilder, so the mutating methods left Path.

// before
let mut p = Path::new();
p.move_to(a); p.line_to(b); p.close();
p

// after
let mut b = PathBuilder::new();
b.move_to(a); b.line_to(b); b.close();
b.detach()

PathBuilder exists in 0.99 with detach() and snapshot().

Affected call sites:

Crate Files Call sites
rustmotion-components 18 147
rustmotion-core 3 30
rustmotion 1 1
Total 22 178

rustmotion-html, rustmotion-studio and rustmotion-cli are untouched.

Of the 99 files that use skia_safe, only 22 break. Canvas, Paint, Surface,
ImageInfo, FontStyle, Shader and Data crossed seventeen minor versions
unchanged.

178 is a floor, not a total. Cargo stopped at rustmotion-core, so the two
downstream crates were never type-checked. Further breakage may exist in
rustmotion-components, and it cannot be seen until core compiles.

Verification

The pixel regression suite is the judge here, not the compiler: if the paths are
built the same way they render the same way, and the tests say so.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions