Fl_dynload.load_packages in a PPX
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
Expected Behavior
Fl_dynload.load_packages should load packages, even when used inside a PPX rewriter.
Actual Behavior
Fl_dynload.load_packages fails to load any packages since findlib is not properly initialized in the executable generated for PPX preprocessors: the file findlib_initl.ml-gen, which is generated usually for executable targets that link with findlib.dynload, is not generated for PPX preprocessors.
Reproduction
- PR with a reproducing test: https://github.com/ocaml/dune/pull/3213
Specifications
- Version of
dune(output ofdune --version): 2.3.1 - Version of
ocaml(output ofocamlc --version) 4.09.0 - Operating system (distribution and version): Ubuntu 19.10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproducing test in PR #3213 and inspect how findlib_initl.ml-gen is generated for executable targets versus PPX preprocessors. Verify the behavior of Fl_dynload.load_packages inside a PPX rewriter; done means the packages load successfully under the stated Dune and OCaml versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100