Skip to content

Commit

Permalink
fix: use PYTHONUTF8 in compile_all_examples.py to force windows to us…
Browse files Browse the repository at this point in the history
…e utf8 when running puya
  • Loading branch information
daniel-makerx committed Dec 13, 2023
1 parent 2c7de55 commit b4ab579
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion scripts/compile_all_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
EXAMPLES_DIR = GIT_ROOT / "examples"
SIZE_TALLY_PATH = EXAMPLES_DIR / "sizes.txt"
ALGOD_CLIENT = algokit_utils.get_algod_client(algokit_utils.get_default_localnet_config("algod"))
ENV_WITH_NO_COLOR = dict(os.environ) | {"NO_COLOR": "1"}
ENV_WITH_NO_COLOR = dict(os.environ) | {
"NO_COLOR": "1", # disable colour output
"PYTHONUTF8": "1", # force utf8 on windows
}


def get_unique_name(path: Path) -> str:
Expand Down
4 changes: 1 addition & 3 deletions src/puya/ir/ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ def _add_phi_operands(self, phi: ir.Phi, block: ir.BasicBlock) -> ir.Register:
through=block_pred,
)
)
# temporary work around for windows default code page not handling φ
phi_str = str(phi).replace("φ", "Phi")
logger.debug(f"Added {pred_variable} to Phi node: {phi_str} in {block_pred}")
logger.debug(f"Added {pred_variable} to Phi node: {phi} in {block_pred}")
attrs.validate(phi)
trivial_replacements = TrivialPhiRemover.try_remove(phi, self._all_blocks)
if not trivial_replacements:
Expand Down

0 comments on commit b4ab579

Please sign in to comment.