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

Bug: Negative index not correctly displayed in error message #275

Open
avidrucker opened this issue Aug 21, 2023 · 2 comments
Open

Bug: Negative index not correctly displayed in error message #275

avidrucker opened this issue Aug 21, 2023 · 2 comments

Comments

@avidrucker
Copy link
Contributor

Error message should be "Couldn't find element -1 in vector of length 4." but instead is "Couldn't find element 1 in vector of length 4."

Note: Opening up the stacktrace in Maria gives a more accurate error message of "Error: No item -1 in vector of length 4" so, it seems that the negative sign is getting stripped/trimmed/removed somewhere.

This issue's breadcrumbs start here I believe:

(str "Couldn't find element %1 in vector of length %2."

Minimum bug reproduction: https://www.maria.cloud/gist/be48e97150866eb979bf638bd47b5f46

Screenshot of example reproduction:
image

@avidrucker
Copy link
Contributor Author

I'm feeling suspicious of the regex used in tokenize, though it's just a hunch.

@avidrucker
Copy link
Contributor Author

avidrucker commented Aug 21, 2023

It could potentially resolve the issue to add "%-" to the regex in tokenize, though I'm not sure what this will do to the rest of the codebase without running any tests. Here's an example where I modified the regex in tokenize: https://www.maria.cloud/gist/6e003b6e80ca0a963f5ab4e340b401f8

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

No branches or pull requests

1 participant