Skip to content

Fix impl publish: add syn printing feature, bump to 11.4.1 - #27

Merged
SeriousBug merged 1 commit into
masterfrom
fix-impl-syn-printing-11.4.1
Jul 1, 2026
Merged

Fix impl publish: add syn printing feature, bump to 11.4.1#27
SeriousBug merged 1 commit into
masterfrom
fix-impl-syn-printing-11.4.1

Conversation

@SeriousBug

Copy link
Copy Markdown
Owner

What happened

The 11.4.0 release workflow published rust-embed-for-web-utils 11.4.0 to crates.io, then failed publishing rust-embed-for-web-impl:

error[E0599]: no associated function or constant named `new_spanned` found for struct `syn::Error`

Root cause

impl/src/lib.rs uses syn::Error::new_spanned (added in #21). That function requires the ToTokens trait, which lives behind syn's printing feature. impl/Cargo.toml sets default-features = false and never enabled printing. The workspace test job passes because Cargo feature unification pulls printing in via another crate, but cargo publish verifies the crate in isolation, where the feature is absent.

Fix

  • Enable the printing feature on syn in impl/Cargo.toml. Verified with cargo publish --dry-run on impl in isolation.
  • Bump all crates to 11.4.1. utils 11.4.0 is already on crates.io (publishes are irreversible), so a fresh version is needed to re-release all three cleanly.

After merge, re-trigger the release workflow.

impl/src/lib.rs uses syn::Error::new_spanned (added in #21), which needs
the ToTokens trait from syn's "printing" feature. impl/Cargo.toml sets
default-features = false without it, so the crate fails to compile when
built in isolation — which is exactly what cargo publish's verification
step does. The workspace test build passed only because feature
unification pulled "printing" in via another crate.

utils 11.4.0 already published before impl failed, so bump all crates to
11.4.1 to re-release cleanly.
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.97%. Comparing base (94684e0) to head (57804ec).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #27   +/-   ##
=======================================
  Coverage   75.97%   75.97%           
=======================================
  Files           9        9           
  Lines         566      566           
=======================================
  Hits          430      430           
  Misses        136      136           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SeriousBug
SeriousBug merged commit 616db7d into master Jul 1, 2026
6 checks passed
@SeriousBug
SeriousBug deleted the fix-impl-syn-printing-11.4.1 branch July 1, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant