nigig-org/crates/apps/pdf/pdf-makepad/Cargo.toml
andodeki e45a717ce7
Some checks failed
repo hygiene / hygiene (push) Has been cancelled
PDF engine / engine (push) Has been cancelled
PDF engine / makepad-integration (push) Has been cancelled
PDF engine / fuzz (push) Has been cancelled
fix(pdf-ui): enable the makepad-widgets test feature so ui.rs compiles
456cfa5 rewrote tests/ui.rs to import makepad_test through the
makepad-widgets re-export, but did not add the `test` feature that gates
that re-export, so the pdf-ui target stopped compiling:

  error[E0432]: unresolved import `makepad_widgets::makepad_test`
  note: the item is gated behind the `test` feature

Enabling the feature alone is not sufficient. The `#[makepad_test]`
attribute expands to an absolute `::makepad_test::` path, which resolves
only if the crate is also a direct dependency:

  error[E0433]: cannot find `makepad_test` in the crate root

So both are needed, and the manifest now says why - the direct
dev-dependency looks redundant next to the re-export and would otherwise
be an obvious thing for someone to delete. crates/apps/map keeps the
same pair for the same reason.

TEST_TARGET=pdf-ui 580 passing (was: failed to compile).
2026-07-31 20:02:29 +00:00

27 lines
1.2 KiB
TOML

[package]
name = "nigig-pdf-makepad"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Makepad PDF integration: MakepadPdfDevice, GPU textures, PdfView widget."
[dependencies]
nigig-pdf-cos = { path = "../pdf-cos" }
nigig-pdf-document = { path = "../pdf-document" }
nigig-pdf-graphics = { path = "../pdf-graphics" }
# The `test` feature gates makepad-widgets' re-export of makepad-test,
# which tests/ui.rs imports as makepad_widgets::makepad_test.
makepad-widgets = { git = "https://gitdab.com/andodeki/makepad", rev = "a79f0dce4d477e2232344facca0798d3f25043ec", features = ["test"] }
[dev-dependencies]
# Both are required, and neither is redundant: `ui.rs` imports the symbols
# through the re-export above, but the `#[makepad_test]` attribute expands
# to an absolute `::makepad_test::` path, which only resolves if the crate
# is also a direct dependency. Dropping either breaks the UI tests.
makepad-test = { git = "https://gitdab.com/andodeki/makepad", rev = "a79f0dce4d477e2232344facca0798d3f25043ec", package = "makepad-test" }
# A binary host so makepad_test can drive the widget through real event
# delivery; the crate itself remains a library.
[[bin]]
name = "nigig-pdf-makepad"
path = "src/bin/nigig-pdf-makepad.rs"