predrag, to rust
@predrag@hachyderm.io avatar

Nice round numbers coming up for your friendly neighborhood SemVer linter for Rust 👀

predrag, to rust
@predrag@hachyderm.io avatar

cargo-semver-checks v0.31 is out ✨

Inspired by @Mara's awesome Rust release threads, I put together a thread of the new goodies in this release 👇

#rust #rustlang #semver #release

predrag, to rust
@predrag@hachyderm.io avatar

Removing a pub method might NOT be a breaking change!

There are a dozen possible cases, and I recently found one more!

Did you think of the "matching default impl in a trait in a prelude" case? If you use cargo-semver-checks, you don't have to!
https://github.com/obi1kenobi/cargo-semver-checks/issues/727#issuecomment-2054091521

There's a case where this is in practice not actually breaking: if the trait in question is part of a prelude — either a built-in one or a crate's own prelude like e.g. pyo3's: For example, if pyo3 moves an inherent method to a trait in its prelude, we'd like to report that case as a hazard not necessarily as a semver-major change. The former tells maintainers "there's a bit of risk here so at least call this out in your release notes" whereas the latter is overstating our case a bit and could be perceived as crying wolf. It's of course possible (if a bit rare) that an inherent method may shadow an identical trait method in the built-in Rust prelude. This is a bit subtle! You may ask, why might a maintainer add an inherent method instead of using the built-in one? The answer is that the Rust standard library is actively developed too, and it's possible that the inherent method was added before std and the Rust prelude gained their version. E.g. the itertools crate has many candidates that are being considered for inclusion into the Iterator trait which is in the prelude. If a maintainer added an inherent impl for a useful pub helper method for their own iterator type, and later the Iterator trait gained an identical helper, removing that pub helper method is not breaking in practice because the Iterator trait is imported by the prelude.

predrag,
@predrag@hachyderm.io avatar

Another edge case confirmed.

Here, SecretlyIterator is public API, but its impl Iterator is not. That impl is pub, but pub != public API.

The impl Iterator may be designed only for use by macros. Downstream users of this crate should not rely on its existence directly, as removing it is not semver-major.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=011fbaab487aa0002f52fdf4cafdffb0

predrag, to rust
@predrag@hachyderm.io avatar

People ask me how projects start using cargo-semver-checks.

Much of the time, it's "oops we broke semver" => "that sucked to clean up, we're not dealing with that again."

If you use cargo-semver-checks, why did you decide to do it?

predrag, to rust
@predrag@hachyderm.io avatar

Leptos, a Rust web framework with 14.4k GitHub stars, adopts cargo-semver-checks 🤩

https://github.com/leptos-rs/leptos/pull/2450

predrag, to rust
@predrag@hachyderm.io avatar

My "SemVer in Rust" talk from @fosdem is now available as a blog post!

I used the "annotated talk" format pioneered by @simon to make it easy to skim the material, skip ahead, and jump between the written post and the video.

Enjoy, and let me know what you think!

https://predr.ag/blog/semver-in-rust-tooling-breakage-and-edge-cases/

predrag, to rust
@predrag@hachyderm.io avatar

New cargo-semver-checks release 🚀

cargo install cargo-semver-checks --locked

Or if you use our GitHub Action, just sit back and enjoy the new release — it'll be used automatically 😎

simendsjo, to random
@simendsjo@fosstodon.org avatar

I've released a small #CommonLisp library for constructing #semver for your projects: https://github.com/simendsjo/sijo-version

By default, calling (sijo-version:version) will give you a version based on your system or VERSION file and current git branch and commit. But it's configurable using a small EDSL, and will construct something like 0.1.0-0.dev.27+prototype.7aeedb4d32927e19a5e9ed406ac5735db0fd20dd.20240301145715Z or 0.1.0+8e523641c17ca0db45af33e159a3fe08a993c1d8.20240311182000Z.

etenil, to emacs
@etenil@emacs.ch avatar

A little I made to easily see what constraints translate to in the echo area. For example to ensure that ~1.1.0 actually does translate to >=1.1.0 <1.2.0 and avoid mistakes!

https://gitlab.com/binary-ec/semver.el

predrag, to rust
@predrag@hachyderm.io avatar

New cargo-semver-checks release 🔥

"On weekends, we ship" is my "on Wednesdays, we wear pink." Enjoy, friends! 🦀

https://github.com/obi1kenobi/cargo-semver-checks/releases/tag/v0.29.0

#rust #rustlang #semver

ross, to random
@ross@rossabaker.com avatar

