ocaml / ocaml/dune

Error: Invalid dune file on Unicode in dune file

Open
#4,468 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

config
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

Expected Behavior

The path is treated like any other path.

Actual Behavior

File "dune", line 1, characters 16-16:
1 | (data_only_dirs что)

Error: Invalid dune file

Reproduction

Create a directory containing only a dune file with

(data_only_dirs что)

Run dune build.

It doesn't matter whether the directory что exists or not.

Specifications

  • Version of dune (output of dune --version): 2.8.5
  • Version of ocaml (output of ocamlc --version): 4.12.0
  • Operating system (distribution and version): Ubuntu 20.04 on WSL1

Additional information

I encountered this while trying to build a project with Melange, which appears to have a bsb that is a wrapper for Dune. The wrapper emits an absolute path into a generated dune.bsb file, which in my case sometimes contains non-Latin characters. I don't actually have Cyrillics in my project proper.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a dune file containing (data_only_dirs что) and run dune build. Start by tracing how the dune file parses the Unicode path; done means the path is accepted like any other path, whether or not the directory exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.