kiranandcode / petrol

Petrol's an OCaml SQL API made to go FAST.
https://gopiandcode.github.io/petrol/petrol/index.html
Other
109 stars 6 forks source link

Update opam package #10

Open sam-huckaby opened 1 year ago

sam-huckaby commented 1 year ago

Hello! I'm incredibly new to OCaml so if anything I've said here is completely wrong I apologize in advance.

I recently started using Petrol and was having trouble with the join alias not being applied in my project, even though it appeared that I was on the latest version (1.2.0 according to opam). I looked through the tags and it appears that there is newer versions (up to 1.2.3?) which do not show up in opam.

So I cloned and built the repo by hand to see if that fixed things and it does. It seems as though the version of Petrol being served by opam is out of date.

You may already know this, so feel free to close this issue if that's the case, I just wanted to bring it to your attention if not.

joshdcuneo commented 9 months ago

Hey. In the meantime it worked for me to pin the version of petrol to this repository like this:

opam-version: "2.0"

depends: [
  "ocaml" {>= "4.08.0"}
  "caqti-driver-sqlite3" {>= "1.7.0"}
  "dream" {>= "1.0.0~alpha5"}
  "dream-html" {>= "2.0.0"}
  "petrol" {>= "1.2.0"}
  "dune" {>= "2.0.0"}
]

pin-depends: [
  ["petrol.dev" "git+https://github.com/Gopiandcode/petrol.git"]
]

Then running the following commands to upgrade to the pinned version:

opam install . --deps-only
opam upgrade petrol

Not sure if all those steps are required or this is the ideal solution but it seems to work.