-
Notifications
You must be signed in to change notification settings - Fork 88
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
Get rid of the smol_str dependency #144
Comments
How would we feel about replacing
I could put together PR's for both stripe-rs and async-stripe to do this migration. |
I think we have the opportunity to do two things here; one is to replace smol str and the second is to establish a minimum rust version and pin CI to it. While I personally tend to use latest rust, I understand that not everyone can, and see no issue in making it an official guarantee of the API. Thoughts @seanpianka? |
SGTM. How about the |
Sorry for the delay. I don't have experience using either
This seems like a sane approach that avoids requiring stripe-rs users to upgrade their toolchain with every new release of stripe-rs and Rust. I ran into a similar issue recently, in fact. A project of mine uses a 1.54 feature, and I noticed that a user forked the project just to remove a single doc comment from the
One thing to note here is that smol_str has no Edit: I skimmed through fasterthanlime's analysis of the two crates which, while possibly outdated or fixed by now, specifies that the clone for smol_str is O(1) whereas the clone for smartstring is O(n). With how much we make use of these more efficient string types, perhaps we should also account for the complexity of some common operations. |
I am personally less inclined to pin the minor version purely because it means people will more likely end up with multiple copies of the library in their binary. I remember on the reddit discussion that matklad actually recommended smartstring. I'll find it:
So, my vote: move to I think migrating CI to github actions should probably happen fairly soon as well to support this guarantee. |
@arlyon When you say pin to a version of rust - are you just talking about stripe-rs's CI? Or do you mean that the library will stop supporting earlier versions? Selfishly we are on 1.52 at work :D |
Yes, just in CI. Obviously things should still 'just work' with earlier rust versions it just means we'll be less stringent with accepting prs that use language features older than the MSRV. Out of interest, I tried to do a crude 'bisect' to figure out the lowest compiler version that actually compiles, and it turns out to be |
Would it be possible to remove the dependency on
smol_str
? Or at least fix it to a specific minor version. rust-analyzer/smol_str#25 just broke my build (even with the latest stable compiler) and the author ofsmol_str
clarified thatsmol_str
will only support the latest compiler (not sure why latest stable doesn't work for me at the moment).The text was updated successfully, but these errors were encountered: