pmix / pmix-abi

PMIx Headers for ABI Compatibility
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Add const to string parameters not meant to be modified. #13

Closed raffenet closed 1 year ago

raffenet commented 1 year ago

See pmix/pmix-standard#426 and pmix/pmix-standard#430.

Signed-off-by: Ken Raffenetti raffenet@mcs.anl.gov

raffenet commented 1 year ago

This is only to be merged once https://github.com/pmix/pmix-standard/pull/430 has been accepted.

rhc54 commented 1 year ago

Question for you - kinda came to mind as I was working on all these macro-to-function conversions (turns out there are a lot of them!). Would it make sense to write some kind of script (Python or other) that can update the ABI file for us? Pros would include updates like the one that will be required for this conversion project - make it far less painful. Cons would include that someone would have to write it, and most of the time there are relatively small additions/mods to be done.

In terms of writing the script, I already have to do it for the OpenPMIx ABI since it is an extension of what we have here. I have a Python script that does most of it already (used to generate the Python bindings), so it isn't too hard to extend for this purpose. Of course, it works off of the header files and not the Standard itself - that would require someone write a custom script that could work from the doc. The headers are extensions of the Standard, so we'd either have to agree to split them (maybe have pmix.h and pmix_extensions.h?) or use the EXCEPTIONS file to provide a filter.

Just a thought - make any sense? Ralph

raffenet commented 1 year ago

A script to update the ABI repo using the standard document as source would be a great thing to have. Not only would it be useful to avoid manual errors, but we could integrate it into a CI job to flag updates and/or breakages for maintainers on each PR.

raffenet commented 1 year ago

https://github.com/pmix/pmix-standard/pull/430 is merged, so this is good to go.