Skip to content

engine: 2022 projects with a period in a variable name do not simulate #690

Closed

Description

@bpowers

Projects saved in 2022 whose variable names contain a literal period ("Goal 1.5 for Temperature", "Fig. 3") opened fine but failed to simulate.
The 2022 reader stored the canonical name with a plain ., and today's canonicalize reads an unquoted . as a module separator, so the variable became a reference to a nonexistent submodule and every use of it failed with DoesNotExist.

Example

A stored project with the variable ident goal_1.5_for_temperature and a second variable referencing "Goal 1.5 for Temperature" gave two DoesNotExist errors; the same project without the period compiled and ran.

Status

On main, loading a stored project rewrites a . in every stored ident field to the literal-period marker U+2024 (migrate_stored_ident in src/simlin-engine/src/serde.rs), so these projects simulate.
View-element names and group members are not rewritten; the mismatch that leaves is tracked in #704.

Pointers

Activity

  1. added
    engine
    bug
    on Jun 8, 2026
  2. changed the title [-]engine: 2022-era models with quoted literal-period idents silently fail to simulate (no load-time canonical-data migration)[/-] [+]engine: 2022 projects with a period in a variable name do not simulate[/+] on Oct 12, 2026
  3. bpowers commented on Oct 12, 2026

    @bpowers
    OwnerAuthor

    Closing: already fixed on main.

    migrate_stored_ident (src/simlin-engine/src/serde.rs:46, commit 8079e7e) rewrites a raw . to U+2024 on protobuf load in every ident field the issue listed: stock/flow/aux/module idents, module model names, stock flow lists, model names, macro parameters and outputs, dimension names, elements, mappings and element subscripts (serde.rs:640-665, 942-958, 1147, 1250, 1490, 2590-2596, 2685, 2898-2950). test_quoted_period_ident_simulates_after_deserialize_690 (serde.rs:3155) loads such a project and asserts it compiles and simulates; sibling tests cover dimensions, element subscripts and idempotence.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugengine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions