-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
reserved function "width" error message shows for valid code #5734
Comments
This problem seems to have occurred since ver |
It is a bit hard for me to debug this as I tracked it down to some weird bug in FES. Basically Someone more familiar with FES might want to take a look? @almchung @outofambit |
Hi everyone, I think FES's current regex method for checking reserved function names needs to be improved. This particular error message ( It would be great if anyone familiar with Javascript regular expressions could take a look at this problem. |
I agree that using regex for this case is likely reaching the limit of what we can do with it and could also have potential performance issues and edge cases. There isn't a comprehensive policy about including other libraries per se, just some considerations that I can think of. We do package some libraries already, most notably opentype.js so it's not impossible. However the largest concerns I have for bundling a parser is maintainability and final package size. As long as the parser included is relatively stable, maintainability might not be that big of an issue. Package size however I think could be a problem, although this only concerns unminified build as we can exclude the parser from minified build that doesn't have FES. |
I agree with both of you. Instead of adding more complexity (or trying to cover all edge cases), it would make sense to prioritize removing any false positives to minimize confusion. |
Let's go with the regex fix for now then. Anyone want to take this up and file a PR? Comment here and I'll assign the issue to you. |
I can finish up the regex above in a PR + add some more tests! |
Btw @KevinWorkman it seems like this is a combination of problems: first, not detecting that I think that second issue, that |
I'm using the latest version of the p5.js editor (p5.js version 1.4.1), and I have code like this:
When I run the sketch, the code works fine and I see a circle, but I also see this error message in the console:
Details about the bug:
The text was updated successfully, but these errors were encountered: