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 Arrow-kt dependency #7335

Merged
merged 1 commit into from Oct 12, 2022
Merged

Remove Arrow-kt dependency #7335

merged 1 commit into from Oct 12, 2022

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Oct 11, 2022

Remove Arrow-kt dependency.

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other : dep removal.

Content

Motivation and context

Screenshots / GIFs

Tests

  • Smoke test (in progress)

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@Throws
fun writeToFile(data: ByteArray, file: File) {
file.sink().buffer().use {
it.write(data)
Copy link
Member Author

Choose a reason for hiding this comment

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

Those 2 fun are actually not used, but I do not want to delete this file.

@bmarty bmarty requested review from a team and ganfra and removed request for a team October 11, 2022 12:55
@ganfra
Copy link
Contributor

ganfra commented Oct 11, 2022

I think we should get rid of Arrow as it's just used for some Option. We have our own simple Optional type in the sdk, could we replace?

@bmarty bmarty changed the title Update Arrow-kt to 1.1.3 Remove Arrow-kt dependency Oct 12, 2022
@bmarty
Copy link
Member Author

bmarty commented Oct 12, 2022

OK, I have removed this dep. Thanks to review again the PR!

fun getOrNull(): T? {
return value
}
fun orNull(): T? = value
Copy link
Member Author

Choose a reason for hiding this comment

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

just a new alias to avoid to many changes.

@@ -33,23 +31,19 @@ data class Optional<T : Any> constructor(private val value: T?) {
}
}

fun getOrElse(fn: () -> T): T {
fun orElse(fn: () -> T): T {
Copy link
Member Author

Choose a reason for hiding this comment

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

(not used at the moment)

}
}

fun <T : Any> T?.toOption() = Optional(this)
Copy link
Member Author

Choose a reason for hiding this comment

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

(another new alias)

@sonarcloud
Copy link

sonarcloud bot commented Oct 12, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

83.3% 83.3% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Thanks for this, LGTM

@bmarty bmarty merged commit beb334b into develop Oct 12, 2022
@bmarty bmarty deleted the feature/bma/upgrade_arrow branch October 12, 2022 14:26
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.

None yet

2 participants