-
Notifications
You must be signed in to change notification settings - Fork 24
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
Truncate long VArray.toString values #3440
Conversation
🦋 Changeset detectedLatest commit: 2bcdf71 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@@ -27,7 +27,34 @@ export class VArray | |||
} | |||
|
|||
valueToString() { | |||
return "[" + this.value.map((v) => v.toString()).join(",") + "]"; | |||
// For reference, for long types TypeScript returns the following error: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the documentation of this could be improved a fair bit. I asked o1 to do an attempt, a quick look to me makes that seem a fair bit better.
https://chatgpt.com/share/673799fd-d5f4-8003-8cbd-137896284080
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functionality of this seems good to me now. Just the documentation / variable naming that I think could use a bit of cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added more comments, hope this is good enough now.
(btw, o1 code is broken in at least one way, it could skip the first element; also, its comments don't match the code bahavior)
Before:
After:
This fixes long errors only for arrays; it's possible for similar errors to happen with dicts, but I've never encountered it so far.
I've also added a space after each comma, which forced me to upgrade all tests.
(previous stringification was inconsistent, we had spaces in dicts)