Skip to content

fix: stop enabling tracing's log feature and restore no_std builds - #2064

Open
Benoît Cortier (CBenoit) wants to merge 3 commits into
masterfrom
claude/ironrdp-rdpeudp-tracing-cleanup-cc3092
Open

Benoît Cortier (CBenoit) wants to merge 3 commits into
masterfrom
claude/ironrdp-rdpeudp-tracing-cleanup-cc3092

Conversation

@CBenoit

@CBenoit Benoît Cortier (CBenoit) commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

What

1. Restore no_std builds of ironrdp-rdpeudp and ironrdp-rdpemt

  • tracing now uses default-features = false, and tracing/std is forwarded from each crate's existing std feature. No new crate features.
  • An alloc::vec import that only the tests use now lives in the test module, which fixes an unused-import warning in the rdpeudp no_std build.

2. Stop enabling tracing's log feature everywhere

  • features = ["log"] is removed from all 35 manifests (library crates, applications, benches, ffi).
  • ironrdp-dvc, ironrdp-rdpecam and ironrdp-rdpel are no_std crates, so their tracing dependency also disables default features. ironrdp-dvc forwards tracing/std from its existing std feature.

3. Check no_std builds in CI (xtask feature matrix)

  • workspace/no-std-target: cargo check --no-default-features --target x86_64-unknown-none over the crates that are expected to be no_std. cargo xtask check install now adds that target, so the CI fan-out picks the case up with no workflow change.
  • workspace/powerset-multitransport: rdpeudp and rdpemt were not in any powerset group.

Why

  • no_std regression: since feat(rdpeudp): log the RDP-UDP connection state machine #2022, tracing's default std feature has been pulled into the rdpeudp/rdpemt no-default-features builds. Both fail on a real no_std target (can't find crate for std). The existing feature checks only run on the host, where std is always present, so CI couldn't catch this. The new case fails if the rdpeudp manifest fix is reverted.
  • tracing/log: it entered the workspace dependency table incidentally in feat(rdpdr): DR_CORE_SERVER_CLIENTID_CONFIRM and DR_CORE_DEVICELIST_ANNOUNCE #193 (2023) and was then copied into every crate when workspace dependencies were dropped (build: do not use workspace dependencies #695). A library shouldn't turn on log interoperability for all of its consumers. No application in the workspace needs it either: the viewer, FFI, web client, daemon (which ActiveX goes through), testsuite and benches all install a tracing-subscriber subscriber. Applications that do want to forward tracing events to a log backend can enable tracing/log themselves.

Notes for reviewers

  • Lock files: tracing no longer depends on log in either lock file, and log drops out of fuzz/Cargo.lock entirely. ironrdp-mstsgu still depends on log directly, which this PR doesn't touch.
  • Out of scope: ironrdp-pdu and the crates built on it (svc, dvc, graphics, rdpecam, rdpel, rdpeusb) still fail the no-std-target check, because pdu's dependency tree enables std. That's a separate issue, tracked as a FIXME next to the case.
  • Dropping tracing's default features also drops its attributes feature. None of the affected crates uses #[instrument].

Validation

  • cargo xtask check fmt, lints, tests, locks
  • cargo xtask wasm check
  • cargo xtask check features --case workspace/no-std-target
  • cargo xtask check features --case workspace/powerset-multitransport (12/12)

🤖 Generated with Claude Code

`ironrdp-rdpeudp` and `ironrdp-rdpemt` depended on `tracing` with its
default features, which enable `std`. Their `--no-default-features`
builds therefore failed on targets without `std`. Host-only feature
checks could not catch this, since the host always provides `std`.

Disable `tracing`'s default features and forward `tracing/std` from each
crate's existing `std` feature. Also drop `tracing/log`: a library should
not enable log interoperability for every consumer, and applications
that need it can enable it themselves.

Extend the xtask feature matrix so this is checked in CI:
- `workspace/no-std-target` builds the no_std crates with default
  features disabled for `x86_64-unknown-none`, a target without `std`
  (installed by `cargo xtask check install`).
- `workspace/powerset-multitransport` adds rdpeudp and rdpemt, which
  were not part of any powerset group.

