Skip to content

Conversation

cristianoc
Copy link
Collaborator

Summary

  • add container setup instructions describing how to install OCaml and dune manually

Testing

  • not run (documentation change)

https://chatgpt.com/codex/tasks/task_e_68cb775741a0833193e0e6246b9b4b75

@cristianoc
Copy link
Collaborator Author

@codex: do make test

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +74 to +83
let test_rewrite_loses_return_flag _ctx =
let source = "let f = x => g(x)\n" in
let structure = parse_structure source in
let body = extract_fun_body structure in
OUnit.assert_bool "pre-rewrite body should be marked"
(Res_return_marker.expression_is_return body);
let rewritten = Ppx_entry.rewrite_implementation structure in
let rewritten_body = extract_fun_body rewritten in
OUnit.assert_bool "rewritten body currently loses its return flag"
(not (Res_return_marker.expression_is_return rewritten_body))

Choose a reason for hiding this comment

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

[P1] Invert return-flag assertion after rewriting

The new test_rewrite_loses_return_flag intentionally asserts that Ppx_entry.rewrite_implementation drops the return marker (assert_bool … (not (Res_return_marker.expression_is_return rewritten_body))). Tests should encode the desired behaviour, i.e. the flag should be preserved after rewriting. As written, the suite now passes only when the bug exists and will fail once the bug is fixed, which both masks the regression and locks the incorrect behaviour in place.

Useful? React with 👍 / 👎.

Copy link

Summary

  • Attempted to run make test, but the build failed because dune could not find required OCaml libraries (flow_parser, ounit2, yojson, cmarkit) and the cppo preprocessing tool, so the test suite never executed.
  • Tried to bootstrap opam in order to install the missing packages, but the repository download was blocked with an HTTP 403 from the proxy, preventing dependency installation.

Testing

  • make test

View task →

make format && make checkformat
```

## Container Tooling Setup
Copy link
Member

Choose a reason for hiding this comment

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

We also have our dev container setup (for working in a container in VS Code) at https://github.com/rescript-lang/rescript/tree/master/.devcontainer.

Do we actually need two different Docker setups?
If so, then it would be great to have a Dockerfile for this one, too, so that the agent just needs to run docker build in the correct directory.

@cristianoc
Copy link
Collaborator Author

cristianoc commented Sep 19, 2025

I did not get this to go very far. Even instructing to install opam via apt-get, it always gets to the point where some fetch is blocked:

Attempted to install project dependencies with opam, but downloads from hosts such as erratique.ch, ocaml.janestreet.com, and gitlab.inria.fr were blocked by the proxy (curl exit code 56 / HTTP 403), leaving libraries like cmarkit, menhir, and sexplib0 unavailable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants