oyvindberg / typo

Typed Postgresql integration for Scala. Hopes to avoid typos
https://oyvindberg.github.io/typo/
MIT License
99 stars 9 forks source link

sbt plugin #52

Open oyvindberg opened 10 months ago

kolemannix commented 1 month ago

For what it's worth, I had an sbt task working but apparently it depended on the Scala 2.12 copy of typo (I added typo as a meta-build dependency in project/build.sbt) but now that it's not published for 2.12 this approach does not work. I'm sure a plugin could get around this but it seems that the SBT meta-project itself runs in Scala 2.12 still.

oyvindberg commented 1 month ago

Hey that's great!

I added support for 2.12 in typo originally precisely to support this case. An sbt plugin was a logical thing to do. I haven't gotten around to it myself, and I removed support for 2.12 in #92 because it was a drain on my resources to compile everything for 2.12 - there is a lot of test code to compile, and a full test run must compile (number of libraries, 3) * scala versions (was 3, now 2).

However, there is an easy way out. Let's say that typo itself is published for 2.12, but the resulting generated code only works for 2.13+. This is likely a 5 minute job to copy some compatibility code back in and publish 👍

oyvindberg commented 1 month ago

I'm adding the port to 2.12 again in #127 .

kolemannix commented 1 month ago

Hey, great! Will polish my task up and at least post a gist; obviously it needs to be converted from a task to a plugin and some thought given to its sbt API