Skip to content

bugfix - preserve decorated builtin-name calls in inline tests (#677)#679

Merged
dannymeijer merged 3 commits into
release/v0.3from
bugfix/677-decorated-builtin-name-inline-tests
May 25, 2026
Merged

bugfix - preserve decorated builtin-name calls in inline tests (#677)#679
dannymeijer merged 3 commits into
release/v0.3from
bugfix/677-decorated-builtin-name-inline-tests

Conversation

@dannymeijer
Copy link
Copy Markdown
Contributor

Summary

This PR fixes the remaining decorated builtin-name inline-test regression on the v0.3 release branch and folds in the related runner/codegen hardening found during the review loop. Decorated callables such as a source-level sum(...) now shadow implicit builtin roots consistently through typechecking and lowering, multi-file inline-test batches preserve per-file scope without splitting harmless repeated imports, and the v0.3 release notes are decomposed into more readable feature and hardening sections.

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: Decorated functions whose names overlap builtins resolve to the source binding inside inline tests, and directory inline-test runs keep per-file parser/import scope while still sharing safe batches.
  • Internals: Builtin/root dispatch now uses explicit symbol-id backed shadowing checks for stdlib surface functions and surface types, lowering refuses name-based builtin fallback when frontend callee metadata exists, and nested codegen matches modules by explicit path segments before falling back to flat names.
  • Risks: The builtin shadowing and test-runner batching paths are compiler hot spots, so the PR includes focused typechecker, integration, snapshot, and full pre-commit coverage. Release-note restructuring is broad but documentation-only.

Testing / verification

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

Manual verification notes:

  • make pre-commit
  • cargo test local_function_named --features cli
  • cargo test test_decorated_function_named_sum_shadows_builtin_sum_in_inline_module_tests --features cli
  • cargo test partition_collision_free_file_groups --features cli
  • cargo test module_name_for_segments_disambiguates_join_collisions --features cli
  • cargo test std_web_prelude_import_snapshot --features cli --test stdlib_generated_rust_snapshot_tests
  • cargo test e2e_inline_decorated_sum_shadows_builtin_sum_issue677 --features cli --test integration_tests
  • cargo test e2e_conventional_test_batches_split_import_declaration_collisions_issue676 --features cli --test integration_tests
  • cargo test e2e_directory_run_preserves_per_file_inline_test_modules_issue676 --features cli --test integration_tests
  • cargo test e2e_fixture_lifetime_success_scenarios_share_one_project --features cli --test integration_tests
  • cargo test equivalent_helper_backed_keywords_typecheck --features cli --test integration_tests
  • cargo run --quiet --features cli --bin incan -- test /private/tmp/incan-677-repro/src/decorated_sum_union.incn
  • git diff --check

Docs impact

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

If docs updated:

  • Link(s): workspaces/docs-site/docs/release_notes/0_3.md, workspaces/docs-site/docs/roadmap.md

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

Closes #677

@incan-triage-bot incan-triage-bot Bot added documentation Improvements or additions to documentation incan compiler Suggestions, features, or bugs related to the Compiler (frontend/backend/codegen) incan language semantics Suggestions, features, or bugs related to the Incan Language itself (syntax and semantics) tooling Suggestions, features, or bugs related to the Tooling (CLI/formatter/test runner) labels May 25, 2026
@dannymeijer dannymeijer self-assigned this May 25, 2026
@dannymeijer dannymeijer added this to the 0.3 Release milestone May 25, 2026
@dannymeijer dannymeijer marked this pull request as ready for review May 25, 2026 03:21
@dannymeijer dannymeijer merged commit 28851e3 into release/v0.3 May 25, 2026
33 checks passed
@dannymeijer dannymeijer deleted the bugfix/677-decorated-builtin-name-inline-tests branch May 25, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation incan compiler Suggestions, features, or bugs related to the Compiler (frontend/backend/codegen) incan language semantics Suggestions, features, or bugs related to the Incan Language itself (syntax and semantics) 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