Skip to content

Commit

Permalink
fix: semver [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
gabotechs committed Dec 12, 2022
1 parent 2702174 commit f379d85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/semver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ while IFS= read -r line; do
BUMP=3
VERSION="major"
fi
elif [[ $line == feat:* || $line == feat\(*\):* ]]; then
elif [[ $line == *feat:* || $line == *feat\(*\):* ]]; then
if [[ $BUMP -lt 2 ]]; then
BUMP=2
VERSION="minor"
Expand Down

5 comments on commit f379d85

@obi1kenobi
Copy link

Choose a reason for hiding this comment

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

I was checking out this awesome project, and noticed this semver-related fix commit. I thought you might find cargo-semver-checks useful, since it can automatically detect and prevent many kinds of semver issues: https://github.com/obi1kenobi/cargo-semver-checks

It's already caught a variety of real-world semver issues, is moving toward being merged into cargo itself (and is also co-maintained by a cargo team member), and aims to one day enable fearless cargo update.

If you're interested in adopting it, I'd be happy to help!

@gabotechs
Copy link
Owner

Choose a reason for hiding this comment

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

that looks really useful, but I imagine that it is more applicable to libraries exposing a public-facing api rather than simple binary applications right?

This file looks backwards in the commit history until the last tag in search for conventional commits, and based on those, it will bump the patch, minor or major version. Unless I am missing something https://github.com/obi1kenobi/cargo-semver-checks has nothing to do with conventional commits right?

I am wondering how could https://github.com/obi1kenobi/cargo-semver-checks help for a binary application. In the case of this project, determining if a change is either a breaking change or not should be evaluated by looking at the compiler's frontend syntax or the transpiled target code rather than the rust's internal implementation itself.

Does that make sense?

@obi1kenobi
Copy link

Choose a reason for hiding this comment

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

Of course you are right that in a binary app cargo-semver-checks isn't that useful.

As far as I can tell, though, there are three library crates in this repo as well (graphqxl_parser, graphqxl_synthesizer, graphqxl_transpiler) which may find cargo-semver-checks more useful. I know they aren't published to crates.io so the risk of a semver-inconsistent version bump isn't as high as with most other lib crates.

No pressure at all to change your workflow, of course :) If you do end up checking out cargo-semver-checks (either the tool itself or its GitHub Action), I'd love to hear what you think. I appreciate all feedback, and constructive negative feedback in particular really helps make the tool better!

@gabotechs
Copy link
Owner

Choose a reason for hiding this comment

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

yeah, those three creates are purely organizational right now, I don't think they are ever going to be published.

https://github.com/obi1kenobi/cargo-semver-checks looks really useful, if I was making a library I would definitely give it a try.

The only feedback I can give is about stating more thoughtfully in the README.md that your tool is designed with public-facing libraries in mind, I think that could potentially engage more people on the first look.

@obi1kenobi
Copy link

Choose a reason for hiding this comment

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

Thank you, much appreciated!

Please sign in to comment.