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

Make iana-time-zone a target specific dependency #980

Merged
merged 1 commit into from Mar 7, 2023

Conversation

krtab
Copy link
Contributor

@krtab krtab commented Mar 7, 2023

Currently, iana-tiime-zone is only used on cfg(unix). This crate, and its windows code in particular, contains a lot of unsafe, so it seems prudent to limit its scope to where it is actually needed.

Geiger

Before

Functions  Expressions  Impls  Traits  Methods  Dependency

0/0        2/48         2/2    0/0     0/0      ☢️  chrono 0.5.0-alpha.1
0/2        1/147        0/0    0/0     0/1      ☢️  ├── iana-time-zone 0.1.53
0/46       0/500        0/0    0/0     0/0      ❓ │   └── winapi 0.3.9
0/0        0/0          0/0    0/0     0/0      ❓ │       └── winapi-x86_64-pc-windows-gnu 0.4.0
0/0        0/0          0/0    0/0     0/0      ❓ ├── num-integer 0.1.45
0/0        6/12         0/0    0/0     0/0      ☢️  │   └── num-traits 0.2.15
0/0        0/5          0/0    0/0     0/0      ❓ ├── serde 1.0.152
0/0        0/0          0/0    0/0     0/0      ❓ │   └── serde_derive 1.0.152
0/0        0/15         0/0    0/0     0/3      ❓ │       ├── proc-macro2 1.0.51
0/0        0/4          0/0    0/0     0/0      ❓ │       │   └── unicode-ident 1.0.8
0/0        0/0          0/0    0/0     0/0      ❓ │       ├── quote 1.0.23
0/0        0/15         0/0    0/0     0/3      ❓ │       │   └── proc-macro2 1.0.51
0/0        0/69         0/3    0/0     0/2      ❓ │       └── syn 1.0.109
0/0        0/15         0/0    0/0     0/3      ❓ │           ├── proc-macro2 1.0.51
0/0        0/0          0/0    0/0     0/0      ❓ │           ├── quote 1.0.23
0/0        0/4          0/0    0/0     0/0      ❓ │           └── unicode-ident 1.0.8
0/0        0/0          0/0    0/0     0/0      ❓ └── windows-sys 0.45.0
0/0        0/0          0/0    0/0     0/0      ❓     └── windows-targets 0.42.1
0/0        0/0          0/0    0/0     0/0      ❓         └── windows_x86_64_gnu 0.42.1

0/48       9/800        2/5    0/0     0/6

After

Functions  Expressions  Impls  Traits  Methods  Dependency

0/0        2/48         2/2    0/0     0/0      ☢️  chrono 0.5.0-alpha.1
0/0        0/0          0/0    0/0     0/0      ❓ ├── num-integer 0.1.45
0/0        6/12         0/0    0/0     0/0      ☢️  │   └── num-traits 0.2.15
0/0        0/5          0/0    0/0     0/0      ❓ ├── serde 1.0.152
0/0        0/0          0/0    0/0     0/0      ❓ │   └── serde_derive 1.0.152
0/0        0/15         0/0    0/0     0/3      ❓ │       ├── proc-macro2 1.0.51
0/0        0/4          0/0    0/0     0/0      ❓ │       │   └── unicode-ident 1.0.8
0/0        0/0          0/0    0/0     0/0      ❓ │       ├── quote 1.0.23
0/0        0/15         0/0    0/0     0/3      ❓ │       │   └── proc-macro2 1.0.51
0/0        0/69         0/3    0/0     0/2      ❓ │       └── syn 1.0.109
0/0        0/15         0/0    0/0     0/3      ❓ │           ├── proc-macro2 1.0.51
0/0        0/0          0/0    0/0     0/0      ❓ │           ├── quote 1.0.23
0/0        0/4          0/0    0/0     0/0      ❓ │           └── unicode-ident 1.0.8
0/0        0/0          0/0    0/0     0/0      ❓ └── windows-sys 0.45.0
0/0        0/0          0/0    0/0     0/0      ❓     └── windows-targets 0.42.1
0/0        0/0          0/0    0/0     0/0      ❓         └── windows_x86_64_gnu 0.42.1

0/0        8/153        2/5    0/0     0/5

@krtab krtab changed the title Iana tz opt Make iana-time-zone a target specific dependency Mar 7, 2023
Currently, iana-tiime-zone is only used on cfg(unix). This crate,
and its windows code in particular, contains a lot of unsafe, so it
seems prudent to limit its scope to where it is actually needed.
Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

@djc djc merged commit fb2f259 into chronotope:0.4.x Mar 7, 2023
@djc djc mentioned this pull request Mar 9, 2023
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Mar 15, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [chrono](https://github.com/chronotope/chrono) | dependencies | patch | `0.4.23` -> `0.4.24` |

---

### Release Notes

<details>
<summary>chronotope/chrono</summary>

### [`v0.4.24`](https://github.com/chronotope/chrono/releases/tag/v0.4.24): 0.4.24

[Compare Source](chronotope/chrono@v0.4.23...v0.4.24)

This is a small maintenance release with accumulated fixes and improvements.

-   Fix doc on `Days::new()` to refer to days, not months ([#&#8203;874](chronotope/chrono#874), thanks to [@&#8203;brotskydotcom](https://github.com/brotskydotcom))
-   Clarify out of range value for `from_timestamp_opt()` ([#&#8203;879](chronotope/chrono#879), thanks to [@&#8203;xmo-odoo](https://github.com/xmo-odoo))
-   Add `format_localized()` for `NaiveDate` ([#&#8203;881](chronotope/chrono#881), thanks to [@&#8203;mseele](https://github.com/mseele))
-   Fix bug in `Add`/`Sub` `Days`, add tests with DST timezone ([#&#8203;878](chronotope/chrono#878))
-   Make `NaiveTime::MIN` public ([#&#8203;890](chronotope/chrono#890))
-   Fix `from_timestamp_millis()` implementation and add more tests ([#&#8203;885](chronotope/chrono#885))
-   Fix typo in docstrings ([#&#8203;897](chronotope/chrono#897), thanks to [@&#8203;dandxy89](https://github.com/dandxy89))
-   Add test proving that [#&#8203;903](chronotope/chrono#903) is fixed in 0.4.x head ([#&#8203;905](chronotope/chrono#905), thanks to [@&#8203;umanwizard](https://github.com/umanwizard))
-   Add `from_timestamp_micros()` function ([#&#8203;906](chronotope/chrono#906), thanks to [@&#8203;umanwizard](https://github.com/umanwizard))
-   Check cargo-deny in CI ([#&#8203;909](chronotope/chrono#909))
-   Derive `Hash` for most pub types that also derive `PartialEq` ([#&#8203;938](chronotope/chrono#938), thanks to [@&#8203;bruceg](https://github.com/bruceg))
-   Update deprecated methods in `from_utc()` example ([#&#8203;939](chronotope/chrono#939), thanks to [@&#8203;greg-el](https://github.com/greg-el))
-   Fix panic in `DateTime::checked_add_days()` ([#&#8203;942](chronotope/chrono#942), thanks to [@&#8203;Ekleog](https://github.com/Ekleog))
-   More documentation for dates before 1 BCE or after 9999 CE ([#&#8203;950](chronotope/chrono#950), thanks to [@&#8203;cgit](https://github.com/cgit))
-   Improve `FixedOffset` docs ([#&#8203;953](chronotope/chrono#953), thanks to [@&#8203;klnusbaum](https://github.com/klnusbaum))
-   Add chrono-fuzz to CI and update its libfuzzer-sys dependency ([#&#8203;968](chronotope/chrono#968), thanks to [@&#8203;LingMan](https://github.com/LingMan))
-   Fixes to parsing and calculation of week numbers ([#&#8203;966](chronotope/chrono#966), thanks to [@&#8203;raphaelroosz](https://github.com/raphaelroosz))
-   Make iana-time-zone a target specific dependency ([#&#8203;980](chronotope/chrono#980), thanks to [@&#8203;krtab](https://github.com/krtab))
-   Make eligible functions `const` ([#&#8203;984](chronotope/chrono#984), thanks to [@&#8203;tormeh](https://github.com/tormeh))

Thanks to all contributors from the chrono team, [@&#8203;esheppa](https://github.com/esheppa) and [@&#8203;djc](https://github.com/djc).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS42LjAiLCJ1cGRhdGVkSW5WZXIiOiIzNS42LjAifQ==-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1815
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
@Kijewski Kijewski mentioned this pull request Mar 22, 2023
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.

None yet

2 participants