Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues related to API and backwards compatibility #2860

Closed
PaulWessel opened this issue Mar 7, 2020 · 2 comments · Fixed by #2861
Closed

Issues related to API and backwards compatibility #2860

PaulWessel opened this issue Mar 7, 2020 · 2 comments · Fixed by #2861

Comments

@PaulWessel
Copy link
Member

Description of the desired feature

We made some changes to the API after it was first introduced in 5. To avoid any backwards compatibility issues we added code like this, e.g. at the end of the struct GMT_DATASEGMENT definition:

#ifdef GMT_BACKWARDS_API
	double **coord;
#endif

since we had briefly used the variable coord for what we now uniformity call data. There are a few like that in gmt_resources.h. I do not know if there are anyone whose code would break if we removed this. However, for 6.x there may be new things that requires a backwards compatibility. The GMT_STR16 (value 16) was a dumb name and I will need to increase it to 32 and introduce a new constant called GMT_VF_LEN = 32 instead. The GMT_STR16 will be kept but set to 32 as well.

Question: Perhaps GMT_BACKWARDS_API need to be more version-specific. Maybe it should be GMT_API_V5 and my new change could go under GMT_API_V6.0 or something?

@joa-quim
Copy link
Member

joa-quim commented Mar 8, 2020

I think we should not worry much with backward compat for the API. One thing is to try to maintain backward compatibility with all those GMT4ever guy's scripts. Another thing is the API. By going to a major version number change all programmers should know that compatibility issues may arise. It's the SEMVER law.

@seisman
Copy link
Member

seisman commented Mar 8, 2020

By going to a major version number change all programmers should know that compatibility issues may arise. It's the SEMVER law.

Totally agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants