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

The runtime makes use of Fay.FFI.* functions that are defined in the application code. #405

Closed
cies opened this issue May 3, 2014 · 3 comments

Comments

@cies
Copy link

cies commented May 3, 2014

Somehow it feels weird that a runtime needs particular application code to run. This prevents (in some cases) the runtime from being in a separate JS file from the application code.

When wrongly separating the runtime from the application code I got the following JS error in my Chrome browser:

Uncaught ReferenceError: Fay is not defined

Find more info about this issue here:

fpco/yesod-fay#12

@bergmark
Copy link
Member

bergmark commented May 4, 2014

The runtime should always be printed before application code. It references the Defined and Nullable types inside functions that are only invoked through application code. I don't see how this could go wrong... Is this reproducible without yesod-fay if you use fay --no-rts and include the runtime separately?

@cies
Copy link
Author

cies commented May 4, 2014

I just tried, but could not reproduce it in a minimal Fay-only example. As you said I used --no-rts and included the runtime separately, after that it still works like a charm.

I'll look deeper into what Yesod-Fay does differently.

@bergmark
Copy link
Member

I'll close this in favor of fpco/yesod-fay#12. Please re-open if it turns out to be a fay problem.

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

2 participants