-
Notifications
You must be signed in to change notification settings - Fork 205
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
overloaded choices in json-api #14410
Conversation
…erloaded-choices-json-api
…erloaded-choices-json-api
…erloaded-choices-json-api
…erloaded-choices-json-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable.
Just few naive questions.
locator: domain.ContractLocator[v.Value], | ||
to: domain.Party, | ||
choice: TExercise[Inj], | ||
choiceInterfaceId: Option[domain.ContractTypeId.Interface.OptionalPkg] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why choiceInterfaceId
is not a field of TExercise
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No particular reason, take a look at 9757fb0 and let me know what you think.
ledger-service/http-json/src/itlib/scala/http/AbstractHttpServiceIntegrationTest.scala
Show resolved
Hide resolved
ledger-service/http-json/src/main/scala/com/digitalasset/http/PackageService.scala
Show resolved
Hide resolved
ledger-service/http-json/src/main/scala/com/digitalasset/http/PackageService.scala
Show resolved
Hide resolved
f: PackageService.ResolveTemplateRecordType, | ||
g: PackageService.ResolveChoiceArgType, | ||
h: PackageService.ResolveKeyType, | ||
): Error \/ LfType = | ||
) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we drop the type signature ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifying the type signature of an override
is usually pointless noise, and this change makes this one pointless and wrong noise. The only signal to be had is in the definition of type TypeFromCtId
immediately above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifying the type signature of an
override
is usually pointless noise, and this change makes this one pointless and wrong noise. The only signal to be had is in the definition oftype TypeFromCtId
immediately above.
I don't think it is. Having the signature fully available makes it easy to understand what the function does at a glance without having to go through the inheritance hiearachy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a typeclass and its instances. We don't restate the types of typeclass methods in every instance for the same reason.
ledger-service/http-json/src/main/scala/com/digitalasset/http/json/JsonProtocol.scala
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly a documentation review.
My eye slipped on a couple of implementation details and I added a comment there as well.
f: PackageService.ResolveTemplateRecordType, | ||
g: PackageService.ResolveChoiceArgType, | ||
h: PackageService.ResolveKeyType, | ||
): Error \/ LfType = | ||
) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifying the type signature of an
override
is usually pointless noise, and this change makes this one pointless and wrong noise. The only signal to be had is in the definition oftype TypeFromCtId
immediately above.
I don't think it is. Having the signature fully available makes it easy to understand what the function does at a glance without having to go through the inheritance hiearachy.
…erloaded-choices-json-api
- suggested by @remyhaemmerle-da; thanks
- suggested by @remyhaemmerle-da; thanks
- suggested by @remyhaemmerle-da; thanks
- suggested by @stefanobaghino-da; thanks
…erloaded-choices-json-api
Documentation improvements addressed in 0eeb531
I removed my blocker since the documentation has been improved as required by 0eeb531. Thank you, @S11001001. |
…erloaded-choices-json-api
Fixes #13923.