From e126ca679a5175a70bb811706d9bed050000a1c8 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 30 Apr 2026 14:40:15 +0000 Subject: [PATCH] refactor(quartz): move interning classes into nip01Core/cache/interning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Groups EventInterner + InternedEventStore + the platform actuals + the test under a focused interning sub-package. Leaves nip01Core/cache/ as the namespace for cache primitives generally; future cache types (LargeWeakCache, etc.) get sibling sub-packages. Files moved: cache/EventInterner.kt → cache/interning/EventInterner.kt cache/InternedEventStore.kt → cache/interning/InternedEventStore.kt cache/EventInterner.jvmAndroid → cache/interning/EventInterner.jvmAndroid cache/EventInterner.apple → cache/interning/EventInterner.apple cache/EventInterner.linux → cache/interning/EventInterner.linux cache/EventInternerTest.kt → cache/interning/EventInternerTest.kt No consumers to update — the previous decorator refactor already removed the interner from all the store ctors. 7/7 interner + 240/240 store + projection tests still pass. https://claude.ai/code/session_01Jny85MTu1ynKgFBgysfWu5 --- .../nip01Core/cache/{ => interning}/EventInterner.apple.kt | 2 +- .../quartz/nip01Core/cache/{ => interning}/EventInterner.kt | 2 +- .../nip01Core/cache/{ => interning}/InternedEventStore.kt | 2 +- .../nip01Core/cache/{ => interning}/EventInterner.jvmAndroid.kt | 2 +- .../quartz/nip01Core/cache/{ => interning}/EventInternerTest.kt | 2 +- .../nip01Core/cache/{ => interning}/EventInterner.linux.kt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename quartz/src/appleMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/{ => interning}/EventInterner.apple.kt (96%) rename quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/{ => interning}/EventInterner.kt (97%) rename quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/{ => interning}/InternedEventStore.kt (98%) rename quartz/src/jvmAndroid/kotlin/com/vitorpamplona/quartz/nip01Core/cache/{ => interning}/EventInterner.jvmAndroid.kt (98%) rename quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip01Core/cache/{ => interning}/EventInternerTest.kt (98%) rename quartz/src/linuxMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/{ => interning}/EventInterner.linux.kt (96%) diff --git a/quartz/src/appleMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.apple.kt b/quartz/src/appleMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.apple.kt similarity index 96% rename from quartz/src/appleMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.apple.kt rename to quartz/src/appleMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.apple.kt index ba6dc8c40..a28c22be6 100644 --- a/quartz/src/appleMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.apple.kt +++ b/quartz/src/appleMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.apple.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.quartz.nip01Core.cache +package com.vitorpamplona.quartz.nip01Core.cache.interning import com.vitorpamplona.quartz.nip01Core.core.Event import com.vitorpamplona.quartz.nip01Core.core.HexKey diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.kt similarity index 97% rename from quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.kt rename to quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.kt index 1bb309ea9..fe0d02005 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.quartz.nip01Core.cache +package com.vitorpamplona.quartz.nip01Core.cache.interning import com.vitorpamplona.quartz.nip01Core.core.Event import com.vitorpamplona.quartz.nip01Core.core.HexKey diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/InternedEventStore.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/InternedEventStore.kt similarity index 98% rename from quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/InternedEventStore.kt rename to quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/InternedEventStore.kt index db078e1e5..8403bf8ef 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/InternedEventStore.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/InternedEventStore.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.quartz.nip01Core.cache +package com.vitorpamplona.quartz.nip01Core.cache.interning import com.vitorpamplona.quartz.nip01Core.core.Event import com.vitorpamplona.quartz.nip01Core.relay.filters.Filter diff --git a/quartz/src/jvmAndroid/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.jvmAndroid.kt b/quartz/src/jvmAndroid/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.jvmAndroid.kt similarity index 98% rename from quartz/src/jvmAndroid/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.jvmAndroid.kt rename to quartz/src/jvmAndroid/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.jvmAndroid.kt index 447ff393f..d393dd2c1 100644 --- a/quartz/src/jvmAndroid/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.jvmAndroid.kt +++ b/quartz/src/jvmAndroid/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.jvmAndroid.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.quartz.nip01Core.cache +package com.vitorpamplona.quartz.nip01Core.cache.interning import com.vitorpamplona.quartz.nip01Core.core.Event import com.vitorpamplona.quartz.nip01Core.core.HexKey diff --git a/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInternerTest.kt b/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInternerTest.kt similarity index 98% rename from quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInternerTest.kt rename to quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInternerTest.kt index c8eb078d1..efde104d8 100644 --- a/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInternerTest.kt +++ b/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInternerTest.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.quartz.nip01Core.cache +package com.vitorpamplona.quartz.nip01Core.cache.interning import com.vitorpamplona.quartz.nip01Core.core.HexKey import com.vitorpamplona.quartz.nip01Core.core.OptimizedJsonMapper diff --git a/quartz/src/linuxMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.linux.kt b/quartz/src/linuxMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.linux.kt similarity index 96% rename from quartz/src/linuxMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.linux.kt rename to quartz/src/linuxMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.linux.kt index c7f042f37..8c6e6223b 100644 --- a/quartz/src/linuxMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/EventInterner.linux.kt +++ b/quartz/src/linuxMain/kotlin/com/vitorpamplona/quartz/nip01Core/cache/interning/EventInterner.linux.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.quartz.nip01Core.cache +package com.vitorpamplona.quartz.nip01Core.cache.interning import com.vitorpamplona.quartz.nip01Core.core.Event import com.vitorpamplona.quartz.nip01Core.core.HexKey