A deeper dive than anybody wanted into Semantic Versioning, how its ordering conflicts with standard practice, and how to unify spec and practice. Includes examples for SBT (Coursier and Ivy) and Maven.

https://rossabaker.com/blog/version-number-ordering/

#SemVer #SBT #Maven

jwildeboer, to random
@jwildeboer@social.wildeboer.net avatar

PSA: when you use #semver (Semantic Versioning) for your project, please stick to the rules. Breaking (API) changes require a major version bump. Please don’t break the API between 1.4.x and 1.5.x. Because that’s unexpected behaviour and really bad for users of your project. #kthxbai https://semver.org/

predrag, to rust
@predrag@hachyderm.io avatar

Reflecting on the 2023 highlights of cargo-semver-checks

✨ running 2x the lints in 1% the time
✨ eliminated 60% of false-positives
✨ 1 in 6 of Rust's top 1000 crates have accidentally broken semver in a way we can now detect & prevent.

Also, your regular reminder that this work is funded by GitHub sponsorships. The limiting factor is money: the better I can pay the bills with this, the more time I'll be able to spend on it.

https://predr.ag/blog/highlights-of-2023-for-cargo-semver-checks/

#rust #rustlang #semver #opensource

simon, to random
@simon@simonwillison.net avatar

Given how Pydantic 2 broke compatibility with Pydantic 1 in a way that's still shaking out - you can't use 2 in a project that has dependencies that use 1 without making changes to those dependencies...

... I wonder what the downsides of releasing Pydantic 2 as a new package called "pydantic2" such that it could be installed in the same namespace as the original pedantic would have been?

Presumably this is how Jinja ended up as "jinja2" forever?

predrag,
@predrag@hachyderm.io avatar

@simon on that note, I'm working on a Python linter that can find and report breaking changes between package versions!

Like my Rust linter cargo-semver-checks, but for Python. Before making a new release (or merging a PR), run it to make sure no unintended breaking changes have snuck in.

Who should I be talking to about this? Who needs to use it the most?

#rustlang #python #semver

jakehamilton, to NixOS
@jakehamilton@hachyderm.io avatar

Well, I've hopped on the #SemVer train. Here's a new tool named Thaw which lets you easily update your #Nix Flake's inputs' refs. That means you can get safe version upgrades without needing to rely on another server, everything happens locally! Currently compatible with GitHub, but can be pretty easily extended to support other sources. Contributions welcome!

https://github.com/snowfallorg/thaw

#SnowfallOrg #NixOS

predrag, to rust
@predrag@hachyderm.io avatar

If you or your company like cargo-semver-checks, please ✨ sponsor my work on it ✨

With your sponsorship, I could work on:

  • catching dozens of new breaking changes
  • making perf even faster
  • getting it merged into cargo itself

I'd love to make it a project that can help pay my rent, instead of being just a project I poke at in spare time.

https://github.com/sponsors/obi1kenobi

svenhennessen, to random

Do you do (semi-) automated semantic versioning? If so, how do you decide when to update major/minor/patch?

carlton, to python
@carlton@fosstodon.org avatar

Seems relevant today… my controversial maintainer's opinion is that dropping support for EOL versions does not count as a breaking change.

pandafy,

@carlton I agree, as long as it is mentioned in the CHANGELOG.

I would very much prefer increasing the minor of #SemVer when such changes are made.

conorf, to devops
@conorf@mastodon.social avatar

Does anyone know of a semver inspired release system tied in with Github Actions (or equivalent) that will let me write "conventional" commit messages for a Python project, and have some magic happen where version numbers are updated in setup.py, tags are made/releases cut, etc etc?

https://www.conventionalcommits.org

#semver #devops #github #cicd #programming #python #software #development #githubactions #git

maybeanerd, to typescript
@maybeanerd@bumscode.com avatar

#typescript releases are always weird.

I'm happy that there's something new, but it also makes me angry to be reminded that it doesn't follow #semver.

voxpelli,
@voxpelli@mastodon.social avatar

@maybeanerd I kind of wish they would go with #CalVer instead of giving an appearance of #SemVer

I also wish #npm would support #CalVer

https://calver.org/

maybeanerd,
@maybeanerd@bumscode.com avatar

@voxpelli Agree, the appearance of using is the worst part about it - it messes with all assumptions you might have seeing the version.

But I also think semver would still be a good choice!
I don't get why some projects are so afraid of doing major version bumps often. The changes are breaking anyways, it's not like it's more difficult to update because of the major version.
Don't be so afraid of reaching a major version in the two or three digits.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines