Skip to content

NFR: Developer Friendly FQN Type Hints (Dots vs. Underscores) #146

Description

@dschwartznyc

Feature Request

Problem Description:

The current generator uses "bundle-mangled" names with underscores (e.g., cdm_base_datetime_AdjustableDate) in function and constructor signatures to avoid collisions. This makes the generated Python API feel non-standard compared to Rosetta.

Steps to Reproduce:

Example Rune code: Standard Rosetta type definition.

namespace cdm.base.datetime

type AdjustableDate:
   unadjustedDate date (1..1)
  1. Generate code for a function taking a complex Rosetta type.
  2. Inspect the generated Python function signature.

Test Case:

  • Observation: Check generated _bundle.py for underscore-separated class names vs dotted FQNs.

Expected Result:

Type hints should use fully qualified, period-delimited names (as strings) that match the Rosetta namespaces: val: "cdm.base.datetime.AdjustableDate".

Actual Result:

Function signature uses val: cdm_base_datetime_AdjustableDate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions