Skip to content

INDEV-10502 Adopt backwards compatibility checker - #24

Merged
CMalvika merged 5 commits into
masterfrom
dev/roave-bc
Apr 7, 2022
Merged

INDEV-10502 Adopt backwards compatibility checker#24
CMalvika merged 5 commits into
masterfrom
dev/roave-bc

Conversation

@CMalvika

@CMalvika CMalvika commented Mar 24, 2022

Copy link
Copy Markdown
Contributor

Integrate https://github.com/Roave/BackwardCompatibilityCheck to make versioning determination more trivial.

I find it good where the checker mentions here, what exactly is the bc breaker.
Screenshot 2022-03-25 at 9 38 15 AM

@CMalvika
CMalvika requested a review from lstrojny March 24, 2022 08:40

@lstrojny lstrojny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need the if: matrix.php-version > 7.1 conditions anywhere that’s just the default or am I missing something?

@lstrojny

Copy link
Copy Markdown
Contributor

Now that the setup works, did you try to push a change that would break BC? Also if you break BC, how you tell the tool that your next version is going to take that into account?

@CMalvika

Copy link
Copy Markdown
Contributor Author

You shouldn't need the if: matrix.php-version > 7.1 conditions anywhere that’s just the default or am I missing something?

InterNations/SolrUtils#12 (comment)
For BC checker version 1.0.0 doesn't support php 7.1. That breaks on Install composer dependencies. So i am not sure if this is the right way to do it. Just until i remove all the dead php versions.

@CMalvika

Copy link
Copy Markdown
Contributor Author

Now that the setup works, did you try to push a change that would break BC? Also if you break BC, how you tell the tool that your next version is going to take that into account?

Yes, i did. I tried to commit locally something and did run BC checker which failed. I shall post a screenshot soon.

@CMalvika
CMalvika requested a review from lstrojny March 25, 2022 08:40
@lstrojny

Copy link
Copy Markdown
Contributor

Nice! Really good stuff! In the context of CI, let's say the build fails but you need to break BC, how do you acknowledge that your next version is going to be a major version?

@CMalvika

CMalvika commented Mar 25, 2022

Copy link
Copy Markdown
Contributor Author

Nice! Really good stuff! In the context of CI, let's say the build fails but you need to break BC, how do you acknowledge that your next version is going to be a major version?

So, if I've understood it correctly!

  • If we are breaking BC intentionally, we know that already and also git hub action should tell me that it's broken with each commit, and we go for major version change.
  • If we do not want to break BC but git hub action tells me that it's broken, then i go and check what went wrong.

Is there anything else am I still missing?

@lstrojny

Copy link
Copy Markdown
Contributor

I hoped there would be a way to tell the backwards compatibility checker "hey, I know I am breaking BC and my next version is going to be a major version because of that so shut up"

@lstrojny

Copy link
Copy Markdown
Contributor

If that’s not possible, I would recommend having a single job that only does Compatibility Checker so that it’s easy to spot if your tests are failing or if you need to bump the version.

@CMalvika

Copy link
Copy Markdown
Contributor Author

I hoped there would be a way to tell the backward compatibility checker "hey, I know I am breaking BC and my next version is going to be a major version because of that so shut up"

So, what i always assume after reading this from their README guide is,

"This will automatically detect the last minor version tagged, and compare the API against the current HEAD. If any BC breaks are found, the tool returns a non-zero status, which on most CI systems will cause the build to fail."

Also, this is not configurable, so i guess it will keep throwing an error until we go for a major version.

@CMalvika

Copy link
Copy Markdown
Contributor Author

If that’s not possible, I would recommend having a single job that only does Compatibility Checker so that it’s easy to spot if your tests are failing or if you need to bump the version.

I trying adding a single job in this SolrUtils PR: https://github.com/InterNations/SolrUtils/pull/12/files
Is this what you mean? Also, I do not understand why would you recommend a single job for the checker?

@CMalvika
CMalvika merged commit fa85f9a into master Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants