hypertidy/PROJ

the lib version landscape

Closed this issue · 0 comments

I made a bit of a mess of this, but I think it's right now. When the package tests it spits out a message of either the lib version found or "no lib found". (I had also made a mess with pkg-config on my machine so that made my confusion worse).

"no lib found" really means the version of PROJ itself must be >=6

This is tested traditionally by finding proj.h, but that was also avaliable in PROJ 5 so I added a autoconf check lib for proj_as_wkt which was introduced in 6.

Whether not supporting version 5 or earlier is a good idea is up for question, but my original logic was to fall back to proj4 for downstream packages and let {PROJ} be obstinately proj.h and version >=6 only. (proj4 now works with any lib version so that's kind of moot, but it doesn't support 3D coords and I think it would be hard to get changes there)

The logic includes the requirement that {PROJ} still install but be non-functional, so that downstream packages can depend on it safely, but simply fall back to proj4 as a last resort (is that better than allowing multiple engine choices like crs2crs, or than vendoring in a specific version like libproj ... it's just different and reflects what I considered possible when I started).

So this means that that ci testing should show

  • no proj available, ok_proj6() == FALSE we install but not functional
  • proj 4 or 5 availalable, ok_proj6() == FALSE we install but not functional
  • proj 6, 7, or 8 available, ok_proj6() == TRUE we are functional and pass all tests (with autotools build)
  • proj 9+ available, ok_proj6() == TRUE we are functional and pass all tests (with cmake build)

For no proj or version 4 or 5 it's a bit weird that R check passes, but that's what I want. There's probably a better way :0

I've separated the no proj, 4, 5 and the v6+ autotools and the cmake builds as separate ghactions because I couldn't otherwise get it working.

I don't specifically know if 6.3.1 is actually required, but I've left it there in System Deps. We can go into the ghactions output and in check click "Show testthat output" and see the version found, or not found:

image

image

I'm still only really looking at linux, so there's stuff to flush out for windows and macos possibly.

ping @anthonynorth