[PROJ] Bumping SONAME for PROJ 9.2 for changes in PJ_LOG_LEVEL ?

Even Rouault even.rouault at spatialys.com
Thu Jan 5 07:27:50 PST 2023


Hi,

asking feedback of the PSC regarding a point of 
https://github.com/OSGeo/PROJ/pull/3535

I've added a new PJ_LOG_WARNING level in the public PJ_LOG_LEVEL 
enumeration. Ideally this level should be between PJ_LOG_ERROR and 
PJ_LOG_DEBUG, but the first is assigned integer value 1 and the later 2. 
So there's no room to make it fit naturally

In the current state of the PR, I've allocated PJ_LOG_WARNING=10, and 
added an helper function that enables to logically compare log levels. 
But I recognize that's a bit convoluted.

I'd be leaning towards the following: for PROJ 9.2, modify PJ_LOG_LEVEL 
as below (letting some space if the need for new values arise in the 
future), and bump the SONAME version number from 25 to 26 to acknowledge 
the ABI breakage (but keep the PROJ 9.2 "user" version number to reflect 
this is mostly a transparent change that shouldn't require more than 
rebuilding software against modified proj.h)

typedef enum PJ_LOG_LEVEL {
     PJ_LOG_NONE  = 0,
     PJ_LOG_ERROR = 10,
     PJ_LOG_WARNING = 20,
     PJ_LOG_DEBUG = 30,
     PJ_LOG_TRACE = 40,
     PJ_LOG_TELL  = 50,
     PJ_LOG_DEBUG_MAJOR = PJ_LOG_DEBUG, /* for proj_api.h compatibility */
     PJ_LOG_DEBUG_MINOR = PJ_LOG_TRACE  /* for proj_api.h compatibility */
} PJ_LOG_LEVEL;

(Just realizing that some command line utilities, like cct that can take 
-v, -vv, -vvv to adjust the verbosity level will have to be adjusted as 
there will no longer be a direct mapping between the number of 
repetitions and the value of PJ_LOG_LEVEL, but that's OK)

Even

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the PROJ mailing list