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

fix(core) Root hierarchy should have proper inheritance #237

Closed
wants to merge 1 commit into from

Conversation

jeromesimeon
Copy link
Member

@jeromesimeon jeromesimeon commented Mar 19, 2021

Signed-off-by: Jerome Simeon [email protected]

Issue #228

Changes

  • squeeze core classes Event Transaction Asset Participant back in the type hierarchy
  • fixes tests
  • add missing timestamp to Event and Transaction
  • strangely sometimes we had identifiers generated even when not declared, maybe this was still what we wanted but I was recalling the opposite
  • fixes an unrelated bug in isExplicitlyIdentified API call sometimes returning undefined

Flags

  • This needs quite a bit more testing especially of the base types and new type hierarchy
  • I'm quite confused about timestamp why are event an transaction have a timestamp but the other classes do not? what's the criteria?
  • Somewhat mixed confidence that this is really what we intended to do (but I believe it's at least closer to that goal)

@jeromesimeon
Copy link
Member Author

@mttrbrts : this is a good test of the new build script, with successful linting and unit testing but regression on coverage.

Copy link
Contributor

@dselman dselman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Probably best that we have a quick chat, just to ensure we are aligned.

abstract transaction Transaction {}
abstract participant Participant {}
abstract event Event {}`, 'concerto.cto');
abstract concept Asset {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to convert all these to Concepts - they should retain their asset etc stereotypes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The are concepts: the new type hierarchy has Assets, Participant, Transaction and Event extensions of Concept. This could be written in two ways:

  1. as above
  2. as abstract transaction Transaction extends Concept {}

I don't think this makes any difference (recall no instance can be created for those since they are abstract) but with the definition nb 2. I was having some weird errors, possibly due to the fact that we are using transaction before it's actually defined.

@@ -52,7 +52,7 @@ asset Order {
mm.addModelFile( `
namespace test

asset Order {
asset Order identified {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be discussed I think. This now allows assets to not be identifiable - which seems odd.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just never know which of those are meant to be identified as a built-in thing or as a user decision. Is it just assets? I'm a little unclear there is a benefit those distinctions, but it may be because I forgot earlier discussions.

I'll play a bit by adding identified to assets and report.

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.

2 participants