[p5.js 2.0 Beta Bug Report]: FES parameter validation for `print` not accepting multiple arguments
Open
Nobody has claimed this yet.
p5.js 2.0+
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
2.0.0-beta.4
Web browser and version
No response
Operating system
No response
Steps to reproduce this
Steps:
- Use
print()with more than 1 arguments will cause FES to print an incorrect message🌸 p5.js says: Expected at most 1 argument, but received more in print(). For more information, see https://p5js.org/reference/p5/print. - It should not be printing that message as
print()likeconsole.log()accepts any number of arguments. This should either be fixed in the reference and/or in FES parameter validation logic itself.
Snippet:
function setup() {
createCanvas(400, 400);
print(1, 2);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the print() implementation and its Friendly Errors System parameter validation, using the provided setup() snippet with print(1, 2) to reproduce the message. Compare the validation with print()'s documented behavior and update the relevant reference or validation logic so multiple arguments are accepted without the incorrect error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100