Skip to content
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

ZiplineService.id #533

Closed
swankjesse opened this issue May 24, 2022 · 1 comment
Closed

ZiplineService.id #533

swankjesse opened this issue May 24, 2022 · 1 comment

Comments

@swankjesse
Copy link
Contributor

We’ve used the word name to refer to the identifier that bridges ZiplineService instances across platforms. This issue tracks two changes.

1. Find another word for ’name’

This string is a formal identifier that must exactly match across two platforms. I want a word that conveys that! Here’s some ideas:

  • id: these are implicitly unique. One drawback of id is it’s unclear that these can be arbitrary user-created strings.
  • handle: this really fits the use-case. But does it feel too frameworkey?

2. Add a property to ZiplineService

Let’s take whatever word we pick above and make it a property of ZiplineService:

interface ZiplineService {
  val id: String?
    get() = null

  fun close() {
  }
}

This won’t be bridged! Instead we configure our generated stubs to return the ID that was bound.

Why?

I want to track pass-by-reference parameters to the point that they’re leaked in a DebugEventListener. Getting the ID into the parameter feels like the easiest way to match things up.

One challenge is this will only be non-null on the stub side of the call. That might be a dealbreaker?

@swankjesse
Copy link
Contributor Author

Thinking more about this . . . . I think that adding a property to ZiplineService won’t solve my problem anyway. I’m gonna close this and I might open a 2nd issue with newer thoughts...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant