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

Add article about BC breaks #730

Closed
wants to merge 10 commits into from
Closed

Conversation

matks
Copy link
Contributor

@matks matks commented Jun 18, 2020

This article explains what exactly are Backward Compatibility Breaks also known as Breaking Changes or BC breaks and how it influences how an open source project like PrestaShop is built. It explains the different types of BC breaks, why they are needed sometimes and how PrestaShop maintainers manage them.

Fixes #704

@matks matks force-pushed the article-bc-break branch 2 times, most recently from 712fc81 to 622b5a4 Compare June 18, 2020 16:02
@matks
Copy link
Contributor Author

matks commented Jun 20, 2020

I should improve this article

  • quote some usecases of BC breaks done by PrestaShop as examples
  • explain it makes it hard for module/theme developers to have big compatibility range
  • explain dependency BC break related to compatibility drop and it becomes an issue with release lifecycles accelerating

@matks
Copy link
Contributor Author

matks commented Jun 23, 2020

I should mention "adding a new argument in __construct()" as a typical BC break

@matks
Copy link
Contributor Author

matks commented Jun 23, 2020

I need to make sure SQL tables are displayed correctly.

@matks matks changed the title Add article about BC breaks WIP / Add article about BC breaks Jun 24, 2020
@matks matks added the WIP Work in progress label Jun 24, 2020
@matks matks changed the title WIP / Add article about BC breaks Add article about BC breaks Jun 25, 2020
@matks matks removed the WIP Work in progress label Jun 25, 2020
@matks
Copy link
Contributor Author

matks commented Jun 25, 2020

Article is complete from my point of view 😄 I await reviews.

Copy link
Contributor

@Progi1984 Progi1984 left a comment

Choose a reason for hiding this comment

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

Beautiful

Copy link
Contributor

@ttoine ttoine left a comment

Choose a reason for hiding this comment

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

great article.

news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved
matks and others added 2 commits July 9, 2020 11:47
Co-authored-by: Antoine THOMAS <antoine.thomas@prestashop.com>
Co-authored-by: Antoine THOMAS <antoine.thomas@prestashop.com>
@matks
Copy link
Contributor Author

matks commented Jul 9, 2020

Applied @ttoine feedbacks.
Waiting for @eternoendless feedback because we all know he is the one who writes the best in English from us all

Copy link
Contributor

@matthieu-rolland matthieu-rolland left a comment

Choose a reason for hiding this comment

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

A small feedback, your article is very informative (even for me as a core developer) and well written, well done 👍

news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved

## A deeper look at Backward Compatibility Breaks

This article explains what exactly are [Backward Compatibility](https://en.wikipedia.org/wiki/Backward_compatibility) Breaks also known as Breaking Changes or BC breaks and how it influences how an open source project like PrestaShop is built. It explains the different types of BC breaks, why they are needed sometimes and how PrestaShop maintainers manage them.
Copy link
Member

Choose a reason for hiding this comment

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

also known as Breaking Changes or BC

Did you realize we often use the same acronym differently?

  • BC = Breaking change
  • BC Break = Backwards Compatibility Break

I think this should be explained

Copy link
Member

@eternoendless eternoendless left a comment

Choose a reason for hiding this comment

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

Haven't finished reading it yet but I have some comments

news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved

All of these people will use code and logic that is written inside the software. For exammple, very often modules build URLs using function `Link::getModuleLink()`.

However, as time passes, new versions of the software are released and this code and logic are changed to be improved, upgraded, made faster or more secure. When, from one version to another, the code changes in a way that breaks the "external code" that has been built around it, this is a Breaking Change.
Copy link
Member

Choose a reason for hiding this comment

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

To me this is an inaccurate description of a breaking change. Formally, a breaking change relates to API changes, not code breaking. This is a subtle yet extremely important difference, as vendors can only be accountable for their contracts, not for the entirety of their public code. If your code breaks because you used an internal class from upstream, of because you relied on side effects that don't belong to the library's API, you can't blame the vendor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This means I need to introduce the concept "dependency as an API" then explain" SemVer & API contract" before being able to explain this. It's going to make this article longer although it's already quite big. Is it alright ?

news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved
news/_posts/2020-06-18-about-bc-breaks.md Outdated Show resolved Hide resolved

The concept of BC Break is not specific to PrestaShop. This is actually a very common issue for all code that is being used as a foundation for other software to use: operating systems like Linux, libraries like Guzzle, tools like cURL, frameworks like Symfony ... and CMS like Drupal or PrestaShop.

In order to make it easier for the people using these codebases as foundations to handle these changes, [Tom Preston Werner](http://tom.preston-werner.com/) has invented a convention: [SemVer](https://semver.org/). [SemVer](https://semver.org/) aims to help people understand immediately, when seeing a new version of software, what is contained inside it.
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's better to re-explain it for the reader's ease (he does not need to go read something else) but I can refer to the blog post as an external reference.
Wdyt ?

  • remove this and redirect to previous blog post
  • only refer to previous blog post, keep this section content

Co-authored-by: Pablo Borowicz <pablo.borowicz@prestashop.com>
Co-authored-by: Matthieu Rolland <matthieu.rolland@prestashop.com>
@matks
Copy link
Contributor Author

matks commented Jul 13, 2020

@matthieu-rolland @eternoendless Thank you for proof-reading ! I have applied all your feedbacks already.

Here are the left blocking items:

@matks
Copy link
Contributor Author

matks commented Sep 14, 2020

Pfou 😅 I'm trying to introduce concepts such as "What is a dependency ?" "What is an API interface / a contract ?" "What does it mean for a package" and this article is becoming longer and longer.

I might have to split it in 2.

@matks
Copy link
Contributor Author

matks commented Sep 17, 2020

Following @eternoendless feedback I have rewritten this article. Part 1 will be coming soon #777

@matks matks closed this Sep 17, 2020
@matks matks deleted the article-bc-break branch January 11, 2021 09:53
@matks matks restored the article-bc-break branch January 11, 2021 09:53
@matks matks deleted the article-bc-break branch December 18, 2023 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Article idea] Different kinds of Breaking Changes
5 participants