racket / racket/rhombus

BUG: Rhombus CLI flags (`-e`, `-f`) fail with syntax errors when using `racket -I rhombus`

Open
#790 6 comments 0 reactions 0 assignees View on GitHub

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 Racket instead of Welcome to Rhombus.
  • The --help output is identical to racket --help, listing numerous options (like -e, -f, -t) that are currently broken or unsupported under -I rhombus.
Steps to Reproduce
  1. 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
  1. Running a script also fails (any file, even a simple file with only #lang rhombus and 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.