Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize redundant double reference for Group elements #1

Open
ccromjongh opened this issue Jun 28, 2023 · 0 comments
Open

Optimize redundant double reference for Group elements #1

ccromjongh opened this issue Jun 28, 2023 · 0 comments

Comments

@ccromjongh
Copy link

Currently the JSON output gives renders group elements as references that refer to references to the actual type. This is superfluous, and the first reference could be directly replaced with the second one.

Example now:

"logic_group_generated_119_218_L7n3uhlP_1__b": {
  "type": "Ref",
  "value": "package_pack0__generated_0_6_AXTfYq6d_5"
},
"logic_group_generated_119_218_L7n3uhlP_1__g": {
  "type": "Ref",
  "value": "package_pack0__generated_0_6_AXTfYq6d_5"
},
"logic_group_generated_119_218_L7n3uhlP_1__r": {
  "type": "Ref",
  "value": "package_pack0__generated_0_6_IJOt1EjR_7"
},
"package_pack0__generated_0_6_AXTfYq6d_5": {
  "type": "Bit",
  "value": 8
},
"package_pack0__generated_0_6_IJOt1EjR_7": {
  "type": "Bit",
  "value": 8
},
"package_pack0__rgb": {
  "type": "Group",
  "value": {
    "elements": {
      "b": {
        "type": "Ref",
        "value": "logic_group_generated_119_218_L7n3uhlP_1__b"
      },
      "g": {
        "type": "Ref",
        "value": "logic_group_generated_119_218_L7n3uhlP_1__g"
      },
      "r": {
        "type": "Ref",
        "value": "logic_group_generated_119_218_L7n3uhlP_1__r"
      }
    }
  }
}

Envisioned:

"package_pack0__generated_0_6_AXTfYq6d_5": {
  "type": "Bit",
  "value": 8
},
"package_pack0__generated_0_6_IJOt1EjR_7": {
  "type": "Bit",
  "value": 8
},
"package_pack0__rgb": {
  "type": "Group",
  "value": {
    "elements": {
      "b": {
        "type": "Ref",
        "value": "package_pack0__generated_0_6_AXTfYq6d_5"
      },
      "g": {
        "type": "Ref",
        "value": "package_pack0__generated_0_6_AXTfYq6d_5"
      },
      "r": {
        "type": "Ref",
        "value": "package_pack0__generated_0_6_IJOt1EjR_7"
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant