There are two breaking changes in 8.0.0:
| 7.x | 8.0.0 |
|---|---|
IndexingResult.Normal |
IndexingResult.BlockResult |
IndexingResult.EventsOnly |
IndexingResult.LogResult |
Action: Update all when blocks and type checks in your IndexerProcessor.process() implementation:
// Before
override suspend fun process(entry: IndexingResult) {
when (entry) {
is IndexingResult.Normal -> { /* ... */ }
is IndexingResult.EventsOnly -> { /* ... */ }
}
}
// After
override suspend fun process(entry: IndexingResult) {
when (entry) {
is IndexingResult.BlockResult -> { /* ... */ }
is IndexingResult.LogResult -> { /* ... */ }
}
}The properties on each class are unchanged — only the names differ.
The following APIs no longer exist:
| Removed item | Type |
|---|---|
Pruner |
Interface |
Status.PRUNING |
Enum value |
Indexer.pruner |
Property |
IndexerFactory.pruner(Pruner) |
Builder method |
IndexerFactory.prunerInterval(Long) |
Builder method |
Action: Remove all pruner usage from your factory configuration:
// Before
IndexerFactory()
.name("my-indexer")
.thorClient(client)
.processor(processor)
.pruner(myPruner) // remove
.prunerInterval(5000L) // remove
.build()
// After
IndexerFactory()
.name("my-indexer")
.thorClient(client)
.processor(processor)
.build()Action: Delete any classes that implement Pruner.
Action: If you check for Status.PRUNING anywhere (e.g. health checks, monitoring), remove those checks. The valid status values are now: NOT_INITIALISED, INITIALISED, FAST_SYNCING, SYNCING, FULLY_SYNCED, SHUT_DOWN.
If you still need periodic cleanup: implement it as a separate scheduled job outside of the indexer library (e.g. a coroutine timer or Spring @Scheduled method that runs independently).
# Find Pruner references
grep -rn "Pruner" --include="*.kt"
grep -rn "prunerInterval" --include="*.kt"
grep -rn "PRUNING" --include="*.kt"
# Find old IndexingResult names
grep -rn "IndexingResult\.Normal" --include="*.kt"
grep -rn "IndexingResult\.EventsOnly" --include="*.kt"
- Update dependency version to
8.0.0 - Rename
IndexingResult.Normal→IndexingResult.BlockResult - Rename
IndexingResult.EventsOnly→IndexingResult.LogResult - Remove
.pruner(...)calls fromIndexerFactory - Remove
.prunerInterval(...)calls fromIndexerFactory - Delete
Prunerimplementations - Remove
Status.PRUNINGchecks - Build and run tests