Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eval and compile procedure not working for min/max library when arity-check is disabled #56

Open
leo-ard opened this issue Nov 26, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@leo-ard
Copy link
Collaborator

leo-ard commented Nov 26, 2023

To reproduce (on dev branch):

> gsi -:r4rs rsc.scm -t js -l min -x test tests/00-ribbit/35-eval.scm -o test.js
> /test <<< "(* 6 7)"                                                          
/home/leonard/code/dirowars/ribbit/src/test:157
    let o = pc[1];
              ^

TypeError: Cannot read properties of undefined (reading '1')
    at run (/home/leonard/code/dirowars/ribbit/src/test:157:15)
    at Object.<anonymous> (/home/leonard/code/dirowars/ribbit/src/test:223:3)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.16.0

This bug is reproducible in py, js and asm hosts.

However, if we activate arity-check, then everything runs fine :

> gsi -:r4rs rsc.scm -t js -l min -f+ arity-check -x test tests/00-ribbit/35-eval.scm -o test.js
> ./test <<< "(* 6 7)"                                                                          
42

This bug is probably due to changes in the calling protocol, and min/max libraries where not updated accordingly. The bug is probably in the min/max library.

@leo-ard leo-ard added the bug Something isn't working label Nov 26, 2023
@leo-ard
Copy link
Collaborator Author

leo-ard commented Nov 26, 2023

I changed the tests 35-eval and 50-repl to use r4rs lib instead of min/max because of this bug. See commit : 54a9e93

@leo-ard
Copy link
Collaborator Author

leo-ard commented Jan 7, 2024

Seems to affect 90-macro as well

leo-ard added a commit that referenced this issue Aug 6, 2024
leo-ard added a commit that referenced this issue Aug 6, 2024
leo-ard added a commit that referenced this issue Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant