diff options
| author | Sho Sakuma <me@m1sk9.dev> | 2026-08-02 19:10:46 +0900 |
|---|---|---|
| committer | Sho Sakuma <me@m1sk9.dev> | 2026-08-02 19:10:56 +0900 |
| commit | bc0d7d522e169f3eeb8d5b632ee673392060694b (patch) | |
| tree | 3cd616cc96904964a20bab267dc5112ba4719d6d /platform-velocity | |
| parent | 1dd2787059331db57049cb1dac8a38ceea859992 (diff) | |
| download | LunaticChat-bc0d7d522e169f3eeb8d5b632ee673392060694b.tar.gz LunaticChat-bc0d7d522e169f3eeb8d5b632ee673392060694b.tar.bz2 LunaticChat-bc0d7d522e169f3eeb8d5b632ee673392060694b.zip | |
refactor: remove code that no production path reaches
These were all scaffolding that drifted out of use, and each one costs
a reader time before they discover it does nothing:
- UUIDASStringSerializer duplicated UUIDSerializer byte for byte; the
differing descriptor name never reaches the JSON/YAML wire format, so
the choice between them was a coin flip for contributors.
- Velocity's BuildInfo was never referenced (the plugin reads its version
from PluginContainer) and read a "commit" property the build never
wrote, so it would have reported "unknown" had anyone called it.
- KanaConverter.TrieNode.Leaf is never constructed: buildTrie starts from
a Branch and insert only ever returns Branch. Six branches guarded
against a state the type system allowed but the code could not produce.
With those gone, isValidRomaji and toHiragana were visibly the same
trie walk, so they now share one longestMatch.
- @Deprecated command handling had no annotated command to act on.
- The settings backup restore looked for *.backup.* files that nothing in
the repository writes, so it always fell through to empty settings.
Also drops CommandContext.replyWithEvent/replyPlain, PluginCoroutineScope's
unused plugin parameter, GitHubRelease fields no caller reads, and four
language keys with no lookup site.
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'platform-velocity')
3 files changed, 0 insertions, 29 deletions
diff --git a/platform-velocity/build.gradle.kts b/platform-velocity/build.gradle.kts index 3cd8c2d..65bd27f 100644 --- a/platform-velocity/build.gradle.kts +++ b/platform-velocity/build.gradle.kts @@ -57,9 +57,6 @@ tasks { filesMatching("velocity-plugin.json") { expand(props) } - filesMatching("build-info.properties") { - expand(props) - } } build { diff --git a/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/BuildInfo.kt b/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/BuildInfo.kt deleted file mode 100644 index 1cb13d4..0000000 --- a/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/BuildInfo.kt +++ /dev/null @@ -1,23 +0,0 @@ -package dev.m1sk9.lunaticChat.velocity - -import java.util.Properties - -object BuildInfo { - val version: String - val commitHash: String - val channel: String - - init { - val props = Properties() - BuildInfo::class.java.getResourceAsStream("/build-info.properties")?.use { - props.load(it) - } - version = props.getProperty("version", "unknown") - commitHash = props.getProperty("commit", "unknown") - channel = props.getProperty("channel", "stable") - } - - val isNightly: Boolean get() = channel == "nightly" - - fun versionWithCommit(): String = "$version ($commitHash)" -} diff --git a/platform-velocity/src/main/resources/build-info.properties b/platform-velocity/src/main/resources/build-info.properties deleted file mode 100644 index 1f8dbc2..0000000 --- a/platform-velocity/src/main/resources/build-info.properties +++ /dev/null @@ -1,3 +0,0 @@ -version=${version} -commit=${gitCommitHash} -channel=${channel} |
