BUG: Rhombus CLI flags (`-e`, `-f`) fail with syntax errors when using `racket -I rhombus`
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 601
- Forks
- 74
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 5
Description
When invoking Rhombus via the Racket CLI wrapper (racket -I rhombus), interaction flags like -e (eval) and -f (load file) fail with syntax errors. The CLI passes expressions directly to Racket's default #%top-interaction macro instead of routing them through Rhombus's parser.
Additionally, the interface mimics standard Racket too closely without actual support:
- The welcome banner incorrectly reads
Welcome to Racketinstead ofWelcome to Rhombus. - The
--helpoutput is identical toracket --help, listing numerous options (like-e,-f,-t) that are currently broken or unsupported under-I rhombus.
Steps to Reproduce
- Evaluating any expression (
-e) fails:
$ racket -I rhombus -e '"Hello, World"'
#%top-interaction: bad syntax
in: #{(#%top-interaction . "Hello, World")}
context...:
/usr/racket/collects/syntax/parse/private/runtime-report.rkt:744:0: error/report
/usr/racket/collects/syntax/parse/private/runtime-report.rkt:25:0: call-current-failure-handler
- Running a script also fails (any file, even a simple file with only
#lang rhombusand nothing else):
$ racket -I rhombus -f test.rhm
/home/sohang/a.rkt:1:6: #%top-interaction: expected one of these literal symbols: `multi' or `group'
at: module
in: #{#%top-interaction} module a #{(lib "rhombus/main.rhm")} #{(#%module-begin (multi (group "Hello, World!")))}
location...:
a.rkt:1:6
context...:
/usr/racket/collects/syntax/parse/private/runtime-report.rkt:744:0: error/report
Note: The only working CLI mechanism currently is launching the interactive REPL raw via racket -I rhombus with no trailing execution flags).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failures through the racket -I rhombus entry point with -e and -f, then trace how those flags reach #%top-interaction instead of the Rhombus parser. Check the banner and --help behavior as part of the same CLI surface. Done means supported flags execute Rhombus expressions and files correctly, while unsupported options and interface text are accurately represented.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100