def-gthill / lexurgy

A high-powered sound change applier
GNU General Public License v3.0
42 stars 5 forks source link

Drop support for Kotlin/JS #71

Closed def-gthill closed 11 months ago

def-gthill commented 12 months ago

@neta-elad Requesting your review to make sure you're aware of this major change to the project structure. Please make sure you're working off this version if you make more changes to the CLI program, otherwise there will be tricky merge conflicts.

When I first set up the Lexurgy website, I used Kotlin's support for compiling to JavaScript to embed it directly into the website. But this feature was, and still is, experimental, and made maintaining the project increasingly difficult.

With this PR, I'm finally doing away with Kotlin/JS. All future versions of the website will process sound changes by make API calls to a server running Lexurgy on the JVM.

neta-elad commented 12 months ago

I've started looking around. I see that this is mostly deleting the jsMain and jsTest directories and moving jvmMain to main, but there also some small changes here and there that I'm trying to grasp. Do you also have a PR for the lexurgy-web repo? Or a new repo that implements the backend for lexurgy-web? I'm asking because recently I've experimented with Kweb and I think it might be a good fit for the web backend/frontend.

def-gthill commented 12 months ago

Yes, renaming the jvmMain and jvmTest directories is the main change. Some of the small changes are just collapsing the places where the JVM and JS versions had different implementations of something.

Besides that, I've added a ruleNames property to the SoundChanger (which will make it easier to support Start At and Stop Before) and a structured tracing feature (so you can get back JSON objects when tracing instead of just lines of text).

And there was also a change that shouldn't have been in this PR (starting to implement a timeout feature). I've pulled that into a different branch.

The lexurgy-web changes are in the dev branch in the lexurgy-web repo. The backend API is in another repo that's currently private. But I'm thinking it'll actually be better to pull the API stuff into this repo and structure it as a multi-project Gradle build. Then there could be a nice separation of the different components (Lexurgy core, CLI application, API wrapper), while still keeping everything together in the same repo.

Kweb looks interesting and I'll have to keep it in mind. The API is built with Ktor (same thing that Kweb uses), but I'm working on a new frontend in TypeScript/React, which is what I'm more familiar with these days.

neta-elad commented 12 months ago

OK, so I have a few comments here and there but I think this mostly looks great.

I think unifying the repos is the way to go, but I guess you'd want to do that separately from this PR.

The main advantage of using Kweb would be not needing a separate frontend codebase in JS. It would also handle all of the API calls/networking communication automatically (and might be more efficient, since it uses Websockets).

def-gthill commented 11 months ago

OK, so I have a few comments here and there but I think this mostly looks great.

And those comments are...?

I think unifying the repos is the way to go, but I guess you'd want to do that separately from this PR.

Yeah, that'll be a separate PR.

The main advantage of using Kweb...

I've already written a substantial amount in React, so I'm highly reluctant to switch everything over to a different framework, especially one that I just heard about.

neta-elad commented 11 months ago

Yes, makes sense.

I gave my comments in the code itself, doesn't it show them to you?

On Fri, Jul 14, 2023, 07:33 Graham Hill @.***> wrote:

OK, so I have a few comments here and there but I think this mostly looks great.

And those comments are...?

I think unifying the repos is the way to go, but I guess you'd want to do that separately from this PR.

Yeah, that'll be a separate PR.

The main advantage of using Kweb...

I've already written a substantial amount in React, so I'm highly reluctant to switch everything over to a different framework, especially one that I just heard about.

— Reply to this email directly, view it on GitHub https://github.com/def-gthill/lexurgy/pull/71#issuecomment-1635255126, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOS2CGR2S4WEEWVZ4PWATALXQDDZJANCNFSM6AAAAAA2DUXL4U . You are receiving this because you were mentioned.Message ID: @.***>

neta-elad commented 11 months ago

Sorry, forgot to submit my comments up until now!