Also move an import only used by tests into the test module, fixing an
unused-import warning in the rdpeudp no_std build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 17:34
@github-actions github-actions Bot added risk/medium Behavioral change that does not substantially alter a core public API scope/tooling Build, CI, release, or developer tooling size/S Size: up to 199 counted lines and 5 files; exceeds XS in either measure labels Sep 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The combined title scope is rejected by the repository’s PR-title validator; the implementation itself appears sound.

Review effort: Balanced
Findings: None

What changed in this PR

Restores genuine no_std support for RDPEUDP/RDPEMT and adds CI coverage against a bare-metal target.

Changes:

  • Disables tracing defaults and forwards tracing/std.
  • Adds no-std and multitransport feature-matrix cases.
  • Localizes a test-only vec! import.

Required metadata fix: Use one canonical scope—or no scope—instead of rdpeudp,rdpemt.

File Description
xtask/​src/​features.rs Adds no-std and powerset checks.
xtask/​src/​check.rs Installs the bare-metal target.
crates/​ironrdp-rdpeudp/​src/​pdu/​v1_ack.rs Moves the macro import into tests.
crates/​ironrdp-rdpeudp/​Cargo.toml Corrects tracing feature wiring.
crates/​ironrdp-rdpemt/​Cargo.toml Corrects tracing feature wiring.

@CBenoit Benoît Cortier (CBenoit) changed the title fix(rdpeudp,rdpemt): restore no_std builds broken by tracing defaults fix(rdpeudp): restore no_std builds broken by tracing defaults Sep 30, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #2064 restores no_std builds for ironrdp-rdpeudp and ironrdp-rdpemt by disabling tracing's default features and forwarding tracing/std from each crate's std feature, moves a test-only alloc::vec import into the test module, and adds two new xtask feature-matrix cases (a real no_std-target check and a powerset group for the multitransport crates) plus the rustup target install. The core fix is correct: tracing's default std feature explains the x86_64-unknown-none breakage, neither crate uses #[instrument] so dropping tracing's default features (including attributes) is compile-safe, and in-workspace consumers enable tracing/log so their output is unchanged. Two valid specialist findings were confirmed: (1) dropping the tracing/log bridge is a policy choice bundled with the fix that makes the two crates the sole exceptions to the workspace-wide tracing features=["log"] pattern and silently removes log bridging for external consumers (low severity, accepted); (2) the new NoStdTarget …

Comment thread crates/ironrdp-rdpeudp/Cargo.toml
Comment thread xtask/src/features.rs
@github-actions github-actions Bot added ai-reviewed/1 One automated review completed needs-author-action The pull request author is the current next actor labels Sep 30, 2026
`features = ["log"]` on `tracing` entered the workspace dependency table
incidentally in #193 and was then copied into every crate manifest.
Libraries should not enable log interoperability for all their
consumers, and no application in the workspace needs it: the viewer, the
FFI, the web client, the daemon, the testsuite and the benches all
install a `tracing-subscriber` subscriber.

Drop the feature everywhere. For the `no_std` crates (`ironrdp-dvc`,
`ironrdp-rdpecam`, `ironrdp-rdpel`), also disable `tracing`'s default
features, and forward `tracing/std` from `ironrdp-dvc`'s existing `std`
feature, matching `ironrdp-rdpeudp` and `ironrdp-rdpemt`.

`tracing` no longer depends on `log` in either lock file; `log` itself
drops out of `fuzz/Cargo.lock`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CBenoit Benoît Cortier (CBenoit) changed the title fix(rdpeudp): restore no_std builds broken by tracing defaults fix: stop enabling tracing's log feature and restore no_std builds Sep 30, 2026
@github-actions github-actions Bot added kind/technical-debt Internal cleanup work scope/core Touches the core architectural tier scope/ffi Affects native or .NET bindings scope/web Affects the web/WASM ecosystem size/XL Size: up to 1299 counted lines and 49 files; exceeds L in either measure and removed needs-author-action The pull request author is the current next actor size/S Size: up to 199 counted lines and 5 files; exceeds XS in either measure labels Sep 30, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #2064 restores no_std builds of ironrdp-rdpeudp/ironrdp-rdpemt by disabling tracing's default features and forwarding tracing/std from the existing std features, removes the incidental features = ["log"] from all 35 manifests (verified: no tracing_log/LogTracer usage in the workspace, all consumers install a tracing-subscriber), moves a test-only alloc::vec import into the test module, and adds a workspace/no-std-target feature-matrix case checking on x86_64-unknown-none with the target installed by `cargo xtask check install`. Independent verification of the head confirms the manifests, the rdpeudp test-import fix, the xtask NoStdTarget arm, and the check.rs wiring are correct; rdpecam/rdpel correctly need no std forwarding since they have no std feature. The only residual issue is a four-line package-argument loop duplicated verbatim between the CargoHack and NoStdTarget arms of run_one — valid but low-severity optional polish that the maintainer has explicitly declined, so it is…

