SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Comparing semantic versioning practices
in Cargo, npm, Packagist and Rubygems
@tom_mens
www.linkedin.com/in/tommens
www.slideshare.net/TomMens
SECO-ASSIST
Belgian
Research Project
"Excellence of Science”
secoassist.github.io
@secoassist
Empirical research
on packaging ecosystems
On the impact of security vulnerabilities in the npm package dependency network
Decan, Mens, Constantinou – MSR 2018 – https://doi.org/10.1145/3196398.3196401
On the evolution of technical lag in the npm package dependency network
Decan, Mens, Constantinou – ICSME 2018 – https://doi.org/10.1109/ICSME.2018.00050
An empirical comparison of dependency network evolution in seven software packaging ecosystems
Decan, Mens, Grosjean – Empirical Software Engineering Journal 2019 – https://doi.org/10.1007/s10664-017-9589-y
What do package dependencies tell us about semantic versioning?
Decan, Mens – IEEE Transactions on Software Engineering 2019 – https://doi.org/10.1109/TSE.2019.2918315
Lost in zero space – An empirical comparison of 0.y.z releases in software packaging distributions
Decan, Mens – Science of Computer Programming 2021 – https://doi.org/10.1016/j.scico.2021.102656
Back to the past – Analysing backporting practices in package dependency networks
Decan, Mens, Zerouali, De Roover – IEEE Trans. Software Engineering 2021 – https://doi.org/10.1109/TSE.2021.3112204
Semantic
Versioning
https://semver.org
major minor patch
3 9 2
Breaking
changes
Backwards
compatible
changes
Bug fixes
recommended to respect
semantic versioning
Dependency
Constraints
https://semver.org
major minor patch
3 9 2
Breaking
changes
Backwards
compatible
changes
Bug fixes
Most
permissive
Most
Restrictive
Outdated
Dependencies
• 1 out of 3 packages never update their dependency
• Outdatedness is related to the type of dependency constraint being used
Strict constraints represent
about 33% of all outdated dependencies
Outdated
runtime dependencies
By making dependency constraints “semver-compliant”
the proportion of outdated releases might be reduced by >17%
“What if …” analysis:
Outdated
Dependencies
semver
in package distributions
Different package distributions interpret
dependency constraints in different ways
More restrictive than semver
More permissive than semver
What do package dependencies tell us of semantic versioning?
A Decan, T Mens (2019) IEEE Transactions on Software Engineering
semver compliant
semver
in package distributions
To which extent do package distributions adhere to semver?
All considered distributions become more semver-compliant over time.
mostly semver-compliant
>16% of restrictive dependency constraints,
preventing automatic adoption of backward compatible upgrades
semver
in package distributions
To which extent do package distributions adhere to semver?
The RubyGems team urges gem developers to follow the
semantic versioning standard for their gem’s versions. The
RubyGems library itself does not enforce a strict versioning
policy, but using an “irrational” policy will only be a disservice to
those in the community who use your gems.
https://guides.rubygems.org/patterns/
Cargo package
serde
Packagist package
mage2pro/core
npm package
react-scripts
Rubygems package
rails
Wisdom
of the Crowds
Maintainers of dependent packages should look at how other packages
depend on a required package to decide which version constraint to use.
Distribution of dependency constraint types of dependent packages
compliant
1
permissive
50
compliant
575
restrictive
17
compliant
1
restrictive
56
compliant
288
permissive
506
restrictive
203
Summary
so far
Semver reduces outdatedness
Distribution-specific semver rules are confusing
Package distributions become more semver-compliant over time
Maintainers of dependent packages could use “wisdom of the crowds”
to decide which version constraint to use for their dependencies
What about
major version zero?
“Major version zero (0.y.z) is for initial development. Anything MAY
change at any time. The public API SHOULD NOT be considered stable.”
https://semver.org
More permissive than semver !
Constraint Cargo npm Packagist
~0.2.3 [0.2.3, 0.3.0[ [0.2.3, 0.3.0[ [0.2.3, 0.3.0[
^0.2.3 [0.2.3, 0.3.0[ [0.2.3, 0.3.0[ [0.2.3, 0.3.0[
youtu.be/b1U4YefW24Q
proportion of dependency constraints to 0.y.z
accepting at most patches or minor releases
What about
major version zero?
^ constraint is misleading: it behaves differently for 0.y.z releases
Constraint Cargo npm Packagist
^1.2.3 [1.2.3, 2.0.0[ [1.2.3, 2.0.0[ [1.2.3, 2.0.0[
^0.2.3 [0.2.3, 0.3.0[ [0.2.3, 0.3.0[ [0.2.3, 0.3.0[
only 0.y.z
only 0.y.z
only 0.y.z
only 0.y.z
both
both
both
both
only >= 1.0.0
only >= 1.0.0
only >= 1.0.0
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Cargo
RubyGems
npm
Packagist
Stuck
in zero space?
Proportion of packages having release in a given version range
A minority of 0.y.z packages
ever crosses the 1.0.0 barrier
0.0.0
0.0.0
0.0.0
0.0.0
0.0.1
0.0.1
0.0.1
0.0.1
0.1.0
0.1.0
0.1.0
0.1.0
1.0.0
1.0.0
1.0.0
1.0.0
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Cargo
RubyGems
npm
Packagist
Stuck
in zero space?
Proportion of packages created in 2019, by version number
96.3%
84.9%
44.3%
35.0%
impact of
0.1.0 default
Monthly proportion of 0.y.z releases
Abundance
of 0.y.z releases
The release policies of Cargo and
RubyGems should be adapted
to incite package maintainers
to move out of the zero
version space sooner.
Can 0.y.z
releases be trusted?
FOSDEM 2021 – Lost in ZeroSpace
0.18
Would you trust depending on a
package with major version 0?
No
6%
Only if there
is no
alternative
19%
Only after
checking
41%
Sure
34%
Can 0.y.z
releases be trusted?
FOSDEM 2021 – Lost in ZeroSpace
0.19
Distributions of the number of dependent packages
for required 0.y.z and ≥1.0.0 packages.
Psychological 1.0.0 barrier is mostly artificial:
• Many dependent ≥1.0.0 packages rely on
0.y.z packages.
• Many 0.y.z packages
are required by ≥1.0.0 packages.
• Little practical difference between 0.y.z and
≥1.0.0 packages
Major version zero does not imply initial development.
Move out of zero space as soon as package is production-ready.
« if your software is used in production, it should probably already be 1.0.0 »
« if you have a stable API on which users have come to depend, you should be 1.0.0 »

Weitere ähnliche Inhalte

Ähnlich wie Comparing semantic versioning practices in Cargo, npm, Packagist and Rubygems

Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)
Tom Mens
 
Empirically Analysing the Socio-Technical Health of Software Package Managers
Empirically Analysing the Socio-Technical Health of Software Package ManagersEmpirically Analysing the Socio-Technical Health of Software Package Managers
Empirically Analysing the Socio-Technical Health of Software Package Managers
Tom Mens
 
Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017
Amazon Web Services
 

Ähnlich wie Comparing semantic versioning practices in Cargo, npm, Packagist and Rubygems (20)

Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)
 
FOSDEM 2020 Presentation: Comparing dependency management issues across packa...
FOSDEM 2020 Presentation: Comparing dependency management issues across packa...FOSDEM 2020 Presentation: Comparing dependency management issues across packa...
FOSDEM 2020 Presentation: Comparing dependency management issues across packa...
 
Towards Laws of Software Ecosystem Evolution: An Empirical Comparison of Seve...
Towards Laws of Software Ecosystem Evolution: An Empirical Comparison of Seve...Towards Laws of Software Ecosystem Evolution: An Empirical Comparison of Seve...
Towards Laws of Software Ecosystem Evolution: An Empirical Comparison of Seve...
 
Empirically Analysing the Socio-Technical Health of Software Package Managers
Empirically Analysing the Socio-Technical Health of Software Package ManagersEmpirically Analysing the Socio-Technical Health of Software Package Managers
Empirically Analysing the Socio-Technical Health of Software Package Managers
 
On the Impact of Security Vulnerabilities in the npm and RubyGems Dependency ...
On the Impact of Security Vulnerabilities in the npm and RubyGems Dependency ...On the Impact of Security Vulnerabilities in the npm and RubyGems Dependency ...
On the Impact of Security Vulnerabilities in the npm and RubyGems Dependency ...
 
Black Clouds and Silver Linings in Node.js Security - Liran Tal Snyk OWASP Gl...
Black Clouds and Silver Linings in Node.js Security - Liran Tal Snyk OWASP Gl...Black Clouds and Silver Linings in Node.js Security - Liran Tal Snyk OWASP Gl...
Black Clouds and Silver Linings in Node.js Security - Liran Tal Snyk OWASP Gl...
 
Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017
 
On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...
On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...
On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...
 
A Developer’s Guide to Kubernetes Security
A Developer’s Guide to Kubernetes SecurityA Developer’s Guide to Kubernetes Security
A Developer’s Guide to Kubernetes Security
 
Canister
Canister Canister
Canister
 
Container Orchestration with Amazon ECS
Container Orchestration with Amazon ECSContainer Orchestration with Amazon ECS
Container Orchestration with Amazon ECS
 
Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017
Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017
Building and Scaling a Containerized Microservice - DevDay Los Angeles 2017
 
How to use mtr 2
How to use mtr 2How to use mtr 2
How to use mtr 2
 
FASTEN: Scaling static analyses to ecosystem, presented at FOSDEM 2020 in Bru...
FASTEN: Scaling static analyses to ecosystem, presented at FOSDEM 2020 in Bru...FASTEN: Scaling static analyses to ecosystem, presented at FOSDEM 2020 in Bru...
FASTEN: Scaling static analyses to ecosystem, presented at FOSDEM 2020 in Bru...
 
Node.js security tour
Node.js security tourNode.js security tour
Node.js security tour
 
Nido
NidoNido
Nido
 
M.E Computer Science Secure Computing Projects
M.E Computer Science Secure Computing ProjectsM.E Computer Science Secure Computing Projects
M.E Computer Science Secure Computing Projects
 
Privacy-Preserving and Truthful Detection of Packet Dropping Attacks in Wirel...
Privacy-Preserving and Truthful Detection of Packet Dropping Attacks in Wirel...Privacy-Preserving and Truthful Detection of Packet Dropping Attacks in Wirel...
Privacy-Preserving and Truthful Detection of Packet Dropping Attacks in Wirel...
 
M phil-computer-science-secure-computing-projects
M phil-computer-science-secure-computing-projectsM phil-computer-science-secure-computing-projects
M phil-computer-science-secure-computing-projects
 
M phil-computer-science-secure-computing-projects
M phil-computer-science-secure-computing-projectsM phil-computer-science-secure-computing-projects
M phil-computer-science-secure-computing-projects
 

Mehr von Tom Mens

On the diversity of software popularity metrics: An empirical study of npm
On the diversity of software popularity metrics: An empirical study of npmOn the diversity of software popularity metrics: An empirical study of npm
On the diversity of software popularity metrics: An empirical study of npm
Tom Mens
 

Mehr von Tom Mens (20)

How to be(come) a successful PhD student
How to be(come) a successful PhD studentHow to be(come) a successful PhD student
How to be(come) a successful PhD student
 
Recognising bot activity in collaborative software development
Recognising bot activity in collaborative software developmentRecognising bot activity in collaborative software development
Recognising bot activity in collaborative software development
 
A Dataset of Bot and Human Activities in GitHub
A Dataset of Bot and Human Activities in GitHubA Dataset of Bot and Human Activities in GitHub
A Dataset of Bot and Human Activities in GitHub
 
The (r)evolution of CI/CD on GitHub
 The (r)evolution of CI/CD on GitHub The (r)evolution of CI/CD on GitHub
The (r)evolution of CI/CD on GitHub
 
Nurturing the Software Ecosystems of the Future
Nurturing the Software Ecosystems of the FutureNurturing the Software Ecosystems of the Future
Nurturing the Software Ecosystems of the Future
 
Comment programmer un robot en 30 minutes?
Comment programmer un robot en 30 minutes?Comment programmer un robot en 30 minutes?
Comment programmer un robot en 30 minutes?
 
On the rise and fall of CI services in GitHub
On the rise and fall of CI services in GitHubOn the rise and fall of CI services in GitHub
On the rise and fall of CI services in GitHub
 
Evaluating a bot detection model on git commit messages
Evaluating a bot detection model on git commit messagesEvaluating a bot detection model on git commit messages
Evaluating a bot detection model on git commit messages
 
Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Bot or not? Detecting bots in GitHub pull request activity based on comment s...Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Bot or not? Detecting bots in GitHub pull request activity based on comment s...
 
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
 
SecoHealth 2019 Research Achievements
SecoHealth 2019 Research AchievementsSecoHealth 2019 Research Achievements
SecoHealth 2019 Research Achievements
 
SECO-Assist 2019 research seminar
SECO-Assist 2019 research seminarSECO-Assist 2019 research seminar
SECO-Assist 2019 research seminar
 
ConPan: Analysing Packages Installed in Docker Containers
ConPan: Analysing Packages Installed in Docker ContainersConPan: Analysing Packages Installed in Docker Containers
ConPan: Analysing Packages Installed in Docker Containers
 
On the diversity of software popularity metrics: An empirical study of npm
On the diversity of software popularity metrics: An empirical study of npmOn the diversity of software popularity metrics: An empirical study of npm
On the diversity of software popularity metrics: An empirical study of npm
 
How to increase the technical health of your software?
How to increase the technical health of your software?How to increase the technical health of your software?
How to increase the technical health of your software?
 
"Software Ecosystem Health" lightning talk
"Software Ecosystem Health" lightning talk"Software Ecosystem Health" lightning talk
"Software Ecosystem Health" lightning talk
 
On the health of the npm packaging ecosystem
On the health of the npm packaging ecosystemOn the health of the npm packaging ecosystem
On the health of the npm packaging ecosystem
 
On the evolution of technical lag in the npm package dependency network
On the evolution of technical lag in the npm package dependency networkOn the evolution of technical lag in the npm package dependency network
On the evolution of technical lag in the npm package dependency network
 
On the impact of security vulnerabilities in the npm package dependency network
On the impact of security vulnerabilities in the npm package dependency networkOn the impact of security vulnerabilities in the npm package dependency network
On the impact of security vulnerabilities in the npm package dependency network
 
SoHeal 2018 Welcome Slides: First International Workshop on Software Health
SoHeal 2018 Welcome Slides: First International Workshop on Software HealthSoHeal 2018 Welcome Slides: First International Workshop on Software Health
SoHeal 2018 Welcome Slides: First International Workshop on Software Health
 

Kürzlich hochgeladen

Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
PirithiRaju
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Lokesh Kothari
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
Sérgio Sacani
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
PirithiRaju
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
gindu3009
 
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
Lokesh Kothari
 
Seismic Method Estimate velocity from seismic data.pptx
Seismic Method Estimate velocity from seismic  data.pptxSeismic Method Estimate velocity from seismic  data.pptx
Seismic Method Estimate velocity from seismic data.pptx
AlMamun560346
 

Kürzlich hochgeladen (20)

Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
Creating and Analyzing Definitive Screening Designs
Creating and Analyzing Definitive Screening DesignsCreating and Analyzing Definitive Screening Designs
Creating and Analyzing Definitive Screening Designs
 
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLKochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
 
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptx
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questions
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
 
Seismic Method Estimate velocity from seismic data.pptx
Seismic Method Estimate velocity from seismic  data.pptxSeismic Method Estimate velocity from seismic  data.pptx
Seismic Method Estimate velocity from seismic data.pptx
 

Comparing semantic versioning practices in Cargo, npm, Packagist and Rubygems

  • 1. Comparing semantic versioning practices in Cargo, npm, Packagist and Rubygems @tom_mens www.linkedin.com/in/tommens www.slideshare.net/TomMens
  • 2. SECO-ASSIST Belgian Research Project "Excellence of Science” secoassist.github.io @secoassist
  • 3. Empirical research on packaging ecosystems On the impact of security vulnerabilities in the npm package dependency network Decan, Mens, Constantinou – MSR 2018 – https://doi.org/10.1145/3196398.3196401 On the evolution of technical lag in the npm package dependency network Decan, Mens, Constantinou – ICSME 2018 – https://doi.org/10.1109/ICSME.2018.00050 An empirical comparison of dependency network evolution in seven software packaging ecosystems Decan, Mens, Grosjean – Empirical Software Engineering Journal 2019 – https://doi.org/10.1007/s10664-017-9589-y What do package dependencies tell us about semantic versioning? Decan, Mens – IEEE Transactions on Software Engineering 2019 – https://doi.org/10.1109/TSE.2019.2918315 Lost in zero space – An empirical comparison of 0.y.z releases in software packaging distributions Decan, Mens – Science of Computer Programming 2021 – https://doi.org/10.1016/j.scico.2021.102656 Back to the past – Analysing backporting practices in package dependency networks Decan, Mens, Zerouali, De Roover – IEEE Trans. Software Engineering 2021 – https://doi.org/10.1109/TSE.2021.3112204
  • 4. Semantic Versioning https://semver.org major minor patch 3 9 2 Breaking changes Backwards compatible changes Bug fixes recommended to respect semantic versioning
  • 5. Dependency Constraints https://semver.org major minor patch 3 9 2 Breaking changes Backwards compatible changes Bug fixes Most permissive Most Restrictive
  • 6. Outdated Dependencies • 1 out of 3 packages never update their dependency • Outdatedness is related to the type of dependency constraint being used Strict constraints represent about 33% of all outdated dependencies Outdated runtime dependencies
  • 7. By making dependency constraints “semver-compliant” the proportion of outdated releases might be reduced by >17% “What if …” analysis: Outdated Dependencies
  • 8. semver in package distributions Different package distributions interpret dependency constraints in different ways More restrictive than semver More permissive than semver What do package dependencies tell us of semantic versioning? A Decan, T Mens (2019) IEEE Transactions on Software Engineering semver compliant
  • 9. semver in package distributions To which extent do package distributions adhere to semver? All considered distributions become more semver-compliant over time. mostly semver-compliant >16% of restrictive dependency constraints, preventing automatic adoption of backward compatible upgrades
  • 10. semver in package distributions To which extent do package distributions adhere to semver? The RubyGems team urges gem developers to follow the semantic versioning standard for their gem’s versions. The RubyGems library itself does not enforce a strict versioning policy, but using an “irrational” policy will only be a disservice to those in the community who use your gems. https://guides.rubygems.org/patterns/
  • 11. Cargo package serde Packagist package mage2pro/core npm package react-scripts Rubygems package rails Wisdom of the Crowds Maintainers of dependent packages should look at how other packages depend on a required package to decide which version constraint to use. Distribution of dependency constraint types of dependent packages compliant 1 permissive 50 compliant 575 restrictive 17 compliant 1 restrictive 56 compliant 288 permissive 506 restrictive 203
  • 12. Summary so far Semver reduces outdatedness Distribution-specific semver rules are confusing Package distributions become more semver-compliant over time Maintainers of dependent packages could use “wisdom of the crowds” to decide which version constraint to use for their dependencies
  • 13. What about major version zero? “Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.” https://semver.org More permissive than semver ! Constraint Cargo npm Packagist ~0.2.3 [0.2.3, 0.3.0[ [0.2.3, 0.3.0[ [0.2.3, 0.3.0[ ^0.2.3 [0.2.3, 0.3.0[ [0.2.3, 0.3.0[ [0.2.3, 0.3.0[ youtu.be/b1U4YefW24Q proportion of dependency constraints to 0.y.z accepting at most patches or minor releases
  • 14. What about major version zero? ^ constraint is misleading: it behaves differently for 0.y.z releases Constraint Cargo npm Packagist ^1.2.3 [1.2.3, 2.0.0[ [1.2.3, 2.0.0[ [1.2.3, 2.0.0[ ^0.2.3 [0.2.3, 0.3.0[ [0.2.3, 0.3.0[ [0.2.3, 0.3.0[
  • 15. only 0.y.z only 0.y.z only 0.y.z only 0.y.z both both both both only >= 1.0.0 only >= 1.0.0 only >= 1.0.0 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Cargo RubyGems npm Packagist Stuck in zero space? Proportion of packages having release in a given version range A minority of 0.y.z packages ever crosses the 1.0.0 barrier
  • 16. 0.0.0 0.0.0 0.0.0 0.0.0 0.0.1 0.0.1 0.0.1 0.0.1 0.1.0 0.1.0 0.1.0 0.1.0 1.0.0 1.0.0 1.0.0 1.0.0 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Cargo RubyGems npm Packagist Stuck in zero space? Proportion of packages created in 2019, by version number 96.3% 84.9% 44.3% 35.0% impact of 0.1.0 default
  • 17. Monthly proportion of 0.y.z releases Abundance of 0.y.z releases The release policies of Cargo and RubyGems should be adapted to incite package maintainers to move out of the zero version space sooner.
  • 18. Can 0.y.z releases be trusted? FOSDEM 2021 – Lost in ZeroSpace 0.18 Would you trust depending on a package with major version 0? No 6% Only if there is no alternative 19% Only after checking 41% Sure 34%
  • 19. Can 0.y.z releases be trusted? FOSDEM 2021 – Lost in ZeroSpace 0.19 Distributions of the number of dependent packages for required 0.y.z and ≥1.0.0 packages. Psychological 1.0.0 barrier is mostly artificial: • Many dependent ≥1.0.0 packages rely on 0.y.z packages. • Many 0.y.z packages are required by ≥1.0.0 packages. • Little practical difference between 0.y.z and ≥1.0.0 packages Major version zero does not imply initial development. Move out of zero space as soon as package is production-ready. « if your software is used in production, it should probably already be 1.0.0 » « if you have a stable API on which users have come to depend, you should be 1.0.0 »