Closed frederikrothenberger closed 2 months ago
@itsyaasir @UMR1352: There will need to be some CI changes as cargo test --workspace --all-features
no longer compiles (since the test binaries are missing the custom time implementation but have custom_time
enabled).
I.e. testing will need to be split into cargo test --test custom_time --features="custom_time"
and running all other tests with custom_time
disabled.
I did not touch CI (yet). How would you want me to approach that issue?
@itsyaasir @UMR1352: There will need to be some CI changes as
cargo test --workspace --all-features
no longer compiles (since the test binaries are missing the custom time implementation but havecustom_time
enabled).I.e. testing will need to be split into
cargo test --test custom_time --features="custom_time"
and running all other tests withcustom_time
disabled.I did not touch CI (yet). How would you want me to approach that issue?
Yeah, I think splitting it will make sense in the CI
@itsyaasir @UMR1352: There will need to be some CI changes as
cargo test --workspace --all-features
no longer compiles (since the test binaries are missing the custom time implementation but havecustom_time
enabled).I.e. testing will need to be split into
cargo test --test custom_time --features="custom_time"
and running all other tests withcustom_time
disabled.I did not touch CI (yet). How would you want me to approach that issue?
We will take care of CI 👌
Thanks a lot!
@itsyaasir: In order to successfully compile identity_core
for the target wasm32-unknown-unknown
without having a dependency on js-sys
, I needed to do the following additional changes: https://github.com/frederikrothenberger/identity.rs/commit/3dd5198c73dca238e98016e96e1cfd33b9ab27ff
Could we include that commit in this PR as well, or would you rather have that separately?
@itsyaasir: In order to successfully compile
identity_core
for the targetwasm32-unknown-unknown
without having a dependency onjs-sys
, I needed to do the following additional changes: frederikrothenberger@3dd5198Could we include that commit in this PR as well, or would you rather have that separately?
You can add it in this PR, no problem
@frederikrothenberger could you try to re-sign your commits? 🙏 Edit: Might mean you need to force push the branch
@eike-hass: The commits are now signed 👍
@frederikrothenberger Thanks for the contribution.
Description of change
This PR adds a feature to
identity_core
to allow specifying a custom function to get the current time (Timestamp::now_utc
). The feature is disabled by default.Fixes #1391.
Type of change
Add an
x
to the boxes that are relevant to your changes.How the change has been tested
Added an integration test to
identity_core
that uses the custom hook.Change checklist
Add an
x
to the boxes that are relevant to your changes.