Comment thread xtask/src/features.rs
Comment on lines +322 to +335
Invocation::NoStdTarget { packages } => {
let mut args: Vec<String> = vec![
"check".into(),
"--locked".into(),
"--no-default-features".into(),
"--target".into(),
NO_STD_TARGET.into(),
];
for pkg in *packages {
args.push("-p".into());
args.push((*pkg).into());
}
cmd!(sh, "{CARGO}").args(&args).run()?;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[code-compressor] NoStdTarget arm duplicates CargoHack's package-argument loop — low 🟡 — The new NoStdTarget arm repeats the exact four-line pattern already present in the CargoHack arm: for pkg in *packages { args.push("-p".into()); args.push((*pkg).into()); }. A small shared helper would remove the duplication and keep the two invocations consistent if the flag ever changes. Optional compression only: the duplication is four lines, behavior is identical either way, and the maintainer has explicitly declined the helper in PR review (it would also touch the unrelated CargoHack arm, and self-contained arms match existing run_one style). No correctness impact.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed: same finding as the earlier thread, which was declined. See the reply on that thread.

🤖 Addressed by Claude Code

@github-actions github-actions Bot added ai-reviewed/2 Two automated reviews completed needs-author-action The pull request author is the current next actor and removed ai-reviewed/1 One automated review completed labels Sep 30, 2026
@glamberson

Copy link
Copy Markdown
Contributor

Oops.

@glamberson

Copy link
Copy Markdown
Contributor

This one's on me, and I'm sorry. Recent AI model upgrades have caused me some trouble with my usual safeguards and processes, and this got through because of it.

Thank you for fixing it so quickly. The no-std-target check you added is the one those PRs needed, and I've added the same x86_64-unknown-none build to my own pre-push checks.

…udp-tracing-cleanup-cc3092

# Conflicts:
#	crates/ironrdp-rdpdr-native/Cargo.toml
@github-actions github-actions Bot added automation-failed Exact-head automated classification or review failed or was unavailable risk/unknown Risk could not be determined automatically; needs maintainer-level scrutiny and removed needs-author-action The pull request author is the current next actor risk/medium Behavioral change that does not substantially alter a core public API labels Oct 1, 2026
@CBenoit

Benoît Cortier (CBenoit) commented Oct 7, 2026 •

Copy link
Copy Markdown
Member Author

PR automation is failing because of a picky-krb 0.12.5 incompatibility, fixed on master by #2074. Please rebase on master to fix it.

Update: no rebase needed anymore. picky-krb 0.12.5 was yanked from crates.io (re-released as 0.13.0), so the API check builds again without changes to this branch. PR automation has been re-run here and passes.

@github-actions github-actions Bot added risk/medium Behavioral change that does not substantially alter a core public API needs-review A human reviewer is the current next actor and removed risk/unknown Risk could not be determined automatically; needs maintainer-level scrutiny automation-failed Exact-head automated classification or review failed or was unavailable labels Oct 7, 2026

This branch was successfully deployed

1 active deployment
llm-providers — e014ee0c Deployed Oct 1, 2026 by CBenoit via Classify pull request #1542
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-reviewed/2 Two automated reviews completed kind/technical-debt Internal cleanup work needs-review A human reviewer is the current next actor risk/medium Behavioral change that does not substantially alter a core public API scope/core Touches the core architectural tier scope/ffi Affects native or .NET bindings scope/tooling Build, CI, release, or developer tooling scope/web Affects the web/WASM ecosystem size/XL Size: up to 1299 counted lines and 49 files; exceeds L in either measure

Development

Successfully merging this pull request may close these issues.

3 participants