Skip to content

Bump metrics-exporter-prometheus version to 0.17#84

Merged
Ptrskay3 merged 2 commits intoPtrskay3:masterfrom
raimannma:master
Jun 25, 2025
Merged

Bump metrics-exporter-prometheus version to 0.17#84
Ptrskay3 merged 2 commits intoPtrskay3:masterfrom
raimannma:master

Conversation

@raimannma
Copy link
Copy Markdown
Contributor

This pull request updates the dependency versions in the Cargo.toml file to simplify versioning.

@Ptrskay3
Copy link
Copy Markdown
Owner

Thanks! Can you explain the motivation behind the change? Why is this an improvement?

@raimannma
Copy link
Copy Markdown
Contributor Author

raimannma commented Jun 11, 2025

Sure.

The most important update is the metrics-exporter-prometheus update, as they updated their dependencies too.
This update results in fewer duplicate crates in my projects.

For the other crates, I remove the specification of the minor and patch versions. This enables Cargo to select the best version overall for a project's dependencies. Otherwise, Cargo needs to create a duplicate dependency.
It also reduces the need to update minor/patch versions in your crate.

Other possible ways:

  • Update metrics-exporter-prometheus and leave the other dependencies as they are.
  • update all dependencies with their full version
  • update all dependencies and fix by 'major.minor', but not the patch version.

PS: Old version of metrics-exporter-prometheus had thiserror 1.x.x and new one now uses thiserror 2.x.x

@Ptrskay3
Copy link
Copy Markdown
Owner

Well, as far as I can see the only justified thing here is the update of metrics_exporter_prometheus. Cargo will not duplicate a dependency because of different patch versions (since we don't pin them). I'm a bit reluctant to erase minor versions.. it may be fine for crates like http, overall I don't think this is a good idea because of backwards compatibility, or for future semver breakage. A lot of crates down the line have their dependencies pretty much fixed already, for instance axum too.

@raimannma
Copy link
Copy Markdown
Contributor Author

Alright, I changed it to just update the versions, without removing anything from the version string.

@raimannma
Copy link
Copy Markdown
Contributor Author

CI should run successfully now, checked in my fork: https://github.com/raimannma/axum-prometheus/actions/runs/15606103803

@raimannma raimannma changed the title Update dependencies and use simplified versioning Update dependencies Jun 17, 2025
@raimannma raimannma changed the title Update dependencies Bump metrics-exporter-prometheus version to 0.17.0 Jun 20, 2025
@raimannma
Copy link
Copy Markdown
Contributor Author

raimannma commented Jun 20, 2025

Hey @Ptrskay3

I changed the PR to be a minimal change only, just updating metrics-exporter-prometheus.

PS: The CI will fail, as there are bugs in the examples.

@raimannma raimannma changed the title Bump metrics-exporter-prometheus version to 0.17.0 Bump metrics-exporter-prometheus version to 0.17.2 Jun 20, 2025
@Ptrskay3
Copy link
Copy Markdown
Owner

Can you fix the examples, or should I?

(I don't really understand why did you revert it though, you already fixed them at some point, no?)

@raimannma
Copy link
Copy Markdown
Contributor Author

Yeah I have the commit in my fork. Can open another PR, just thought that fixing the examples should not be in this PR as it has nothing to do with the version upgrade.

@Ptrskay3
Copy link
Copy Markdown
Owner

The examples are broken due to the version upgrade as far as I can see (I haven't checked out your branch locally, correct me if I'm wrong), so we should fix them here I guess.

@raimannma raimannma changed the title Bump metrics-exporter-prometheus version to 0.17.2 Bump metrics-exporter-prometheus version to 0.17 Jun 25, 2025
@Ptrskay3 Ptrskay3 merged commit 2e8b397 into Ptrskay3:master Jun 25, 2025
5 checks passed
@Ptrskay3
Copy link
Copy Markdown
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants