Closed Bug 1927569 Opened 1 year ago Closed 1 year ago

Write JS topic guides for application-services components

Categories

(Application Services :: General, enhancement)

enhancement

Tracking

(firefox134 fixed)

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: bdk, Assigned: bdk)

References

Details

(Whiteboard: [disco-])

Attachments

(1 file)

We currently have some for Kotlin and Swift, let's add some for JS.

One weird part of this is that the JS components expose a different threading model than Kotlin/Swift. Maybe we could change the note at the top of the components to say something like:

The SuggestStore is written in synchronous Rust.

  • On Kotlin/Swift it needs to be wrapped in the asynchronous primitive of the target language you are using.
  • On JS it's automatically wrapped to be asynchronous. In general, each function/method will be an asynchronous version of the sync Rust function, however there are some exceptions. Speak to the DISCO team for details.

I'm sure this could be rewritten better, but AFAICT it has to be a bit convoluted. I don't think that's a bad thing, it captures the current state of affairs correctly and one of the benefits of improving our async story is that we'll be able to simplify this note or maybe remove it altogether.

The code samples should also have awaits littered through them, unlike the other code samples.

Assignee: nobody → bdeankawamura
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
Duplicate of this bug: 1910398
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: