Skip to content

feature - 161 implement RFC 027 phase 1-3: groundwork and validation fixes#176

Merged
dannymeijer merged 5 commits into
mainfrom
feature/161-implement-rfc-027-library-vocab-crate
Mar 12, 2026
Merged

feature - 161 implement RFC 027 phase 1-3: groundwork and validation fixes#176
dannymeijer merged 5 commits into
mainfrom
feature/161-implement-rfc-027-library-vocab-crate

Conversation

@dannymeijer
Copy link
Copy Markdown
Contributor

Summary

This PR closes out RFC 027 phase 1-3 by landing the remaining compiler/tooling groundwork and folding in the regressions found during validation.

It adds the new registry-backed highlighting/generation plumbing, simplifies stdlib source-module routing around __incan_std, and fixes correctness issues in Rust interop field emission, Result constructor inference, explicit generic bound checking, and VS Code keyword highlighting. The goal is to leave the branch stable enough to merge before starting RFC 031.

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: assert now highlights as flow control rather than async syntax; Rust import field access like consts.PI now emits valid Rust path syntax; Ok(...) / Err(...) payload mismatches are reported correctly instead of being masked by the enclosing return type.
  • Internals: keyword highlighting is now generated from canonical registry metadata in incan_core::lang; stdlib handling now consistently routes std.* modules through emitted crate::__incan_std::* source modules; typechecker call validation restores explicit generic-bound enforcement and generic constructor result typing.
  • Risks: the biggest risk area is cross-layer drift between registry/typechecker/emitter/tooling behavior, especially around stdlib module routing and soft-keyword/editor metadata. This PR adds targeted regressions to reduce that risk.

Testing / verification

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

Manual verification notes:

  • Ran cargo test
  • Ran cargo clippy --all-targets --all-features
  • Ran mkdocs build --strict
  • Ran cargo run --bin generate_vscode_grammar_keywords
  • Verified targeted regressions for:
    • Rust import field access emission (consts.PI -> consts::PI)
    • TitleCase value-vs-type emission behavior
    • explicit generic bound failures
    • Ok(...) / Err(...) payload mismatch detection
    • VS Code keyword bucketing for assert

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/RFCs/027_incan_vocab_crate.md, workspaces/docs-site/docs/RFCs/031_library_system_phase1.md, workspaces/docs-site/docs/RFCs/034_incan_pub_registry.md, workspaces/docs-site/docs/contributing/explanation/architecture.md, workspaces/docs-site/docs/contributing/how-to/extending_language.md, workspaces/docs-site/docs/release_notes/0_2.md, editors/vscode/README.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

… and editor tooling.

This consolidates the registry-backed vocab/highlighting work, simplifies stdlib source-module handling, and closes several typechecking/emission regressions found during validation so the RFC 027 foundation is stable before RFC 031 work begins.
@incan-triage-bot incan-triage-bot Bot added documentation Improvements or additions to documentation 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) incan language semantics Suggestions, features, or bugs related to the Incan Language itself (syntax and semantics) runtime / core crates Suggestions, features, or bugs related to the `incan-core`, `incan-stdlib`, 'incan-derive` crates tooling Suggestions, features, or bugs related to the Tooling (CLI/formatter/test runner) labels Mar 12, 2026
@dannymeijer dannymeijer merged commit c8502f0 into main Mar 12, 2026
13 checks passed
@dannymeijer dannymeijer deleted the feature/161-implement-rfc-027-library-vocab-crate branch March 12, 2026 22:19
@dannymeijer dannymeijer added this to the 0.2 Release milestone May 5, 2026
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 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) incan language semantics Suggestions, features, or bugs related to the Incan Language itself (syntax and semantics) runtime / core crates Suggestions, features, or bugs related to the `incan-core`, `incan-stdlib`, 'incan-derive` crates tooling Suggestions, features, or bugs related to the Tooling (CLI/formatter/test runner)

Projects

None yet

1 participant