Skip to content

bugfix - unify helper and generic method default planning (#729, #731)#732

Merged
dannymeijer merged 1 commit into
release/v0.3from
bugfix/729-731-call-planning-defaults
May 31, 2026
Merged

bugfix - unify helper and generic method default planning (#729, #731)#732
dannymeijer merged 1 commit into
release/v0.3from
bugfix/729-731-call-planning-defaults

Conversation

@dannymeijer
Copy link
Copy Markdown
Contributor

Summary

This PR stacks the #729 vocab helper call-planning fix on top of the merged #727 work and fixes #731 by making instantiated generic receiver methods inherit source default arguments before Rust emission. Vocab desugarer helper calls now use the same public dependency call-planning path as ordinary pub::library calls, including default materialization, dependency-owned provider paths, union wrapping, and owned-string conversion.

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: Source-backed DSL helpers can omit exported defaults the same way ordinary imported helpers can, and calls such as left.join(right) on instantiated generic classes/models now emit the default trailing argument instead of invalid Rust.
  • Internals: Public dependency call planning now carries provider-qualified default expressions and nested default-call signatures through .incnlib metadata; module-qualified public helper calls resolve through the same manifest signature path as direct imports; method-call emission specializes Incan-owned receiver signatures through the concrete generic receiver before inheriting defaults.
  • Risks: The touched paths sit in shared call lowering/emission and public metadata export. Regression coverage covers direct and vocab helper calls, provider-owned default constants, anonymous-union helper arguments, imported string constants, and generic receiver method defaults.

Testing / verification

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

Manual verification notes:

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

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 #729
Closes #731

@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) labels May 31, 2026
@dannymeijer dannymeijer merged commit be54354 into release/v0.3 May 31, 2026
33 checks passed
@dannymeijer dannymeijer deleted the bugfix/729-731-call-planning-defaults branch May 31, 2026 23:18
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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant