feat(dev): Example macro out of order with tests#1609
Open
bfung wants to merge 6 commits intoexample-macro-out-of-orderfrom
Open
feat(dev): Example macro out of order with tests#1609bfung wants to merge 6 commits intoexample-macro-out-of-orderfrom
bfung wants to merge 6 commits intoexample-macro-out-of-orderfrom
Conversation
Changed "mainting" to "maintaining" in the doc comment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added trybuild-based compile-time tests following TDD principles: Tests added (tests/compiler/function/example/): - Valid usage with trailing commas (pass.rs) - Duplicate field detection (3 tests with .stderr) - Missing field detection (3 tests with .stderr) - Unknown field detection (1 test with .stderr) Macro improvements (src/compiler/function.rs): - Added duplicate field error handling with compile_error! - Enhanced documentation with compile_fail examples - Added test_example_macro_trailing_commas unit test Infrastructure: - Added trybuild dev dependency (Cargo.toml) - Created tests/trybuild.rs test suite with organized structure - Added tests/README.md documenting trybuild workflow Test organization mirrors source structure: src/compiler/function.rs → tests/compiler/function/example/ All tests pass including unit tests, doc tests, and trybuild tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added COVERAGE.md with quick start guide for running cargo-llvm-cov coverage reports. Includes: - Installation and basic usage commands - HTML report location - Text summary commands - Note about trybuild tests not appearing in coverage - Current project coverage baseline (~74% lines, ~68% functions) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Pin trybuild dev dependency to specific version for reproducible builds. Verified all trybuild tests pass with pinned version. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replaced hardcoded year values in test expectations with a {CURRENT_YEAR}
placeholder that gets replaced at test runtime with the actual current year.
This prevents tests from failing when the year changes.
Changes:
- Added replace_current_year_placeholder() helper function in test framework
- Updated parse_klog and parse_linux_authorization tests to use placeholder
- Refactored duplicate code following DRY principles
All 801 tests passing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated cargo-deny from version 0.18.3 to 0.19.0 to resolve the "unsupported CVSS version: 4.0" error that occurs when parsing the RustSec advisory database. The fix was introduced in cargo-deny 0.18.6 by updating the rustsec dependency to version 0.31, which includes CVSS 4.0 support. Changes: - Updated cargo-deny version in scripts/check_deny.sh from 0.18.3 to 0.19.0 - Verified all checks pass: advisories, bans, licenses, and sources References: - GitHub Issue: EmbarkStudios/cargo-deny#804 - Fix PR: EmbarkStudios/cargo-deny#805 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds testing on top of #1583
trybuildto validate that macros fail during compilation when used improperly.Change Type
Is this a breaking change?
How did you test this PR?
Does this PR include user facing changes?
our guidelines.
Checklist
run
dd-rust-license-tool writeand commit the changes. More details here.References