Skip to content

chore - speed up generated-project test suite#642

Merged
dannymeijer merged 4 commits into
release/v0.3from
chore/place-test-consolidations
May 23, 2026
Merged

chore - speed up generated-project test suite#642
dannymeijer merged 4 commits into
release/v0.3from
chore/place-test-consolidations

Conversation

@dannymeijer
Copy link
Copy Markdown
Contributor

Summary

This PR cuts the local 0.3 test/pre-commit cost by consolidating duplicate generated-project tests, folding LSP coverage into the primary nextest run, and adding a safe shared Cargo target cache for generated incan run / binary incan build test helpers. The warm verified full make pre-commit wall time is now 133.33s, with nextest at 101.002s and the full pre-commit gate core at 103s.

Type of change

  • Bug fix
  • New feature
  • Refactor / maintenance
  • Documentation
  • CI / tooling
  • RFC (adds/updates docs/RFCs/*)

Area(s)

Select the primary areas touched (used for review routing; labels are managed separately):

  • Incan Language (syntax/semantics)
  • Compiler (frontend/backend/codegen)
  • Tooling (CLI/formatter/test runner)
  • Editor integration (LSP/VS Code extension)
  • Runtime / Core crates (stdlib/core/derive)
  • Documentation

Key details

  • User-facing behavior: No language behavior changes. Contributors get a faster local gate, and LSP tests now run as part of the main test command instead of a separate focused pass.
  • Internals: Consolidates repeated runtime/generated-project test scenarios; adds INCAN_TEST_SHARED_TARGET_DIR for generated test harnesses; adds INCAN_GENERATED_CARGO_TARGET_DIR plus hashed binary target names for shared generated Cargo target reuse; keeps generated library target names stable for native Rust consumers.
  • Risks: The main risk is cache aliasing across generated projects; binary target names are output-dir-hashed under the shared target override, and focused native-consumer/artifact tests verify that generated library crate names remain stable.

Testing / verification

  • make test / cargo test
  • make examples (if relevant)
  • incan fmt --check . (if relevant)
  • Manual verification described below

Manual verification notes:

  • cargo test --no-run --lib — passed
  • cargo test --no-run --test integration_tests — passed
  • cargo test --lib shared_target_safe_name -- --nocapture — passed
  • cargo test --lib relative_target_dirs -- --nocapture — passed
  • cargo test --test integration_tests codegen_tests::test_run_c_import_this -- --nocapture — passed
  • cargo test --test std_encoding_algorithm_modules std_encoding_algorithm_vectors_and_invalid_cases -- --nocapture — passed
  • cargo test --test cli_integration run_accepts_generic_rust_param_scenarios_share_one_generated_project -- --nocapture — passed
  • cargo test --test generated_rust_native_consumer_tests native_rust_consumer_can_call_generated_public_items -- --nocapture — passed
  • cargo test --test generated_rust_artifact_tests generated_application_artifact_matches_baseline -- --nocapture — passed
  • cargo test --test generated_rust_callability_artifact_tests generated_callable_artifact_and_consumers_share_producer_build -- --nocapture — passed
  • make fmt — passed
  • git diff --check — passed
  • make pre-commit — passed; nextest ran 2442 tests in 125.182s, pre-commit-full-gate total was 164s, and smoke-test-fast passed
  • /usr/bin/time -p make pre-commit — passed outside the sandbox; nextest ran 2442 tests in 101.002s, pre-commit-full-gate total was 103s, smoke-test-fast passed, wall time was 133.33s

Docs impact

  • No docs changes needed
  • Docs updated
  • Docs follow Divio intent (tutorial/how-to/reference/explanation) where applicable

If docs updated:

  • Link(s): n/a

Checklist

  • I kept public docs user-focused and moved internals to contributing docs when appropriate
  • I avoided duplicating canonical install/run instructions in multiple places
  • I added/updated tests where it materially reduces regressions

@incan-triage-bot incan-triage-bot Bot added editor integration Suggestions, features, or bugs related to the Editor integration (`vscode extension` and LSP) incan compiler Suggestions, features, or bugs related to the Compiler (frontend/backend/codegen) tooling Suggestions, features, or bugs related to the Tooling (CLI/formatter/test runner) labels May 23, 2026
@dannymeijer dannymeijer self-assigned this May 23, 2026
@dannymeijer dannymeijer added this to the 0.3 Release milestone May 23, 2026
@dannymeijer dannymeijer marked this pull request as ready for review May 23, 2026 06:43
@dannymeijer dannymeijer merged commit c46a153 into release/v0.3 May 23, 2026
33 checks passed
@dannymeijer dannymeijer deleted the chore/place-test-consolidations branch May 23, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editor integration Suggestions, features, or bugs related to the Editor integration (`vscode extension` and LSP) incan compiler Suggestions, features, or bugs related to the Compiler (frontend/backend/codegen) tooling Suggestions, features, or bugs related to the Tooling (CLI/formatter/test runner)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant