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

Use serialization-properties over AbstractDecoder. #403

Closed
wants to merge 38 commits into from

Conversation

corrado4eyes
Copy link
Contributor

@corrado4eyes corrado4eyes commented Oct 18, 2021

@codecov
Copy link

codecov bot commented Oct 18, 2021

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.68%. Comparing base (1df1263) to head (7ee15a9).
Report is 1391 commits behind head on develop.

Files with missing lines Patch % Lines
...plendo/kaluga/links/manager/DefaultLinksManager.kt 50.00% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #403      +/-   ##
=============================================
+ Coverage      80.59%   80.68%   +0.08%     
- Complexity       254      259       +5     
=============================================
  Files            674      673       -1     
  Lines           8868     8842      -26     
  Branches         746      743       -3     
=============================================
- Hits            7147     7134      -13     
+ Misses          1534     1523      -11     
+ Partials         187      185       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thoutbeckers thoutbeckers requested a review from posytive October 26, 2021 14:41
Copy link
Contributor

@dasdranagon dasdranagon left a comment

Choose a reason for hiding this comment

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

Looks good! I would consider some improvements. in tests also would always recommend starting with the simplest test cases.
Check my comment (you can resolve it after reading)

@dasdranagon
Copy link
Contributor

dasdranagon commented Oct 27, 2021

FYI: #61 is resolved and has nothing to do with this PR ;)

Copy link
Contributor

@posytive posytive left a comment

Choose a reason for hiding this comment

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

Nice work! I don't see anything wrong with the additions you made and the overall implementation of this feature.
In this sense, it can be merged after you make the Readme a bit more clear

But I keep thinking that there are too many limitations for a developer using this module, and in the sense we should consider a refactor.
Specifically, I think is better to avoid:

  • forcing an order of params in the query
  • passing nulls explicitely
  • passing the size of a list

In the first 2 cases, consider using Serialization modules that do this for us automatically (even if we need to map the data un-efficiently at the beginning, queries are not so long): the good old kotlinx.serialization.json or kotlinx.serialization.properties
The latter seems exactly what you need

links/README.md Outdated Show resolved Hide resolved
@corrado4eyes corrado4eyes changed the title Support serialize null value. Use serialization-properties over AbstractDecoder. Nov 12, 2021
@corrado4eyes
Copy link
Contributor Author

You can do

""" 
    foo
    bar 
""".trimIndent().lines().joinToString("")

It would work only for white spaces before foo and after bar and not what is in the middle let's say \t\t baz

@thoutbeckers
Copy link
Collaborator

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.

5 participants