Skip to content

Change default API version of functions introduced after global API version #6278

@fortnern

Description

@fortnern

Currently, when setting a global API version, for example with #define H5_USE_16_API, if the application invokes a function that was introduced after that API version (1.6 in the example), the library uses the latest version of that function. We should change it to use the earliest version of that function for maximum compatibility and minimum user headaches. Here is an example:

  1. Version 1.6: Application written.
  2. Version 1.8: Application developers insert #define H5_USE_16_API to maintain compatibility without rewriting their app
  3. Version 1.10: HDF5 introduces H5new_function(), app developers integrate it into their app
  4. Version 1.12: HDF5 versions H5new_function(), splitting it into H5new_function1() and H5new_function2(), with H5new_function() now being a macro that maps to one of the other two. At this point the app no longer works because the H5new_function() defaults to H5new_function2() while the app is coded for H5new_function1()

The proper usage would be to, at step 3, update API usage to version 1.10, since they have already broken compatibility with earlier versions of HDF5 by using H5new_function(). However, we believe there is no downside to making things work by defaulting to H5new_function1() at step 4, and it will help reduce the workload for users of HDF5.

Metadata

Metadata

Assignees

Labels

Component - C LibraryCore C library issues (usually in the src directory)HDFG-internalInternally coded for use by the HDF Group

Type

No type

Projects

Status

In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions