Skip to content

Conversation

@dhower-qc
Copy link
Collaborator

@dhower-qc dhower-qc commented Oct 31, 2024

Also enhances arch_gen to expand references.

Supports $ref (JSON Reference) and $mref (merged ref, doesn't ignore other keys in the object)

Difference:


(in something.yaml)
key:
  ref_extra: Hello!

obj:
  $ref: path/to/something.yaml#/key
  extra: Hi!

=> obj = { ref_extra: "Hello!" }

obj:
  $mref: path/to/something.yaml#/key
  extra: Hi!

=> obj = { extra: "Hi!", ref_extra: "Hello!" }

Also enhances arch_gen to expand references.

Supports $ref (JSON Reference) and $mref (merged ref, doesn't ignore other keys in the object)

Difference:

(in something.yaml)
key:
  ref_extra: Hello!

obj:
  $ref: path/to/something.yaml#/key
  extra: Hi!

=> obj = { ref_extra: "Hello!" }

obj:
  $mref: path/to/something.yaml#/key
  extra: Hi!

=> obj = { extra: "Hi!", ref_extra: "Hello!" }
@dhower-qc dhower-qc merged commit ce98d6d into main Nov 4, 2024
1 check passed
@dhower-qc dhower-qc deleted the dhower/refs branch November 4, 2024 19:28
@drom
Copy link
Collaborator

drom commented Nov 6, 2024

$ref is immutable reference. $mref will create new object similar to the original.
We need to clearly delineate use cases for $ref and $mref

@dhower-qc
Copy link
Collaborator Author

Good point. The way I see it, $ref is a pointer, and $mref is inheritance. For example, @james-ball-qualcomm is using $mref to represent profiles that build on each other (RVA20 -> RVA22).

@james-ball-qualcomm
Copy link
Collaborator

That is the plan and I'll be doing this soon. So, I'll find out how $mref works for profiles.

@dhower-qc
Copy link
Collaborator Author

Moving to discussion #247

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

Successfully merging this pull request may close these issues.

4 participants