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

Once cell instead of lazy_static #66

Merged
merged 5 commits into from
Jul 8, 2024
Merged

Once cell instead of lazy_static #66

merged 5 commits into from
Jul 8, 2024

Conversation

rubdos
Copy link
Member

@rubdos rubdos commented Dec 14, 2023

(Currently based on #65)

Follow-up from #60.

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 74 lines in your changes are missing coverage. Please review.

Comparison is base (226b6fb) 71.39% compared to head (3e25e31) 70.90%.

Files Patch % Lines
src/consts.rs 55.97% 70 Missing ⚠️
src/carrier.rs 0.00% 1 Missing ⚠️
src/error.rs 0.00% 1 Missing ⚠️
src/extension.rs 0.00% 1 Missing ⚠️
src/phone_number.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
- Coverage   71.39%   70.90%   -0.50%     
==========================================
  Files          19       20       +1     
  Lines        1930     2021      +91     
==========================================
+ Hits         1378     1433      +55     
- Misses        552      588      +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rubdos
Copy link
Member Author

rubdos commented Dec 14, 2023

     Parsing phonenumber v0.3.3+8.13.9 (current)
     Parsing phonenumber v0.3.3+8.13.9 (baseline, cached)
    Removing stale cached baseline rustdoc for phonenumber
     Parsing phonenumber v0.3.3+8.13.9 (baseline)
    Checking phonenumber v0.3.3+8.13.9 -> v0.3.3+8.13.9 (no change)
   Completed [   0.080s] 48 checks; 47 passed, 1 failed, 0 unnecessary

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.23.0/src/lints/struct_missing.ron

Failed in:
  struct phonenumber::metadata::DATABASE, previously in file /home/rsmet/.cargo/registry/src/index.crates.io-6f17d22bba15001f/phonenumber-0.3.3+8.13.9/src/metadata/database.rs:32
       Final [   0.080s] semver requires new major version: 1 major and 0 minor checks failed

@rubdos
Copy link
Member Author

rubdos commented Dec 14, 2023

DEFAULT is exposed as a lazy_static! in currently released versions, and putting it behind Lazy technically breaks the type. Since #63 is upcoming too, I think those efforts should probably be joined either way.

@gferon
Copy link
Contributor

gferon commented Dec 14, 2023

@rubdos I guess you should add a merge commit from the main branch?

@rubdos
Copy link
Member Author

rubdos commented Dec 14, 2023

@rubdos I guess you should add a merge commit from the main branch?

I should rebase indeed. But since this breaks the API/semver, we'll do that after we release 0.3.4 :-)

@rubdos rubdos added this to the 0.4 milestone Jul 7, 2024
@gferon gferon merged commit c0fdd69 into main Jul 8, 2024
6 checks passed
@gferon gferon deleted the once-cell branch July 8, 2024 15:38
@rubdos
Copy link
Member Author

rubdos commented Jul 9, 2024

@gferon, this too was 0.4-material because it breaks public API. I'll foresee a 0.3 branch for whatever I still want backported.

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.

3 participants