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

janet -c source with missing output files should give informative error message #1451

Open
kredati opened this issue Jun 6, 2024 · 1 comment

Comments

@kredati
Copy link

kredati commented Jun 6, 2024

This is my first issue; apologies if I get style or substance wrong. I absolutely adore Janet.

Desired behaviour (if not exactly expected):

$ janet -c source.janet 
> Error: expected output image path`

Actual behaviour:

$ janet -c source.janet
> error: expected integer key for array in range [0, 2), got 2
  in c-switch [boot.janet] (tailcall) on line 4066, column 18
  in cli-main [boot.janet] on line 4102, column 13

I feel like giving an internal stack trace on a user error like this is not ideal.

Alternative, possibly desired behaviour, is to use the source filename for the new image file:

$ janet -c source.janet
> Successfully builds source.jimage
@bakpakin
Copy link
Member

bakpakin commented Jun 7, 2024

I think this would be a good change, including the default argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants