PROJ icon indicating copy to clipboard operation
PROJ copied to clipboard

PROPOSAL: PJ_LOG_WARNING

Open snowman2 opened this issue 1 year ago • 2 comments

Related:

  • #3535
  • https://github.com/pyproj4/pyproj/pull/1227

Mailing List: https://lists.osgeo.org/pipermail/proj/2023-January/010864.html

https://github.com/OSGeo/PROJ/pull/3535#issuecomment-1371319131

To summarize my views:

Adding a new value to an enumeration: not really an ABI change / grey area, doesn't require SONAME bump (we have for example extended recently the PJ_TYPE enumeration to add PJ_TYPE_DERIVED_PROJECTED_CRS) Changing existing values of an enumeration: true ABI change, requires SONAME bump

author: @rouault

Proposed implementation from mailing list:

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;

snowman2 avatar Jan 12 '23 04:01 snowman2

Since pyproj listed the enumeration values (https://github.com/pyproj4/pyproj/pull/1227) will this break anything if the values are changed? If so, it may be worth waiting for PROJ 10. If not, PROJ 9.2 is likely fine.

Side note: I prefer re-numbering the enumeration (as demonstrated above) to adding a new function as was previously added in https://github.com/OSGeo/PROJ/pull/3535. One less thing to maintain both here in PROJ and upstream in GDAL.

snowman2 avatar Jan 12 '23 04:01 snowman2

I prefer re-numbering the enumeration (as demonstrated above) to adding a new function as was previously added in https://github.com/OSGeo/PROJ/pull/3535. One less thing to maintain both here in PROJ and upstream in GDAL.

Yeah, I agree. I think it's better to save this for 10.0.

kbevers avatar Jan 12 '23 08:01 kbevers