WebAssembly / WebAssembly/WASI

Consider renaming error resource `to-debug-string` to `to-string`

Open
#680 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-io S-inactive
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

I've found that if I have a resource with a to-string that coerces to toString in JavaScript and immediately supports logging correctly etc due to JavaScript's blessed handling of the toString() method.

If the goal was to avoid this kind of conflation due to conflicts, I just wanted to mention that in general using the to-string name actually does what we do want in this error resource case for JavaScript, so could be worth considering aligning on. So far as other ecosystems don't have reasons to inhibit its use, JavaScript is certainly not a blocker and in fact if anything a reason to use to-string.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the error resource naming discussion around to-debug-string and the proposed to-string name, including the JavaScript behavior described in the issue. Check whether the rename is appropriate across other ecosystems; done means the project reaches a clear decision on the resource name.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.