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

Scope all events to a code session #1664

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

swankjesse
Copy link
Collaborator

This gives us a code version to attribute failures to.

This is a backwards-incompatible change; we need to pass an EventListener.Factory instead of an EventListener when creating a TreehouseApp.

This drops the appStart() and appCanceled() events. These are roughly approximated by the scoped codeLoadStart() and codeUnloaded() functions.

@@ -46,9 +47,10 @@ public class TreehouseApp<A : AppService> private constructor(
) {
private val codeHost = ZiplineCodeHost<A>()

public val dispatchers: TreehouseDispatchers = factory.dispatchers
// TODO: remove after https://github.com/cashapp/zipline/pull/1159
private val ziplineToPublisherHack = mutableMapOf<Zipline, RealEventPublisher>()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m massively cheating here 'cause I want to correlate the Zipline-layer EventListener with the Treehouse-layer EventListener, but I don’t control the creation of the Zipline-layer one.

That PR has the fix!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d like to hold this until I can rebase on that upgrade.

This gives us a code version to attribute failures to.

This is a backwards-incompatible change; we need to pass
an EventListener.Factory instead of an EventListener when
creating a TreehouseApp.

This drops the appStart() and appCanceled() events. These
are roughly approximated by the scoped codeLoadStart()
and codeUnloaded() functions.
@swankjesse swankjesse force-pushed the jwilson.1101.scope_to_code_session branch from 452ef54 to 87b9818 Compare November 3, 2023 03:29
@swankjesse swankjesse merged commit a143bf1 into trunk Nov 3, 2023
8 checks passed
@swankjesse swankjesse deleted the jwilson.1101.scope_to_code_session branch November 3, 2023 04:06
@swankjesse
Copy link
Collaborator Author

Part of #1458

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

Successfully merging this pull request may close these issues.

3 participants