Skip to content

Conversation

marvinborner
Copy link
Member

@marvinborner marvinborner commented Jun 1, 2025

Permits a temporary fix for #1026.

We can now do NODE_FLAGS="--max-old-space-size=8192" and it will automatically add the flags to the node runner flags (in shebang). I also added VALGRIND_FLAGS, CHEZ_FLAGS, and CFLAGS (for historic reasons)

os match {
case OS.POSIX =>
val shebang = "#!/usr/bin/env node"
val shebang = s"#!/usr/bin/env -S node ${flags.mkString(" ")}"
Copy link
Member Author

@marvinborner marvinborner Jun 1, 2025

Choose a reason for hiding this comment

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

Not sure how reliable env -S is for other platforms, but I do not see another elegant way of adding the flags to the node runner. See https://unix.stackexchange.com/questions/399690/multiple-arguments-in-shebang

Copy link
Member Author

@marvinborner marvinborner Jun 1, 2025

Choose a reason for hiding this comment

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

I just remembered, this is very related to one of my first contributions #329, which was deemed inadequate! According to #857, this should be safe by now, though?

@marvinborner
Copy link
Member Author

No idea what's happening with CI, can not reproduce errors locally. CI also doesn't seem to have anything relevant in the environment. Hmmm.

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.

1 participant