Skip to content

Warnings when testing #96

@edubart

Description

@edubart

Context

There are some annoying warnings in the contracts when testing that should be fixed ideally:

Compiler run successful with warnings:
Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
    --> src/UArchStep.sol:1014:56:
     |
1014 |     function executeFENCE(AccessLogs.Context memory a, uint32 insn, uint64 pc)
     |                                                        ^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
    --> src/UArchStep.sol:1064:56:
     |
1064 |     function executeECALL(AccessLogs.Context memory a, uint32 insn, uint64 pc)
     |                                                        ^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
    --> src/UArchStep.sol:1102:57:
     |
1102 |     function executeEBREAK(AccessLogs.Context memory a, uint32 insn, uint64 pc)
     |                                                         ^^^^^^^^^^^

Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
    --> src/UArchStep.sol:1102:70:
     |
1102 |     function executeEBREAK(AccessLogs.Context memory a, uint32 insn, uint64 pc)
     |                                                                      ^^^^^^^^^

Warning (2018): Function state mutability can be restricted to view
  --> test/UArchInterpret.t.sol:56:5:
   |
56 |     function testBinaries() public {
   |     ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to pure
  --> test/UArchInterpret.t.sol:97:5:
   |
97 |     function testStepEarlyReturn() public {
   |     ^ (Relevant source part starts here and spans across multiple lines).
Warning (2018): Function state mutability can be restricted to view
  --> test/AccessLogs.t.sol:63:5:
   |
63 |     function verifyWord(bytes32 h, uint64 p, uint64 w) internal {
   |     ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to view
  --> test/AccessLogs.t.sol:70:5:
   |
70 |     function testReadWordHappyPath() public {
   |     ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to pure
   --> test/AccessLogs.t.sol:153:5:
    |
153 |     function testEndianSwap() public {
    |     ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to pure
  --> test/EmulatorCompat.t.sol:39:5:
   |
39 |     function testSanity() public {
   |     ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to pure
  --> test/EmulatorCompat.t.sol:51:5:
   |
51 |     function testCompat() public {
   |     ^ (Relevant source part starts here and spans across multiple lines).

Warning (2018): Function state mutability can be restricted to pure
   --> test/EmulatorCompat.t.sol:152:5:
    |
152 |     function testUint32Log2() public {
    |     ^ (Relevant source part starts here and spans across multiple lines).

There is also many warning in CI that deserves a fix.

coverage-mock
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/upload-artifact@v4, foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
coverage-mock
Cache not found for keys: linux-foundry-chain-fork-coverage-mock-3f5d163df0f7564fef3345fc919252a371e5fb9f, linux-foundry-chain-fork-coverage-mock-, linux-foundry-chain-fork-
test
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
test
Cache not found for keys: linux-foundry-chain-fork-test-3f5d163df0f7564fef3345fc919252a371e5fb9f, linux-foundry-chain-fork-test-, linux-foundry-chain-fork-
coverage-prod
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
coverage-prod
Cache not found for keys: linux-foundry-chain-fork-coverage-prod-3f5d163df0f7564fef3345fc919252a371e5fb9f, linux-foundry-chain-fork-coverage-prod-, linux-foundry-chain-fork-

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions