Replace lazy_static with once_cell#169
Merged
iwillspeak merged 1 commit intorust-onig:mainfrom Aug 7, 2022
Merged
Conversation
`onig` is the only dependency left in Artichoke's `Cargo.lock` that uses `lazy_static`. It looks like most of the ecosystem has moved to `once_cell`. `once_cell` looks to be more actively maintained and is IMO nicer to read since there are no macros. See also this related change in `wasm-bindgen`: - wasm-bindgen/wasm-bindgen#2962 `once_cell`'s MSRV is documented to be 1.36.0: https://github.com/matklad/once_cell/blob/eda22cec55e9d37b16d408b7d0a5b396c7feb44c/CHANGELOG.md#151
Collaborator
|
Nice. This, and the 2015 upgrade have both been on my radar. I’d happily accept another PR. I’ll merge this now and look to get another release done this week. |
Contributor
Author
|
Thanks @iwillspeak. I put up a PR to upgrade both crates to 2018 edition here: |
Collaborator
|
Released as |
lopopolo
added a commit
to artichoke/artichoke
that referenced
this pull request
Aug 9, 2022
This removes `lazy_static` from Artichoke's `Cargo.lock` and is a followup to rust-onig/rust-onig#169. Update the minimum dependency constraints in `spinoso-regexp` and `artichoke-backend` to 6.4.0. ```console $ cargo update -p onig -p onig_sys Updating crates.io index Removing lazy_static v1.4.0 Updating onig v6.3.2 -> v6.4.0 Updating onig_sys v69.8.0 -> v69.8.1 ``` Part of tracking issue #2052.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
onigis the only dependency left in Artichoke'sCargo.lockthat useslazy_static. It looks like most of the ecosystem has moved toonce_cell.once_celllooks to be more actively maintained and is IMO nicer to read since there are no macros. Additionally, I believeonce_cellis a nightly Rust API so it is conceivable that once these types land instd,once_cellwill simply re-export types fromstd.See also this related change in
wasm-bindgen:once_cell's MSRV is documented to be 1.36.0:https://github.com/matklad/once_cell/blob/eda22cec55e9d37b16d408b7d0a5b396c7feb44c/CHANGELOG.md#151
As an aside, I noticed
onigis using the 2015 edition. Do you have any interest in upgrading the code to 2018 edition? It's been a while since I've had to typeextern crate😅