When I invoke it, it does the build and attempts to load a REPL, but then fails out:
Running the command swift run --repl results in a "you got the command wrong" kind of response:
Launching Swift REPL with arguments: -I/Users/heckj/src/Scale/.build/arm64-apple-macosx/debug -L/Users/heckj/src/Scale/.build/arm64-apple-macosx/debug -lscale__REPL -I/Users/heckj/src/Scale/.build/checkouts/swift-numerics/Sources/_NumericsShims/include
Welcome to Swift!
Subcommands:
swift build Build Swift packages
swift package Create and work on packages
swift run Run a program from a package
swift test Run package tests
swift repl Experiment with Swift code interactively
Use `swift --help` for descriptions of available options and flags.
Use `swift help <subcommand>` for more information about a subcommand.
When I invoke swift repl directly, that works - but my local package isn't loaded. Is there still a fast-path to set up a REPL that can use a local swift package?
(When I combine the details from swift run --repl into the CLI arguments for swift repl - that DOES seem to work)
The only solution I found was to load and run a package I was immediately working on is the one I have at the very top - using the -I and -L options above to explicitly include the built packages (after a swift build)
If you don't need a repl, but just want to run something, then using swift run with a script of swift code does a decent job, but that doesn't leave you in a REPL where you can interactively explore and dynamically add commands.
For my "trying things out" while developing library code, I mostly tend to use the later, simply because it's much easier. In my python coding days, switching a REPL, loading code and exploring was a common pattern - but that doesn't appear to translate very well over to working in Swift.