Skip to content

Variable Scoping not honored on imports #1892

@Tyler-Hartwig-Pariveda

Description

@Tyler-Hartwig-Pariveda

Hi, I ran into an issue with importing diagrams and variable scoping:

template.d2

env: {
  label: ${env} Environment
  vm: {
    label: My Virtual machine!
  } 
}

environments.d2

dev: {
  vars: {
    env: Dev
  }
  [email protected]
}

qa: {
  vars: {
    env: Qa
  }
  [email protected]
}

I'd expect this to render with "Qa" and "Dev" in each respective environment, instead "Dev" is used on both diagrams!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions