question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dangerous versioning scheme

See original GitHub issue

Hi!

I’d like to point out a problem with current versioning scheme that I’ve noticed and learned about it the hard way.

A convention that is getting increasingly common in react-native libraries ecosystem is to avoid submitting native code changes in patch updates, leaving it only for minor and major ones.

This is a convention that Expo follows and, as it turns out, react-native-svg is now broken in SDK 35 due to this commit (https://github.com/react-native-community/react-native-svg/commit/c12d66e77923b9d8e5dc99a2fb81a090f0e38129) released in patch 9.9.7

It is not only a problem with Expo, but with any app using CodePush that would also break if it was pinned to a version with ^ or even ~ and somebody would publish an OTA update after yarning.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
msandcommented, Oct 22, 2019

Then again, if expo allows you to choose react-native-svg version, then they should specify what versions are supported on what sdk, or tell you to build the native bundle yourself. Codepush should have all native dependency versions strictly locked such that you only publish js for the exact version of native deps used. This sounds more like a misconfiguration issue than anything else. The native api isn’t promised to stay the same even for patch version changes, only the public api is promised to stay the same / become more spec conformant.

1reaction
msandcommented, Oct 22, 2019

Thanks for pointing this out, haven’t noticed or read about this convention anywhere yet, but makes sense in e.g. the expo and codepush use cases for sure. I think minor versions aren’t very fitting for this, if it’s supposed to communicate that any native code has changes, we should probably stick to major versions, although this will likely make the major version change almost monthly/weekly. Not sure what would be best practise in reality here. Would almost need to split into two modules and have peer dependencies defined.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Semantic Versioning 2.0.0 | Semantic Versioning
We call this system “Semantic Versioning.” Under this scheme, version numbers and the way they change convey meaning about the underlying code and...
Read more >
SemVer Considered Harmful | Joey Lynch's Site
I believe that this versioning scheme, in practice, is problematic and creates a large amount of pain in our industry.
Read more >
Semantic Versioning Considered Harmful | by Graeme - Medium
I think the semantic versioning system (used in NPM, etc.) is bad and promotes bad software management practices. If you don't know what…...
Read more >
Is It Dangerous to Use Version Control Histories to Study ...
Researchers use file-based Version Control System (VCS) as the primary source of code evolution data. VCSs are widely used by.
Read more >
Major Version Numbers are Not Sacred - Tom Preston-Werner
There is a real danger in saving up all your significant changes and releasing them in one whopping major version once a year....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found