Repository navigation
Expose the :core file helpers an app that syncs needs; align foldCase - #71
Merged
Merged
Conversation
…the sync library MarkNotes Plus now hosts the sync engine that used to live in :core. Its base-copy store and its crash-recovery tests call three :core helpers that were `internal`, which they cannot do from another module: - `renameCaseFile`: the no-replace rename that keeps the exact case and the file identity. - `writeNewFile` and `NewFileStage`: the create-only write and its crash checkpoints. They become public, with documentation. No behaviour change. `foldCase` also differed from the sync library's case folding for three characters whose simple foldings were added in Unicode 15.1 (U+1FD3, U+1FE3, U+FB05): the JVM's upper-then-lower mapping puts them in a different equivalence class than the library, so a rename between such names was "case only" for one and not for the other. They are folded explicitly now and covered by `CaseFoldingTest`. Only the classes must agree, not the keys (the library folds Cherokee to upper case, the JVM to lower case); a test in Plus compares the classes over the whole Unicode range. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MarkNotes Plus now hosts the sync engine that used to live in
:core(after #66). Moving it exposed three:corehelpers that wereinternaland are needed from another module:renameCaseFile: the no-replace rename that keeps the exact case and the file identity (used by the sync base-copy store).writeNewFileandNewFileStage: the create-only write and its crash checkpoints (used by Plus's crash-recovery tests).They become public and documented. No behaviour change.
While checking that the moved code and
foldCaseagree, a test comparing the two over the whole Unicode range found three characters that fall into different case-equivalence classes: U+1FD3, U+1FE3 and U+FB05 (simple foldings added in Unicode 15.1, which the JVM's upper-then-lower mapping lacks). A rename between such names was "case only" for the sync library but not forfoldCase. They are now folded explicitly (to U+0390, U+03B0 and U+FB06) and covered byCaseFoldingTest. Only the classes have to agree, not the keys (the library folds Cherokee to upper case, the JVM to lower case); the doc comment says so.Parity impact
SyncHooks,:coreor:app-sharedAPI used by MarkNotes Plus:renameCaseFile,writeNewFileandNewFileStageincore.notesbecome public (additive). Plus needs a libre release with this to bump to;foldCasechanges only for the three characters above.Checklist
./gradlew :core:test :core:ktlintCheck detektpasses locally. Not run:lintDebug,testDebugUnitTest,assembleDebug(no Android SDK on this machine; CI runs them).🤖 Generated with Claude Code