jacodb icon indicating copy to clipboard operation
jacodb copied to clipboard

Fix unknown classes and ERS API improvement

Open Saloed opened this issue 1 year ago • 5 comments

[jacodb-core] Specify identity for UnknownField, UnknownMethod, JcTypedFieldImpl

[jacodb-core] Fix operations with map names in LmdbKeyValueStorage

[jacodb-core] Avoid creation of named maps for R/O operations

[jacodb-core] Force use of sortedSet by getMapNames()

[jacodb-core] For an entity type, add ability to get names of used properties/blobs/links

The sets of names of properties/blobs/links returned by the API consist of names ever have been set to an entity of specified type. So the sets can contain names of properties/blobs/links that could actually have been deleted in all entities of specified type.

As a bonus, the way how named map are created was changed. As of now, any R/O operation doesn't implicitly create name map, whereas R/W operation does.

TODO: fix implementation atop of LMDB and SQLite.

[jacodb-core] Define equals()/hashcode() in JcUnknownClass & JcUnknownType

[jacodb-core] Apply JcUnknownClassLookup only for instances of JcUnknownClass

As of now, there is no longer an ability to get and unknown field or an unknown method for instances other than JcUnknownClass.

[jacodb-api] ERS API: inherit EntityIterable from Kotlin Sequence

As of now, EntityIterable is no longer Iterable, but Kotlin Sequence. All methods and properties, except iterator(), have default implementations. Binary operations are implemented as lazy sequences.

Saloed avatar Aug 22 '24 08:08 Saloed

Lifecycle test results

78 tests  ±0   78 :white_check_mark: ±0   1m 56s :stopwatch: +4s  7 suites ±0    0 :zzz: ±0   7 files   ±0    0 :x: ±0 

Results for commit f63c31da. ± Comparison against base commit 549cc207.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Aug 22 '24 08:08 github-actions[bot]

Test results on JDK 19

   84 files     84 suites   13m 50s :stopwatch: 2 513 tests 2 472 :white_check_mark: 41 :zzz: 0 :x: 2 541 runs  2 500 :white_check_mark: 41 :zzz: 0 :x:

Results for commit f63c31da.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Aug 22 '24 08:08 github-actions[bot]

Codecov Report

Attention: Patch coverage is 63.11475% with 90 lines in your changes missing coverage. Please review.

Project coverage is 58.84%. Comparing base (549cc20) to head (f63c31d). Report is 1 commits behind head on neo.

Files Patch % Lines
...org/jacodb/impl/storage/ers/kv/KVErsTransaction.kt 59.37% 19 Missing and 7 partials :warning:
.../jacodb/impl/features/classpaths/JcUnknownClass.kt 27.77% 10 Missing and 3 partials :warning:
...impl/storage/ers/kv/KVEntityRelationshipStorage.kt 73.17% 5 Missing and 6 partials :warning:
...jacodb/impl/storage/PersistentLocationsRegistry.kt 28.57% 10 Missing :warning:
.../kotlin/org/jacodb/impl/storage/ers/kv/KVEntity.kt 77.77% 2 Missing and 4 partials :warning:
...impl/storage/ers/ram/RAMPersistentDataContainer.kt 66.66% 2 Missing and 2 partials :warning:
...g/jacodb/impl/features/classpaths/JcUnknownType.kt 25.00% 3 Missing :warning:
...n/kotlin/org/jacodb/impl/types/JcTypedFieldImpl.kt 25.00% 3 Missing :warning:
.../impl/storage/ers/decorators/AbstractDecorators.kt 33.33% 2 Missing :warning:
.../org/jacodb/impl/storage/ers/ram/RAMTransaction.kt 33.33% 2 Missing :warning:
... and 8 more
Additional details and impacted files
@@             Coverage Diff              @@
##                neo     #264      +/-   ##
============================================
- Coverage     58.91%   58.84%   -0.07%     
- Complexity     2261     2288      +27     
============================================
  Files           314      314              
  Lines         18523    18613      +90     
  Branches       2958     2983      +25     
============================================
+ Hits          10912    10952      +40     
- Misses         6528     6569      +41     
- Partials       1083     1092       +9     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 22 '24 08:08 codecov[bot]

Test results on JDK 11

   84 files  ±0     84 suites  ±0   17m 11s :stopwatch: +45s 2 513 tests +1  2 474 :white_check_mark: +1  39 :zzz: ±0  0 :x: ±0  2 541 runs  +1  2 502 :white_check_mark: +1  39 :zzz: ±0  0 :x: ±0 

Results for commit f63c31da. ± Comparison against base commit 549cc207.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Aug 22 '24 08:08 github-actions[bot]

Test results on JDK 8

   84 files  ±0     84 suites  ±0   18m 18s :stopwatch: - 5m 14s 2 513 tests +1  2 469 :white_check_mark: +1  44 :zzz: ±0  0 :x: ±0  2 541 runs  +1  2 497 :white_check_mark: +1  44 :zzz: ±0  0 :x: ±0 

Results for commit f63c31da. ± Comparison against base commit 549cc207.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Aug 22 '24 09:08 github-actions[bot]