René's URL Explorer Experiment


Title: scripts/build fails: dist/ output directory not created before pslua writes to it · Issue #1 · purescript-lua/purescript-lua-assert · GitHub

Open Graph Title: scripts/build fails: dist/ output directory not created before pslua writes to it · Issue #1 · purescript-lua/purescript-lua-assert

X Title: scripts/build fails: dist/ output directory not created before pslua writes to it · Issue #1 · purescript-lua/purescript-lua-assert

Description: Summary A fresh nix develop -c ./scripts/build fails immediately with: Building... Compiling modules: pslua: /.../purescript-lua-assert/dist/Test_Assert.lua: withFile: does not exist (No such file or directory) The build cannot produce i...

Open Graph Description: Summary A fresh nix develop -c ./scripts/build fails immediately with: Building... Compiling modules: pslua: /.../purescript-lua-assert/dist/Test_Assert.lua: withFile: does not exist (No such file ...

X Description: Summary A fresh nix develop -c ./scripts/build fails immediately with: Building... Compiling modules: pslua: /.../purescript-lua-assert/dist/Test_Assert.lua: withFile: does not exist (No such file ...

Opengraph URL: https://github.com/purescript-lua/purescript-lua-assert/issues/1

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"scripts/build fails: dist/ output directory not created before pslua writes to it","articleBody":"## Summary\n\nA fresh `nix develop -c ./scripts/build` fails immediately with:\n\n```\nBuilding...\nCompiling modules:\npslua: /.../purescript-lua-assert/dist/Test_Assert.lua: withFile: does not exist (No such file or directory)\n```\n\nThe build cannot produce its output because the `dist/` output directory does not exist on a clean checkout, and nothing in the build creates it before `pslua` tries to write into it.\n\n## Root cause\n\nThe `pslua` invocation for this package lives in the `backend` field of `spago.dhall`, which `spago build` runs after compiling CoreFn:\n\n```dhall\n, backend =\n    ''\n    pslua \\\n    --foreign-path . \\\n    --ps-output output \\\n    --lua-output-file dist/Test_Assert.lua \\\n    --entry Test.Assert\n    ''\n```\n\n`pslua` opens the `--lua-output-file` target with `withFile path WriteMode` (see `exe/Main.hs` in `Unisay/purescript-lua`). `WriteMode` creates the *file* but not any missing *parent directories*. So writing `dist/Test_Assert.lua` requires `dist/` to already exist.\n\nOn a clean checkout it does not:\n\n- The repo's root `.gitignore` contains `/dist/`, so the directory is never committed.\n- `scripts/build` only runs `spago build` and never creates `dist/` first.\n\nResult: `withFile: does not exist`.\n\n## Why it works in sibling forks but not here\n\nThe other Lua forks (e.g. `purescript-lua-prelude`, `purescript-lua-strings`, `purescript-lua-arrays`) avoid this in two ways:\n\n1. They drive `pslua` directly from `scripts/build` rather than from the `spago.dhall` `backend` field.\n2. They commit a `dist/.gitignore` (containing `*.lua`) and do **not** ignore `/dist/` at the repo root, so `dist/` exists on a fresh checkout while the generated `.lua` files stay untracked.\n\n`purescript-lua-assert` does neither: its root `.gitignore` ignores all of `/dist/`, there is no committed `dist/.gitignore`, and the `pslua` call sits in `spago.dhall`. So nothing guarantees `dist/` exists at build time.\n\n## Impact\n\n`./scripts/build` is broken from a clean clone for everyone — CI and any new contributor. There is no workaround other than manually `mkdir dist` first. The package cannot be built by following its own build script.\n\n## How it was found\n\nRunning the documented build command on a freshly-reset checkout:\n\n```bash\ngit checkout master && git clean -fdx   # fresh state, no dist/\nnix develop -c ./scripts/build\n# -> pslua: .../dist/Test_Assert.lua: withFile: does not exist\necho $?   # 1\n```\n\n## Suggested fix\n\nMinimal and self-contained: have `scripts/build` create the output directory before building, e.g. `mkdir -p dist` ahead of `spago build`. This matches the intent of the sibling forks (guarantee `dist/` exists) without restructuring the build.\n\nNote: `pslua` not creating the parent directory of `--lua-output-file` is a latent rough edge worth tracking separately upstream in `Unisay/purescript-lua`; this issue tracks the package-side fix.\n","author":{"url":"https://github.com/Unisay","@type":"Person","name":"Unisay"},"datePublished":"2026-06-14T08:33:22Z","url":"https://github.com/purescript-lua/purescript-lua-assert/issues/1"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0d79d2a6-4647-9596-52bb-a0ebba263457
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDDDC:16EED3:3A83D5:4BF770:6B00D35F
html-safe-nonce4b4c4f0f701864a93563f6b64ab6832a422231fa0c925bf1ef1c1eb05f202a6a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERERDOjE2RUVEMzozQTgzRDU6NEJGNzcwOjZCMDBEMzVGIiwidmlzaXRvcl9pZCI6IjM5Njg3NjkwNzE0NDQ0NDgwOTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6cdb5cd086fc594dadae26fce89293c9ee6206bda16d2ea5c4088ce8a344aa6c
hovercard-subject-tagissue:4658453510
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/purescript-lua/purescript-lua-assert/1/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cd6b5a2374c4bff7f8854fa497eafa09b858136962770bc14bcd3a41a3a820b4/purescript-lua/purescript-lua-assert/issues/1
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cd6b5a2374c4bff7f8854fa497eafa09b858136962770bc14bcd3a41a3a820b4/purescript-lua/purescript-lua-assert/issues/1
og:image:altSummary A fresh nix develop -c ./scripts/build fails immediately with: Building... Compiling modules: pslua: /.../purescript-lua-assert/dist/Test_Assert.lua: withFile: does not exist (No such file ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameUnisay
hostnamegithub.com
expected-hostnamegithub.com
None85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5
turbo-cache-controlno-preview
go-importgithub.com/purescript-lua/purescript-lua-assert git https://github.com/purescript-lua/purescript-lua-assert.git
octolytics-dimension-user_id131581790
octolytics-dimension-user_loginpurescript-lua
octolytics-dimension-repository_id773124680
octolytics-dimension-repository_nwopurescript-lua/purescript-lua-assert
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id35369138
octolytics-dimension-repository_parent_nwopurescript/purescript-assert
octolytics-dimension-repository_network_root_id35369138
octolytics-dimension-repository_network_root_nwopurescript/purescript-assert
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4943239a6d2c591325dad6e5c313e1cafda877f6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/purescript-lua/purescript-lua-assert/issues/1#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua-assert%2Fissues%2F1
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua-assert%2Fissues%2F1
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=purescript-lua%2Fpurescript-lua-assert
Reloadhttps://github.com/purescript-lua/purescript-lua-assert/issues/1
Reloadhttps://github.com/purescript-lua/purescript-lua-assert/issues/1
Reloadhttps://github.com/purescript-lua/purescript-lua-assert/issues/1
purescript-luahttps://github.com/purescript-lua
purescript-lua-asserthttps://github.com/purescript-lua/purescript-lua-assert
Codehttps://github.com/purescript-lua/purescript-lua-assert
Issueshttps://github.com/purescript-lua/purescript-lua-assert/issues
Pull requestshttps://github.com/purescript-lua/purescript-lua-assert/pulls
Actionshttps://github.com/purescript-lua/purescript-lua-assert/actions
Projectshttps://github.com/purescript-lua/purescript-lua-assert/projects
Security and qualityhttps://github.com/purescript-lua/purescript-lua-assert/security
Insightshttps://github.com/purescript-lua/purescript-lua-assert/insights
https://github.com/purescript-lua/purescript-lua-assert
New issuehttps://github.com/login?return_to=https://github.com/purescript-lua/purescript-lua-assert/issues/1
New issuehttps://github.com/login?return_to=https://github.com/purescript-lua/purescript-lua-assert/issues/1
#2https://github.com/purescript-lua/purescript-lua-assert/pull/2
scripts/build fails: dist/ output directory not created before pslua writes to ithttps://github.com/purescript-lua/purescript-lua-assert/issues/1#top
#2https://github.com/purescript-lua/purescript-lua-assert/pull/2
https://github.com/Unisay
Unisayhttps://github.com/Unisay
on Jun 14, 2026https://github.com/purescript-lua/purescript-lua-assert/issues/1#issue-4658453510
Unisayhttps://github.com/Unisay
completedhttps://github.com/purescript-lua/purescript-lua-assert/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#2https://github.com/purescript-lua/purescript-lua-assert/pull/2
on Jun 14, 2026https://github.com/purescript-lua/purescript-lua-assert/issues/1#event-26724480298
Sign up for freehttps://github.com/signup?return_to=https://github.com/purescript-lua/purescript-lua-assert/issues/1
Sign in to commenthttps://github.com/login?return_to=https://github.com/purescript-lua/purescript-lua-assert/issues/1
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.