Swift REPLs cannot execute code

Problem description

I am unable to execute code as simple as print("test") when I create a Swift REPL.

Expected behavior

The REPL should print “test”.

Actual behavior

Execution is failing because the module ‘SwiftShims’ is missing.

<unknown>:0: error: PCH was compiled with module cache path '/home/runner/Swift/.cache/clang/ModuleCache/QS0TP6CXX1XV', but the path is currently '/home/runner/IcyGreedyArguments/.cache/clang/ModuleCache/QS0TP6CXX1XV'
<unknown>:0: error: missing required module 'SwiftShims'

Steps to reproduce

  1. Create a Swift REPL
  2. Add any valid Swift code into the REPL and Run it
  3. See the missing module failure in the Console output





Device if mobile



Free Tier

Please upload screenshots

I can’t reproduce this using this template: https://replit.com/@replit/Swift

The old REPL, IcyGreedyArguments, is still failing but when I try a new REPL it seems ok. Seems like you might (sometimes) have a cache issue when creating new REPLs.