Closed def-gthill closed 10 months ago
I moved all the SC API files into their own package, and also renamed services
to api
, which better describes what it's actually for.
I understand wanting to share those data classes, but at this point I think it would be a mistake. The way I've carved out the core
project, it has a clear, narrow purpose: take in sound change rules and input words, send back output words and/or error messages. It has no business getting involved with JSON serialization. If we want to extend the CLI server mode contract to include RuleFailure
and TraceStep
structures, we can copy the definitions over. Yes, that means there's a bit of code duplication, but duplication is better than unnecessary coupling.
Yeah, on second thought I agree.
This restructures the project as a multi-project Gradle build. The three projects are:
core
: the mechanics of interpreting the sound change DSL and applying the sound changes to words.cli
: the command-line interface.api
: the new HTTP API used by the web app.