Skip to content

v1.0.4

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Dec 10:37

Bug Fixes

  • Fixed Cyberpunk 2077 startup crash (EXCEPTION_ACCESS_VIOLATION) with nested collections: Collection element types are now emitted before outer collection types (Array, StaticArray, ScriptRef), preventing invalid forward PoolType references in generated .redscripts bundles.

Performance

  • Sped up the compiler frontend, decompiler, and REDmod adapter/transpiler by using identity hashers for TypeId/FileId lookups, switching unordered lookups to hash-based collections, and optimizing if-branch construction.

New Optional Warning Passes (compile & lint)

Added 9 new opt-in diagnostic passes available via -W / --warn-on (and enabled by default in redscript-compiler-api, except empty_branch):

  • unreachable_code — Reports statements that can never execute after a path that always exits.
  • constant_condition — Reports if/ternary conditions and while false loops that always evaluate to the same value (while true is allowed).
  • duplicate_switch_case — Reports repeated constant case labels within a switch.
  • empty_branch (pedantic — requires -L pedantic) — Reports empty if/else/while bodies.
  • no_op_statement — Reports standalone expressions with no effect (e.g. x;, 42;).
  • dead_store — Reports local variable assignments that are overwritten before being read.
  • missing_return — Reports non-Void functions with a code path that falls through without returning.
  • non_exhaustive_switch — Reports switch statements over an enum without default: that miss variants.
  • unforwarded_wrap_method — Reports @wrapMethod bodies that never call wrappedMethod.