Skip to content

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

Description

@sohang3112

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions