Skip to content

chore(parser_app): address PR #303 follow-up review comments#309

Merged
prasanna-anchorage merged 1 commit into
mainfrom
shahankhatch/82-parser-app-feature-matrix-followup
Jun 2, 2026
Merged

chore(parser_app): address PR #303 follow-up review comments#309
prasanna-anchorage merged 1 commit into
mainfrom
shahankhatch/82-parser-app-feature-matrix-followup

Conversation

@shahan-khatchadourian-anchorage
Copy link
Copy Markdown
Contributor

Summary

Addresses all four follow-up items prasanna-anchorage raised on his approval of #303 (the per-PR narrow-build-check + local feature-matrix-check work). Single PR — all items are small, touch the same Makefile, and don't depend on each other.

Changes

1. Restore dynamic chain discovery ($(sort) + $(wildcard)).

PARSER_APP_CHAINS := $(sort $(patsubst visualsign-%,%,$(notdir $(wildcard chain_parsers/visualsign-*))))

The hardcoded list from #303 required editing both the Makefile variable and parser_app/Cargo.toml's [features] block whenever a chain was added. The sorted wildcard gives the same stable, deduplicated ordering the depth-2 pair generator needs, and the matrix auto-extends when a new chain_parsers/visualsign-<name>/ lands.

2. cargo buildcargo check in both targets.
The regression class these targets guard — unconditional chain-crate references that should have been #[cfg]-gated — is compile-level. cargo check is sufficient and roughly 2× faster than cargo build; the clippy invocations already cover lint coverage. As a bonus, feature-matrix-check now grows the target dir by ~2GB instead of ~28GB across its 31 invocations.

3. Add empty + diagnostics combo to feature-matrix-check.
--no-default-features --features diagnostics (no chains compiled in) makes the diagnostics axis symmetric with the rest of the matrix.

4. Tighten comments.

  • narrow-build-check comment now reflects the auto-pickup behavior the dynamic variable provides.
  • CI cache note rewritten to be accurate: parser_app re-type-checks under each distinct feature set while workspace dependencies are reused from earlier CI steps' cache.

Test plan

  • make -C src narrow-build-check — 6 cargo check + 6 clippy invocations, exit 0.
  • make -C src feature-matrix-check — 31 cargo check invocations (1 diagnostics-only + 5 singles + 5 singles+diagnostics + 10 pairs + 10 pairs+diagnostics), exit 0. Cargo target dir grew by ~2GB.
  • Pre-commit hook (cargo fmt + cargo clippy across all workspace splits): clean.

References

prasanna-anchorage approved #303 with four follow-up asks. This commit
addresses all of them:

1. Restore dynamic chain discovery via $(wildcard) wrapped in $(sort).
   The hardcoded list required editing two places (Makefile + Cargo.toml
   [features]) for every new chain crate. The sorted wildcard gives the
   same stable ordering the depth-2 pair generator relied on, with no
   manual sync.

2. Swap `cargo build` for `cargo check` in both narrow-build-check and
   feature-matrix-check. The regression class these targets guard
   (unconditional chain crate references in parser_app) is compile-level,
   so `check` is sufficient. Roughly 2x faster on per-PR runs, and the
   feature-matrix target dir grows by ~2GB instead of ~28GB.

3. Add `--no-default-features --features diagnostics` (no chains) to
   feature-matrix-check so the diagnostics axis is symmetric.

4. Tighten the narrow-build-check comment to reflect the auto-pickup
   behavior the dynamic variable provides; rewrite the CI cache note
   so it's accurate (parser_app re-type-checks under each feature set
   while workspace deps reuse the cache).

Verified locally: make narrow-build-check (6 checks + 6 clippy, exit 0);
make feature-matrix-check (31 checks across the matrix, exit 0, +~2GB
in src/target).
Copilot AI review requested due to automatic review settings May 21, 2026 14:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the parser_app feature-gating verification targets in src/Makefile to be more maintainable and faster, addressing follow-up review items from PR #303.

Changes:

  • Restore dynamic chain discovery for PARSER_APP_CHAINS via $(wildcard) + $(sort) so new chain_parsers/visualsign-*/ directories are auto-included.
  • Switch narrow-build-check and feature-matrix-check from cargo build to cargo check to reduce runtime and disk usage while still catching compile-level feature-gating regressions.
  • Extend feature-matrix-check to include a --no-default-features --features diagnostics (diagnostics-only, no chains) combo and tighten comments to reflect current behavior/CI caching.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@prasanna-anchorage prasanna-anchorage left a comment

Choose a reason for hiding this comment

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

Approving — all four follow-ups from my #303 review are correctly addressed, and I verified each:

  1. Dynamic chain discovery$(sort $(patsubst visualsign-%,%,$(notdir $(wildcard chain_parsers/visualsign-*)))) expands to exactly ethereum solana sui tron unspecified, identical to the old hardcoded list, and parser_app's [features] block has a matching feature per chain. The $(sort) gives the stable, deduped ordering the pair generator needs. The "add a chain crate without wiring its feature -> fails loudly at narrow-build-check" behavior is exactly what I wanted.
  2. cargo build -> cargo check — correct: the regression class (unconditional, un-cfg-gated chain-crate refs) is compile-level, so check is sufficient and clippy still covers the lint axis. Nice target-dir savings too.
  3. diagnostics-only combo — verified cargo check -p parser_app --no-default-features --features diagnostics compiles locally; makes the diagnostics axis symmetric. Invocation count math checks out (31 = 1 + 5 + 5 + 10 + 10).
  4. Comments — accurate now, including the CI-cache note.

No conflicts with main, CI green.

Non-blocking nit: the new standalone echo "==> features: diagnostics" line isn't @-prefixed, so make echoes the echo command itself before running it. Harmless and roughly consistent with how these targets already surface their cargo lines, but @echo would be tidier. Fine to leave.

LGTM.

@prasanna-anchorage prasanna-anchorage merged commit 817cb4b into main Jun 2, 2026
13 checks passed
@prasanna-anchorage prasanna-anchorage deleted the shahankhatch/82-parser-app-feature-matrix-followup branch June 2, 2026 08:14
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.

3 participants