Repository navigation
Add Linux installation E2E tests across package managers - #131
Open
fhammerschmidt wants to merge 19 commits into
Open
fhammerschmidt wants to merge 19 commits into
fhammerschmidt wants to merge 19 commits into
Conversation
commit: |
fhammerschmidt
marked this pull request as ready for review
October 12, 2026 20:54
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing CI smoke test always creates one basic npm project through a special CI-only path. Add independent Ubuntu E2E jobs for npm, pnpm, Yarn Classic, Yarn Berry and Bun, using the packed CLI artifact and the normal interactive application paths.
Each manager creates a basic project and adds ReScript to an existing CommonJS project, both using the current ReScript 12 release and its bundled standard library. The npm job also covers existing ESM, NodeNext/bundler TypeScript with a compiled genType consumer, devcontainer-only named/current directories, and rejection of occupied directories without changing their files. Tests install real dependencies, verify lockfiles, compile ReScript and execute the generated program.
The harness and launcher are written in ReScript under
test/e2e/and reuse the productionPackageManagers.packageManagertype. E2E case labels and expected lockfiles remain test data. Update the development compiler and lockfile to ReScript 12.3.1 and enableLetUnwrapinrescript.json. Raw Node externals stay insrc/bindings/Node.res; a smallsrc/bindings/NodeSafe.resmodule adapts filesystem, process, child-process and URL operations to results/options. The command runner keeps its E2E-specific prompts, timeouts and assertions; command, file and test failures use polymorphic error variants with an exhaustive formatter. Setup and scenarios propagate failures withlet?, without rethrowing Node errors. Command cleanup runs before propagation, callback log failures stop the child safely, and workspace cleanup preserves the original failure if cleanup also fails. Assertion exceptions are captured at the scenario boundary. Known environment keys and nested JSON shapes usedict{...}patterns. Nullable stdin and exit values useValue,NullandUndefineddirectly, withNullable.getOrfor defaults. The ESM entry point handlesawait main()directly with a result match, with no try/catch in its orchestration. Setup constructs its launcher JSON directly, and empty commands return a validation error. Exception capture stays at the I/O adapters and test assertion boundary.Scenario parameters are mandatory, and typed command modes distinguish pipes from terminal prompts.
E2eScenarios.rescontains fixtures and assertions, whileE2eProcess.reshandles commands and prompts.npm run test:e2ecompiles the harness through the existing test configuration. Ubuntu's util-linuxscriptsupplies the terminal, with no additional npm dependencies. Failed jobs upload logs, and release publishing waits for the E2E matrix.AGENTS.md contains the ReScript conventions and the minimum E2E command/prerequisites; there is no separate E2E README.
Validation: all 52 regression tests pass, including ten focused tests for invalid commands, synchronous/asynchronous spawn errors, expected and unexpected exit statuses, signal termination, timeout cleanup, callback log failures and assertion capture. All five Ubuntu E2E jobs pass (17 cases) with Node 20.19.0. The build, Linux/Windows smoke jobs and both macOS smoke jobs also pass. Local entry-point checks also verify that context/setup failures return exit code 1 and remove the temporary workspace. ReScript formatting and production packing pass locally on Node 20.19.0; workflow lint passed for the workflow changes.
CI run