ragtime icon indicating copy to clipboard operation
ragtime copied to clipboard

Deletion of ragtime.jdbc/load-files breaks ragtime-clj

Open lread opened this issue 1 year ago • 6 comments

Hi @weavejester!

Cljdoc uses ragtime and ragtime-clj.

The ragtime-clj project makes use of ragtime.jdbc/load-files.

ragtime.jdbc/load-files was removed in ragtime 0.10.0 which causes ragtime-clj to fail with No such var: ragtime.jdbc/load-files.

Happy to help if I can. Maybe it's more appropriate to fix in ragtime-clj? Lemme know!

lread avatar Nov 09 '24 12:11 lread

Ah, apologies, I thought that wasn't being used by anyone else.

I think it's probably better to fix in ragtime-clj. The multimethod has been moved to ragtime.sql/load-file-seq, which allows the same method to support both ragtime.jdbc and ragtime.next-jdbc. Since this is a better design than having two identical multimethods doing the same thing, and since we haven't hit 1.0 yet, it's probably best to mark this as a breaking change and fix it in ragtime-clj.

I'll fix the CHANGELOG to make this clearer, too.

weavejester avatar Nov 09 '24 15:11 weavejester

Thanks for the reply! I've raised an issue at ragtime-clj.

lread avatar Nov 09 '24 16:11 lread

@weavejester, if the author of ragtime-clj is no longer active, would you consider addressing #131 to bring clojure migrations into ragtime itself?

lread avatar Nov 14 '24 20:11 lread

By Clojure migrations, you mean migrations that execute arbitrary functions?

weavejester avatar Nov 14 '24 23:11 weavejester

Yep, here's an example cljdoc Clojure migration: https://github.com/cljdoc/cljdoc/blob/master/resources/migrations/010_convert_builds_error_info_from_exception_to_data.clj

Clojure migration should come with a caveat that they should be as self-contained as possible. You probably don't want migration relying on app code that might change, for example.

lread avatar Nov 22 '24 14:11 lread

Hiya @weavejester! I'm guessing ragtime-clj is no longer maintained.

Some options I see:

  1. Incorporate ragtime-clj features into ragtime. Any interest?
  2. Maybe try to have clj-commons adopt ragtime-clj (I maintain some projects at clj-commons, I could handle this one too)
  3. Incorporate ragtime-clj code into cljdoc (the code is small, so totally viable)

Thoughts?

lread avatar Jan 19 '25 15:01 lread