Skip to content

commandLineArgs() passing doesnt work for chez backend executables #390

@IR0NSIGHT

Description

@IR0NSIGHT
# javascript backend (default)
max-priv@NOAH367-L:~/Dokumente/repos/fasteffekt$ effekt.sh -b ./chez-lift-runner.effekt && ./out/chez_lift_runner hello world i am args
Cons(hello, Cons(world, Cons(i, Cons(am, Cons(args, Nil())))))

# chez lift backend
max-priv@NOAH367-L:~/Dokumente/repos/fasteffekt$ effekt.sh -b ./chez-lift-runner.effekt --backend chez-lift && ./out/chez_lift_runner hello world i am args
Nil()

# chez-callcc
max-priv@NOAH367-L:~/Dokumente/repos/fasteffekt$ effekt.sh -b ./chez-lift-runner.effekt --backend chez-callcc && ./out/chez_lift_runner hello world i am args
Nil()

# chez-monadic
max-priv@NOAH367-L:~/Dokumente/repos/fasteffekt$ effekt.sh -b ./chez-lift-runner.effekt --backend chez-monadic && ./out/chez_lift_runner hello world i am args
Nil()

ran after pulling latest master:

commit d8a1fba426511663c97386eedc00b244744fa6e4 (HEAD -> master, origin/master, origin/HEAD)
Merge: ea9a6c64 20dd400a
Author: Jonathan Immanuel Brachthäuser <jonathan@b-studios.de>
Date:   Mon Feb 5 18:16:27 2024 +0100

minimal effekt implementation:

import io/args

def main(): Unit = {
    println(commandLineArgs())
}

note 1:
issue can be fixed by changing the executable bash script to pass the arguments, tested only on chez-lift:

#!/bin/bash
scheme --script /home/max-priv/Dokumente/repos/fasteffekt/./out/chez_lift_runner.ss "$@"

-----------------------------------------------------------------

max-priv@NOAH367-L:~/Dokumente/repos/fasteffekt$ ./out/chez_lift_runner i am args
Cons(i, Cons(am, Cons(args, Nil())))

note:
llvm and ml backends dont even compile because they cant typecheck println(commandLineArgs())
will make separate issues there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions