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

Do not include iana-time-zone for sgx #767

Merged
merged 3 commits into from Aug 12, 2022
Merged

Conversation

trevor-crypto
Copy link
Contributor

@trevor-crypto trevor-crypto commented Aug 10, 2022

In previous versions chrono with default features built successfully on the sgx platform. Since iana-time-zone is not implemented for this platform, do not include it when target_env = "sgx".

Thanks for contributing to chrono!

  • Have you added yourself and the change to the changelog? (Don't worry
    about adding the PR number)
  • If this pull request fixes a bug, does it add a test that verifies that
    we can't reintroduce it?

In previous version chrono with default features built successfully on the sgx platform. Since `iana-time-zone` is not implemented for this platform, do not include it when `target_env = "sgx"`.
@djc
Copy link
Contributor

djc commented Aug 10, 2022

Thanks! Would you be able to contribute something that would let us test this in CI?

@trevor-crypto
Copy link
Contributor Author

Thanks! Would you be able to contribute something that would let us test this in CI?

Yes, sure. Let me add that

@esheppa
Copy link
Collaborator

esheppa commented Aug 10, 2022

Maybe we should change this to be inclusive instead of exclusive, and only include iana-time-zone for the implemented OS's, or alternatively we could enable the "fallback" feature, which means get_timezone always returns an error instead of having a compile error

@esheppa
Copy link
Collaborator

esheppa commented Aug 10, 2022

I've set up trevor-crypto#1 for the latter option using the fallback feature. @trevor-crypto and @djc let me know what you think. This should prevent us breaking other platforms/OS's

@djc
Copy link
Contributor

djc commented Aug 10, 2022

It looks like your trevor-crypto#1 targeted the main branch in the fork, whereas this PR comes from the iana-sgx branch. So your commit doesn't seem to show up?

@esheppa
Copy link
Collaborator

esheppa commented Aug 10, 2022

yep I'd targeted the wrong branch at first, should be fixed now

@trevor-crypto
Copy link
Contributor Author

It looks like your trevor-crypto#1 targeted the main branch in the fork

@djc we resolved that 😄

@esheppa
Copy link
Collaborator

esheppa commented Aug 11, 2022

Just set up trevor-crypto#3 to avoid this having cyclic features on macos/ios. Happy to retarget that to chrono instead if that is more suitable

@djc
Copy link
Contributor

djc commented Aug 11, 2022

It seems unrelated to SGX, so I don't think it should become part of this PR.

I'm also inclined to wait on strawlab/iana-time-zone#50 instead. (And if we do this, it should probably just iOS since the original method works okay on macOS IIRC.)

@djc djc merged commit 84f98e0 into chronotope:main Aug 12, 2022
@djc djc mentioned this pull request Aug 12, 2022
2 tasks
mtremer pushed a commit to ipfire/ipfire-2.x that referenced this pull request Nov 11, 2022
- Updated from version 0.4.19 to 0.4.22
- Update of rootfile
- Update of metadata patch as more windows related entries in Cargo.toml to be excluded
- Changelog
	## 0.4.22
		* Allow wasmbindgen to be optional on `wasm32-unknown-unknown` target [(#771)](chronotope/chrono#771)
		* Fix compile error for `x86_64-fortanix-unknown-sgx` [(#767)](chronotope/chrono#767)
		* Update `iana-time-zone` version to 1.44 [(#773)](chronotope/chrono#773)
	## 0.4.21
		* Fall back to UTC timezone in cases where no timezone is found [(#756)](chronotope/chrono#756)
		* Correctly detect timezone on Android [(#756)](chronotope/chrono#756)
		* Improve documentation for strftime `%Y` specifier [(#760)](chronotope/chrono#760)
	## 0.4.20
		* Add more formatting documentation and examples.
		* Add support for microseconds timestamps serde serialization/deserialization (#304)
		* Fix `DurationRound` is not TZ aware (#495)
		* Implement `DurationRound` for `NaiveDateTime`
		* Implement `std::iter::Sum` for `Duration`
		* Add `DateTime::from_local()` to construct from given local date and time (#572)
		* Add a function that calculates the number of years elapsed between now and a given `Date` or `DateTime` (#557)
		* Correct build for wasm32-unknown-emscripten target (#568)
		* Change `Local::now()` and `Utc::now()` documentation from "current date" to "current date and time" (#647)
		* Fix `duration_round` panic on rounding by `Duration::zero()` (#658)
		* Add optional rkyv support.
		* Add support for microseconds timestamps serde serialization for `NaiveDateTime`.
		* Add support for optional timestamps serde serialization for `NaiveDateTime`.
		* Fix build for wasm32-unknown-emscripten (@yu-re-ka #593)
		* Make `ParseErrorKind` public and available through `ParseError::kind()` (#588)
		* Implement `DoubleEndedIterator` for `NaiveDateDaysIterator` and `NaiveDateWeeksIterator`
		* Fix panicking when parsing a `DateTime` (@botahamec)
		* Add support for getting week bounds based on a specific `NaiveDate` and a `Weekday` (#666)
		* Remove libc dependency from Cargo.toml.
		* Add the `and_local_timezone` method to `NaiveDateTime`
		* Fix the behavior of `Duration::abs()` for negative durations with non-zero nanos
		* Add compatibility with rfc2822 comments (#733)
		* Make `js-sys` and `wasm-bindgen` enabled by default when target is `wasm32-unknown-unknown` for ease of API discovery
		* Add the `Months` struct and associated `Add` and `Sub` impls

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
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

3 participants