Skip to content

Commit

Permalink
Various documentation fixes (#224)
Browse files Browse the repository at this point in the history
* typos

* Set Version: 0.1.80

* fix KVersion warning

* add cheatcodes.md disclaimer

* gracefully shut down when forge is not in PATH

---------

Co-authored-by: devops <[email protected]>
  • Loading branch information
anvacaru and devops authored Dec 4, 2023
1 parent 08303c4 commit 70fcc97
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ poetry install

In order to build `kontrol`, you need to build these specific targets:
```sh
poetry run kdist --verbose build -j3 evm-semantics.haskell kontrol.foundry
poetry run kdist --verbose build -j2 evm-semantics.haskell kontrol.foundry
```

To change the default compiler:
```sh
CXX=clang++-14 poetry run kdist --verbose build -j3 evm-semantics.haskell kontrol.foundry
CXX=clang++-14 poetry run kdist --verbose build -j2 evm-semantics.haskell kontrol.foundry
```

On Apple Silicon:
```sh
APPLE_SILICON=true poetry run kdist --verbose build -j3 evm-semantics.haskell kontrol.foundry
APPLE_SILICON=true poetry run kdist --verbose build -j2 evm-semantics.haskell kontrol.foundry
```

Targets can be cleaned with:
Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.79
0.1.80
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "kontrol"
version = "0.1.79"
version = "0.1.80"
description = "Foundry integration for KEVM"
authors = [
"Runtime Verification, Inc. <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/kontrol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
if TYPE_CHECKING:
from typing import Final

VERSION: Final = '0.1.79'
VERSION: Final = '0.1.80'
4 changes: 3 additions & 1 deletion src/kontrol/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ def _check_k_version() -> None:
actual_k_version = k_version()

if not _compare_versions(expected_k_version, actual_k_version):
_LOGGER.warning(f'K version {expected_k_version} was expected but K version {actual_k_version} is being used.')
_LOGGER.warning(
f'K version {expected_k_version.text} was expected but K version {actual_k_version.text} is being used.'
)


def _compare_versions(ver1: KVersion, ver2: KVersion) -> bool:
Expand Down
5 changes: 4 additions & 1 deletion src/kontrol/foundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ def custom_view(self, contract_name: str, element: KCFGElem) -> Iterable[str]:
def build(self) -> None:
try:
run_process(['forge', 'build', '--root', str(self._root)], logger=_LOGGER)
except FileNotFoundError:
print("Error: 'forge' command not found. Please ensure that 'forge' is installed and added to your PATH.")
sys.exit(1)
except CalledProcessError as err:
raise RuntimeError("Couldn't forge build!") from err

Expand Down Expand Up @@ -347,7 +350,7 @@ def help_info() -> list[str]:
res_lines.append('')
res_lines.append('See `foundry_success` predicate for more information:')
res_lines.append(
'https://github.com/runtimeverification/evm-semantics/blob/master/include/kframework/foundry.md#foundry-success-predicate'
'https://github.com/runtimeverification/kontrol/blob/master/src/kontrol/kdist/foundry.md#foundry-success-predicate'
)
res_lines.append('')
res_lines.append(
Expand Down
3 changes: 2 additions & 1 deletion src/kontrol/kdist/cheatcodes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Foundry Cheat Codes
Kontrol Cheat Codes
-------------------
This file contains the implementation of both Foundry and proprietary cheat codes supported by Kontrol.

The configuration of the Foundry Cheat Codes is defined as follwing:
1. The `<prank>` subconfiguration stores values which are used during the execution of any kind of `prank` cheat code:
Expand Down

0 comments on commit 70fcc97

Please sign in to comment.