status-im / nimbus-eth2

Nim implementation of the Ethereum Beacon Chain
https://nimbus.guide
Other
523 stars 227 forks source link

fix UnnamedBreak deprecation build warnings #6388

Closed tersec closed 3 months ago

tersec commented 3 months ago

Introduced by the Nim 2.0 usage. Sample of what it looked like:

nimbus-eth2/beacon_chain/fork_choice/fork_choice.nim(288, 33) template/generic instantiation of `get_attesting_indices` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(142, 51) template/generic instantiation of `valueOr` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(151, 11) Warning: Using an unnamed break in a block is deprecated; Use a named block with a named break instead [UnnamedBreak]
nimbus-eth2/tests/consensus_spec/test_fixture_fork_choice.nim(334, 14) template/generic instantiation of `toSeq` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(129, 56) template/generic instantiation of `valueOr` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(133, 11) Warning: Using an unnamed break in a block is deprecated; Use a named block with a named break instead [UnnamedBreak]
nimbus-eth2/tests/consensus_spec/test_fixture_fork_choice.nim(334, 14) template/generic instantiation of `toSeq` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(135, 60) template/generic instantiation of `valueOr` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(140, 11) Warning: Using an unnamed break in a block is deprecated; Use a named block with a named break instead [UnnamedBreak]
nimbus-eth2/tests/consensus_spec/test_fixture_fork_choice.nim(334, 14) template/generic instantiation of `toSeq` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(142, 51) template/generic instantiation of `valueOr` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(151, 11) Warning: Using an unnamed break in a block is deprecated; Use a named block with a named break instead [UnnamedBreak]
nimbus-eth2/tests/consensus_spec/test_fixture_fork_choice.nim(334, 14) template/generic instantiation of `toSeq` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(129, 56) template/generic instantiation of `valueOr` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(133, 11) Warning: Using an unnamed break in a block is deprecated; Use a named block with a named break instead [UnnamedBreak]
nimbus-eth2/tests/consensus_spec/test_fixture_fork_choice.nim(334, 14) template/generic instantiation of `toSeq` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(135, 60) template/generic instantiation of `valueOr` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(140, 11) Warning: Using an unnamed break in a block is deprecated; Use a named block with a named break instead [UnnamedBreak]
nimbus-eth2/tests/consensus_spec/test_fixture_fork_choice.nim(334, 14) template/generic instantiation of `toSeq` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(142, 51) template/generic instantiation of `valueOr` from here
nimbus-eth2/beacon_chain/consensus_object_pools/spec_cache.nim(151, 11) Warning: Using an unnamed break in a block is deprecated; Use a named block with a named break instead [UnnamedBreak]
github-actions[bot] commented 3 months ago

Unit Test Results

         9 files  ±0    1 328 suites  ±0   28m 0s :stopwatch: - 5m 20s   4 998 tests ±0    4 650 :heavy_check_mark: ±0  348 :zzz: ±0  0 :x: ±0  20 850 runs  ±0  20 446 :heavy_check_mark: ±0  404 :zzz: ±0  0 :x: ±0 

Results for commit 70ccaa8c. ± Comparison against base commit 2d4ece0c.