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

Remove unused ExercisedEvent from Event oneof #960

Closed
gerolf-da opened this issue May 7, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@gerolf-da
Copy link
Contributor

commented May 7, 2019

Considering that transaction trees have their own event wrapper (TreeEvent), we can remove ExercisedEvent from the Event oneof.

This is 100% backwards compatible on the wire, because the ExercisedEvent is currently not emitted on the flat transaction stream.
It will however cause a compile error when updating for example in a switch statement or a pattern match.

@gerolf-da

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2019

@bitonic: what do you think? Should we wait for the (in)famous API V2 to clean this up?

@bitonic

This comment has been minimized.

Copy link
Contributor

commented May 9, 2019

@gerolf-da i think it's a good idea, feel free to go ahead.

gerolf-da added a commit that referenced this issue May 10, 2019

Remove ExercisedEvent in Event oneof.
The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.

HOWEVER: The Java Bindings used the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures, I added two new
interfaces FlatEvent and TreeEvent for flat transactions and transaction
trees respectively.

Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).

Fixes #960.

gerolf-da added a commit that referenced this issue May 10, 2019

Remove ExercisedEvent in Event oneof.
The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.

HOWEVER: The Java Bindings used the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures, I added two new
interfaces FlatEvent and TreeEvent for flat transactions and transaction
trees respectively.

Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).

Fixes #960.

@gerolf-da gerolf-da referenced this issue May 10, 2019

Merged

Remove ExercisedEvent in Event oneof. #1067

5 of 5 tasks complete

gerolf-da added a commit that referenced this issue May 10, 2019

Remove ExercisedEvent in Event oneof.
The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.

HOWEVER: The Java Bindings used the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures, I added two new
interfaces FlatEvent and TreeEvent for flat transactions and transaction
trees respectively.

Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).

Fixes #960.

gerolf-da added a commit that referenced this issue May 10, 2019

Remove ExercisedEvent in Event oneof.
The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.

HOWEVER: The Java Bindings used the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures, I added two new
interfaces FlatEvent and TreeEvent for flat transactions and transaction
trees respectively.

Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).

Fixes #960.

gerolf-da added a commit that referenced this issue May 10, 2019

Remove ExercisedEvent in Event oneof.
The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.

HOWEVER: The Java Bindings used the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures, I added two new
interfaces FlatEvent and TreeEvent for flat transactions and transaction
trees respectively.

Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).

Fixes #960.

gerolf-da added a commit that referenced this issue May 13, 2019

Remove ExercisedEvent in Event oneof.
The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.

HOWEVER: The Java Bindings used the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures, I added two new
interfaces FlatEvent and TreeEvent for flat transactions and transaction
trees respectively.

Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).

Fixes #960.

gerolf-da added a commit that referenced this issue May 13, 2019

Remove ExercisedEvent in Event oneof. (#1067)
* Remove ExercisedEvent in Event oneof.

The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.

HOWEVER: The Java Bindings used to use the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures,
1) Event is now and interface and is only used in the Transaction class.
2) there is a new interface TreeEvent, which is used in the TransactionTree class.

* CreatedEvent implements Event and TreeEvent
* ExercisedEvent implements TreeEvent
* ArchivedEvent implements Event

Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).

Fixes #960.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.