near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.31k stars 619 forks source link

fix: add missing chrono feature #11704

Closed pugachAG closed 3 months ago

pugachAG commented 3 months ago

My local build fails with the following error:

> cargo test -p near-chain --no-run 
   Compiling near-chain-configs v0.0.0 (/Users/pugachag/Projects/near/nearcore/core/chain-configs)
   Compiling near-vm-runner v0.0.0 (/Users/pugachag/Projects/near/nearcore/runtime/near-vm-runner)
error[E0599]: no function or associated item named `now` found for struct `Utc` in the current scope
   --> core/chain-configs/src/test_genesis.rs:282:40
    |
282 |             let default = chrono::Utc::now();
    |                                        ^^^ function or associated item not found in `Utc`

Utc::now() is only available with clock feature.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.80%. Comparing base (e331962) to head (89023b2).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #11704 +/- ## ========================================== - Coverage 71.82% 71.80% -0.03% ========================================== Files 790 790 Lines 161983 161983 Branches 161983 161983 ========================================== - Hits 116347 116311 -36 - Misses 40606 40636 +30 - Partials 5030 5036 +6 ``` | [Flag](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | Coverage Δ | | |---|---|---| | [backward-compatibility](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (ø)` | | | [db-migration](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (ø)` | | | [genesis-check](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.35% <ø> (ø)` | | | [integration-tests](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `38.12% <ø> (+0.01%)` | :arrow_up: | | [linux](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `69.16% <ø> (+0.01%)` | :arrow_up: | | [linux-nightly](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.30% <ø> (-0.04%)` | :arrow_down: | | [macos](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `51.97% <ø> (-0.63%)` | :arrow_down: | | [pytests](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.58% <ø> (ø)` | | | [sanity-checks](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.38% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `66.30% <ø> (-0.05%)` | :arrow_down: | | [upgradability](https://app.codecov.io/gh/near/nearcore/pull/11704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.28% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.