Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(cargo): update bon requirement from 2.2.0 to 3.0.2 #231

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 22, 2024

Updates the requirements on bon to permit the latest version.

Release notes

Sourced from bon's releases.

v3.0.2

Fixed

  • Fix unexpected_cfgs lint coming from #[cfg(rust_analyzer)] on the latest nightly (#212)
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [bon](https://github.com/elastio/bon) to permit the latest version.
- [Release notes](https://github.com/elastio/bon/releases)
- [Changelog](https://github.com/elastio/bon/blob/master/release-plz.toml)
- [Commits](elastio/bon@v2.2.0...v3.0.2)

---
updated-dependencies:
- dependency-name: bon
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Nov 22, 2024
@Veetaha
Copy link
Contributor

Veetaha commented Nov 22, 2024

Interestingly, a warning from serde appears 😳, I'll try to take a look at it

@Veetaha
Copy link
Contributor

Veetaha commented Nov 22, 2024

Ah, I think there are repetitions in rename directives. The new version of serde catches this problem, so it's not related to bon. See how CachedAudio and Audio both have the same rename:

This is related to serde-rs/serde#2308

cc @ayrat555 @EdJoPaTo

@EdJoPaTo
Copy link
Collaborator

Ah, I think there are repetitions in rename directives.

yeah, that's what #230 is about ;)

Copy link
Collaborator

@EdJoPaTo EdJoPaTo left a comment

Choose a reason for hiding this comment

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

The documentation is way cleaner, but I still think having all the builders listed next to the structs is still doubling a way too long list which is a bit annoying.

The minimum version can be lowered, otherwise this is a welcome improvement.

@@ -73,7 +73,7 @@ name = "api_trait_implementation"
required-features = ["telegram-trait"]

[dependencies]
bon = "2.2.0"
bon = "3.0.2"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Guess 3.0.0 would be the minimum. The fix included with 3.0.1 is not relevant in frankenstein (currently?) and 3.0.2 fixes a lint warning on nightly only but still works fine without.

Suggested change
bon = "3.0.2"
bon = "3.0.0"

@Veetaha
Copy link
Contributor

Veetaha commented Nov 22, 2024

Do you think it makes sense to hide builders from the docs? If so, there could be an option in bon to do that. Alternatively, you could reexport builders from a separate module, for example, but this would require you to list all the builder types manually in reexports and keep them in sync, which would be unmanageable here.

Smth like:

pub mod builders {
    pub use super::types::{FooBuilder, /* ... */};
}

pub use types::{Foo, /* ... */};

mod types {
    #[derive(Builder)]
    pub struct Foo { /**/ }
    // ...
}

@EdJoPaTo
Copy link
Collaborator

Unfortunately #[doc(hidden)] hides them completely. I would like to have the Something::builder() method call and being able to click the Builder struct but keep it out of sight when looking for the structs as its basically redundant information: the builder for what you see in the row above. It's neat to have for a few builders but with frankenstein it's quite another scale.

Your idea might be neat to have automatically: having all builder structs in a builder sub-module. Not sure how that might explode with bon in doc comments and so on.

Maybe this discussion should be moved over to some bon issue?

@Veetaha
Copy link
Contributor

Veetaha commented Nov 22, 2024

I've created elastio/bon#214. I proposed a wokraround there with a declarative macro to achieve this. Do you think that would be enough to solve this problem for this case?

Copy link
Contributor Author

dependabot bot commented on behalf of github Nov 25, 2024

Superseded by #232.

@dependabot dependabot bot closed this Nov 25, 2024
@dependabot dependabot bot deleted the dependabot/cargo/bon-3.0.2 branch November 25, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants