Skip to content

bugfix - scope generic callable-name helper planning (#701)#702

Merged
dannymeijer merged 1 commit into
release/v0.3from
bugfix/701-decorator-partial-alias-callables
May 26, 2026
Merged

bugfix - scope generic callable-name helper planning (#701)#702
dannymeijer merged 1 commit into
release/v0.3from
bugfix/701-decorator-partial-alias-callables

Conversation

@dannymeijer
Copy link
Copy Markdown
Contributor

Summary

This PR fixes #701 by making generic callable-name helper planning concrete instead of crate-wide. Generic func.__name__ support now widens only for reachable top-level function values that actually flow through calls, while imported default symbols and dependency-owned types/values are qualified through shared dependency metadata. This keeps decorator/partial/callable identity working across module boundaries without emitting invalid helpers for unrelated async, generic, stdlib, or dependency signatures.

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: Generic decorator helpers can inspect decorated callable source names across imported alias/union callable signatures, and imported partial defaults keep module-owned symbols inside decorator arguments.
  • Internals: Adds CallableNameUseFacts as the single codegen query for callable-name usage, scopes generic callable-name helper emission to concrete function arguments, and centralizes dependency type/value qualification metadata.
  • Risks: Callable-name helper planning touches multi-file codegen and decorator lowering interactions. The focused InQL checks now get past generated Rust preheat; remaining InQL modulo/mod failures are downstream canonical-name metadata, not this compiler helper-emission failure.

Testing / verification

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

Manual verification notes:

  • cargo test --test cli_integration issue69 --features lsp passed.
  • cargo test --test cli_integration issue701 --features lsp passed.
  • cargo test --test vocab_guardrails semantic_string_checks_are_classified --features lsp passed.
  • cargo build --locked --bin incan --features lsp passed.
  • git diff --check origin/release/v0.3...HEAD passed.
  • make pre-commit passed, including nextest, clippy, cargo-deny, smoke-test-fast, examples, and benchmark build checks.
  • InQL PR bug - newtype direct construction is allowed (should be disallowed) (RFC 000) #44 focused checks now compile/preheat and fail only on the downstream modulo registering under source callable identity while tests expect canonical mod metadata.

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 #701

@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) labels May 26, 2026
@dannymeijer dannymeijer self-assigned this May 26, 2026
@dannymeijer dannymeijer added this to the 0.3 Release milestone May 26, 2026
@dannymeijer dannymeijer marked this pull request as ready for review May 26, 2026 19:22
@dannymeijer dannymeijer merged commit 6bcec3a into release/v0.3 May 26, 2026
33 checks passed
@dannymeijer dannymeijer deleted the bugfix/701-decorator-partial-alias-callables branch May 26, 2026 19:24
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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug - Decorator callable metadata still fails for imported partial defaults and alias callables

1 participant