fix: preserve String trim alias identity - #23
Conversation
|
@ShiroKSH is attempting to deploy a commit to the alistair Team on Vercel. A member of the Team first needs to authorize it. |
|
@alii - Vercel is blocked on team authorization for this fork. Could you authorize the deployment or let me know if the PR can be reviewed without a preview? I can make any requested changes. Thanks! |
|
Hi maintainers, this PR has been open for over two weeks. When you have a moment, I would appreciate a review. Thank you. |
c3efd49 to
8ceec34
Compare
|
Hello! Thank you for the contribution. Arc is currently a very early research project. It's not clear to me yet the direction that Arc should even head in at the moment. For this reason I am hesitant to accept contributions while I figure out the design of Arc. What is the motivation for this change? Are you using Arc in production anywhere? It would be helpful to know how you are using Arc! Thank you! |
Summary
trimLeftshare the exact function object used bytrimStarttrimRightshare the exact function object used bytrimEndRoot cause
alloc_methodsallocated a new native function for every property entry. Reusing the same native dispatch variant therefore did not preserve function-object identity, and the aliases exposedtrimLeftandtrimRightas their function names.The canonical trim functions are now allocated once. Each alias installs the same function reference in a restamped property descriptor, preserving independent property ordering metadata.
Validation
gleam checkgleam test: 1561 passed, 0 failedgleam format --checkfor the changed filesgit diff --check