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

Replace backslash with forward slash #379

Merged
merged 4 commits into from
Jan 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pcweb: do not build on windows (unless overriding)
Avoid EMFILE errors when building reflex-web on windows during CI.

reflex-web has too many pages and causes too many files to get opened during
the build, and windows seems to have a non-configurable limit for open file
handles via the C runtime.

Until we come up with a nicer solution, simply disallow windows builds. If the
override environment variable is set (like in CI runs), then we will compile a
subset of pages for testing.
  • Loading branch information
masenf committed Jan 22, 2024
commit 2fc366aafb7b07cf72e5724e6d96d72775859ff4
14 changes: 14 additions & 0 deletions pcweb/pcweb.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""The main Reflex website."""

import os
import sys

import reflex as rx
import reflex.components.radix.themes as rdxt
from pcweb import styles
Expand All @@ -25,6 +28,17 @@
],
)


# XXX: The app is TOO BIG to build on Windows, so explicitly disallow it except for testing
if sys.platform == "win32":
if not os.environ.get("REFLEX_WEB_WINDOWS_OVERRIDE"):
raise RuntimeError(
"reflex-web cannot be built on Windows due to EMFILE error. To build a "
"subset of pages for testing, set environment variable REFLEX_WEB_WINDOWS_OVERRIDE."
)
routes = routes[:150]


# Add the pages to the app.
for route in routes:
app.add_page(
Expand Down