8000 Add LocalTime & Maybe SDK Functions by sahilravinder · Pull Request #572 · finos/morphir-scala · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add LocalTime & Maybe SDK Functions #572

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

Merged
merged 15 commits into from
Apr 11, 2024

Conversation

sahilravinder
Copy link
Contributor
  • MaybeSDK.map2
  • MaybeSDK.map3
  • MaybeSDK.map4
  • MaybeSDK.hasValue
  • LocalTimeSDK.diffInHours
  • LocalTimeSDK.diffInMinutes

(ctx: NativeContext) => (f: RT.Function, maybeRaw1: RT.ConstructorResult, maybeRaw2: RT.ConstructorResult) =>
{
val out = for {
elem1 <- eitherToOption(maybeRaw1)
Copy link
Member

Choose a reason for hiding this comment

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

So i was confused by the use of eitherToOption but it turns out that is a a poorly named function. @edwardpeters can you please add appropriate docs for this function in another PR and rename it to something that actually reflects what is happening?

Copy link
Member

Choose a reason for hiding this comment

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

There's part of this implementation that feels strange, but I'm a bit swamped to review this right now... (@michelchan , @edwardpeters , or @Paul-Folbrecht ) can any of you take a look at this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. The comments say ConstructorResult is used for Maybes and Results, and neither are an Either. So this should at least be renamed.

Copy link
Member

Choose a reason for hiding this comment

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

Added #575 to track this

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, looks like those got mangled when they were copied from the similar Result/Either helpers. Have a PR in to fix this, currently building.

Copy link
Member
@DamianReeves DamianReeves left a comment

Choose a reason for hiding this comment

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

I'm good with this, but would like to see #575 addressed as mentioned in the comments

(ctx: NativeContext) => (f: RT.Function, maybeRaw1: RT.ConstructorResult, maybeRaw2: RT.ConstructorResult) =>
{
val out = for {
elem1 <- eitherToOption(maybeRaw1)
Copy link
Member

Choose a reason for hiding this comment

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

Added #575 to track this

@sahilravinder sahilravinder merged commit 58c712b into finos:main Apr 11, 2024
@sahilravinder sahilravinder deleted the add-sdk-functions branch April 11, 2024 14:57
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
0