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

Using global state in a Capsule as well as a Template leads to unreachable code being reached at build-time #280

Closed
Miroito opened this issue Apr 27, 2023 · 2 comments
Labels
A-deployment Area: deployment C-bug Category: bug tribble-reported This issue was reported through Tribble.

Comments

@Miroito
Copy link
Contributor

Miroito commented Apr 27, 2023

This issue is reporting a bug in the code of Perseus. Details of the scope will be available in issue labels.
The author described their issue as follows:

Using global state in a capsule and a template where this capsule is used panics at build-time

The steps to reproduce this issue are as follows:

See MRE.

A minimum reproducible example is available at https://github.com/Miroito/capsule-global-state.

  • Hydration-related: false
  • The author is willing to attempt a fix: false
Tribble internal data

dHJpYmJsZS1yZXBvcnRlZCxDLWJ1ZyxBLWRlcGxveW1lbnQ=

@Miroito Miroito changed the title Using global state in a Capsule as well as a template leads to unreachable code being reached at build-time Using global state in a Capsule as well as a Template leads to unreachable code being reached at build-time Apr 27, 2023
@github-actions github-actions bot added A-deployment Area: deployment C-bug Category: bug tribble-reported This issue was reported through Tribble. labels Apr 27, 2023
@arctic-hen7
Copy link
Member

This is actually very easy to fix: Perseus does the logical thing and internally caches any global state from the server the first time it's accessed, but that should not be happening on the server-side, which it is! This should be a trivial fix.

@arctic-hen7
Copy link
Member

I'll release v0.4.1 with this fix ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-deployment Area: deployment C-bug Category: bug tribble-reported This issue was reported through Tribble.
Projects
None yet
Development

No branches or pull requests

2 participants