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

fork_tracker active support module does not play nice with passenger and zk gems #108

Open
niodice opened this issue Jun 14, 2023 · 2 comments · May be fixed by #109
Open

fork_tracker active support module does not play nice with passenger and zk gems #108

niodice opened this issue Jun 14, 2023 · 2 comments · May be fixed by #109

Comments

@niodice
Copy link

niodice commented Jun 14, 2023

I wanted to post this here because it's unclear to me if the root problem here is an implementation choice in this library, rails library or passenger library. Any advice is really helpful.

rails/rails#48475

@byroot
Copy link

byroot commented Jun 20, 2023

You can take inspiration from Active Support on how to catch forks in a non-obstrusive way: https://github.com/rails/rails/blob/c25cc2ead272a4c3965795139124dfe62ee5a79e/activesupport/lib/active_support/fork_tracker.rb

Note that starting from Ruby 3.1, it's much easier thanks to Process._fork.

casperisfine pushed a commit to casperisfine/zk that referenced this issue Jun 20, 2023
Fix: zk-ruby#108

`Module#prepend` is much more composable than alias method chains.

This is essentially a port of the Active Support implementation.
@byroot
Copy link

byroot commented Jun 20, 2023

I submitted a PR with the suggested changes: #109

@niodice you can probably give this branch a try.

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 a pull request may close this issue.

2 participants