Skip to content

Commit 00fb782

Browse files
committed
Merge branch 'main' of github.com:/ocaml/dune into markdown-for-odoc
* 'main' of github.com:/ocaml/dune: (147 commits) cram test: test only parameter flags in merlin generation fix(oxcaml): import eta-expansion changes from opam-repo (#12563) address review comments Mask the path to the stdlib fix(oxcaml): generate merlin config for library parameters fix(melange + include_qualified): track correct `.cmj` dependencies in emit (#12531) refactor: remove some unused code in [Path] (#12558) dep_rules: don't run (transitive) `ocamldep` on single module buildables (#12555) fix(pkg): ignore project settings for building packages test(pkg): reproduce #12131 melange: add a test for module cycle checks (#12554) chore: lint check for new changes entries (#12553) feature(cram): allow for conflict detection (#12538) ci: update for ocaml 5.4 release (#12552) chore(script): generate changelog from structure (#12516) Reuse dependencies between project and tools (#12526) Introduce Io.overwrite_file test: fix dune install requiring a mandir Enable package management for more tests Add a `dune tools env` command to add dev tools to PATH (#12521) ...
2 parents 1450c5e + 6938c7e commit 00fb782

File tree

380 files changed

+24813
-3251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

380 files changed

+24813
-3251
lines changed

.gitattributes

100755100644
File mode changed.

.github/workflows/binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
include:
13-
- os: macos-13
13+
- os: macos-15-intel
1414
name: x86_64-apple-darwin
1515
installable: .#
1616
- os: macos-14

.github/workflows/docker-image.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Docker Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: 'Create image for a specific tag'
10+
required: true
11+
type: string
12+
13+
env:
14+
REGISTRY: ghcr.io
15+
IMAGE_NAME: ${{ github.repository }}
16+
17+
jobs:
18+
docker:
19+
runs-on: ubuntu-latest
20+
21+
permissions:
22+
contents: read
23+
packages: write
24+
attestations: write
25+
id-token: write
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v5
30+
31+
- name: Log in to GitHub Container registry
32+
uses: docker/login-action@v3
33+
with:
34+
registry: ${{ env.REGISTRY }}
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Extract metadata (tags, labels) for Docker
39+
id: meta
40+
uses: docker/[email protected]
41+
with:
42+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
43+
44+
- name: Download release assets (current ref)
45+
if: ${{ github.ref_type == 'tag' }}
46+
env:
47+
GH_TOKEN: ${{ github.token }}
48+
run: |
49+
mkdir -p docker-context
50+
gh release download "${{ github.ref_name }}" \
51+
--pattern "*.tbz" \
52+
--dir docker-context
53+
mv docker-context/dune*.tbz docker-context/dune.tbz
54+
55+
- name: Download release assets (latest if ref is not present)
56+
if: ${{ github.ref_type == 'branch'}}
57+
env:
58+
GH_TOKEN: ${{ github.token }}
59+
run: |
60+
mkdir -p docker-context
61+
gh release download "${{ github.event.inputs.tag }}" \
62+
--pattern "*.tbz" \
63+
--dir docker-context
64+
mv docker-context/dune*.tbz docker-context/dune.tbz
65+
66+
- name: Set up Docker Buildx
67+
uses: docker/setup-buildx-action@v3
68+
69+
- name: Build and push Docker image
70+
id: push
71+
uses: docker/build-push-action@v6
72+
with:
73+
build-contexts: tarball=./docker-context
74+
file: ./docker/release.Dockerfile
75+
push: true
76+
tags: ${{ steps.meta.outputs.tags }}
77+
labels: ${{ steps.meta.outputs.labels }}
78+
79+
- name: Generate artifact attestation
80+
uses: actions/attest-build-provenance@v3
81+
with:
82+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
83+
subject-digest: ${{ steps.push.outputs.digest }}
84+
push-to-registry: true

.github/workflows/oxcaml.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ jobs:
2626
opam-repositories: |
2727
oxcaml: "git+https://github.com/oxcaml/opam-repository.git"
2828
default: "git+https://github.com/ocaml/opam-repository.git"
29+
opam-pin: false
2930

3031
- name: Install deps
3132
run: |
33+
opam pin add . -n --with-version=3.20.2+ox
3234
opam install . --deps-only
33-
opam install spawn
35+
opam install re spawn uutf
3436
3537
- name: Build dune
3638
run: opam exec -- make bootstrap

.github/workflows/workflow.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
concurrency:
1212
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
13-
cancel-in-progress: true
13+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1414

1515
permissions:
1616
contents: read
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: ${{ matrix.os }}
3838
steps:
3939
- uses: actions/checkout@v5
40-
- uses: nixbuild/nix-quick-install-action@v33
40+
- uses: nixbuild/nix-quick-install-action@v34
4141
with:
4242
nix_conf: ${{ env.EXTRA_NIX_CONFIG }}
4343
- uses: nix-community/cache-nix-action@v6
@@ -59,7 +59,7 @@ jobs:
5959
runs-on: ${{ matrix.os }}
6060
steps:
6161
- uses: actions/checkout@v5
62-
- uses: nixbuild/nix-quick-install-action@v33
62+
- uses: nixbuild/nix-quick-install-action@v34
6363
with:
6464
nix_conf: ${{ env.EXTRA_NIX_CONFIG }}
6565
- uses: nix-community/cache-nix-action@v6
@@ -75,7 +75,7 @@ jobs:
7575
runs-on: ubuntu-latest
7676
steps:
7777
- uses: actions/checkout@v5
78-
- uses: nixbuild/nix-quick-install-action@v33
78+
- uses: nixbuild/nix-quick-install-action@v34
7979
with:
8080
nix_conf: ${{ env.EXTRA_NIX_CONFIG }}
8181
- uses: nix-community/cache-nix-action@v6
@@ -91,7 +91,7 @@ jobs:
9191
runs-on: ubuntu-latest
9292
steps:
9393
- uses: actions/checkout@v5
94-
- uses: nixbuild/nix-quick-install-action@v33
94+
- uses: nixbuild/nix-quick-install-action@v34
9595
with:
9696
nix_conf: ${{ env.EXTRA_NIX_CONFIG }}
9797
- uses: nix-community/cache-nix-action@v6
@@ -114,7 +114,7 @@ jobs:
114114
runs-on: ${{ matrix.os }}
115115
steps:
116116
- uses: actions/checkout@v5
117-
- uses: nixbuild/nix-quick-install-action@v33
117+
- uses: nixbuild/nix-quick-install-action@v34
118118
with:
119119
nix_conf: ${{ env.EXTRA_NIX_CONFIG }}
120120
- uses: nix-community/cache-nix-action@v6
@@ -135,7 +135,7 @@ jobs:
135135
runs-on: ${{ matrix.os }}
136136
steps:
137137
- uses: actions/checkout@v5
138-
- uses: nixbuild/nix-quick-install-action@v33
138+
- uses: nixbuild/nix-quick-install-action@v34
139139
with:
140140
nix_conf: ${{ env.EXTRA_NIX_CONFIG }}
141141
- uses: nix-community/cache-nix-action@v6
@@ -164,7 +164,7 @@ jobs:
164164
# 4.02.x and 4.07.x in other environments
165165
include:
166166
# OCaml trunk:
167-
- ocaml-compiler: ocaml-variants.5.4.0+trunk
167+
- ocaml-compiler: ocaml-variants.5.5.0+trunk
168168
os: ubuntu-latest
169169
# OCaml 5:
170170
## ubuntu (x86)
@@ -176,8 +176,8 @@ jobs:
176176
os: macos-latest
177177
run_tests: true
178178
## macos (x86)
179-
- ocaml-compiler: 5.3.x
180-
os: macos-13
179+
- ocaml-compiler: 5.4.x
180+
os: macos-15-intel
181181
## MSVC
182182
- ocaml-compiler: ocaml-compiler.5.3.0,system-msvc
183183
os: windows-latest
@@ -256,7 +256,7 @@ jobs:
256256
runs-on: ubuntu-latest
257257
steps:
258258
- uses: actions/checkout@v5
259-
- uses: nixbuild/nix-quick-install-action@v33
259+
- uses: nixbuild/nix-quick-install-action@v34
260260
with:
261261
nix_conf: ${{ env.EXTRA_NIX_CONFIG }}
262262
- uses: nix-community/cache-nix-action@v6
@@ -276,7 +276,7 @@ jobs:
276276
runs-on: ubuntu-latest
277277
steps:
278278
- name: Install Node
279-
uses: actions/setup-node@v4
279+
uses: actions/setup-node@v5
280280
with:
281281
node-version: latest
282282

@@ -298,7 +298,7 @@ jobs:
298298
run: opam install --fake binaryen-bin
299299

300300
- name: Install Wasm_of_ocaml
301-
run: opam install "wasm_of_ocaml-compiler>=6.1" re spawn
301+
run: opam install "wasm_of_ocaml-compiler>=6.1" re spawn uutf
302302

303303
- name: Set Git User
304304
run: |
@@ -357,7 +357,7 @@ jobs:
357357
runs-on: ubuntu-latest
358358
steps:
359359
- uses: actions/checkout@v5
360-
- uses: nixbuild/nix-quick-install-action@v33
360+
- uses: nixbuild/nix-quick-install-action@v34
361361
with:
362362
nix_conf: ${{ env.EXTRA_NIX_CONFIG }}
363363
- uses: nix-community/cache-nix-action@v6

CHANGES.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ If you're a contributor, please include your CHANGES entry in a file
55
`doc/changes/$PR_NUMBER.md`. At release time, it will be incoporated into the
66
changelog properly.
77

8+
3.20.2 (2025-09-02)
9+
-------------------
10+
11+
### Fixed
12+
13+
- Fix jsoo separate compilation with modules_without_implementation. Regression
14+
introduced in #10767. (#12320, fixes #12306 @hhugo)
15+
16+
- Fix `runtest-js` mistakenly using wrong dependencies (#12324, @vouillon)
17+
18+
- Remove empty `.cram.test.t` directory during the running of a cram test.
19+
(#12329, fixes #12321, @Alizter)
20+
21+
- Fix Cygwin bootstrap (#12325, fixes #12316, @Alizter)
22+
823
3.20.1 (2025-08-25)
924
-------------------
1025

CLAUDE.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with
4+
code in this repository.
5+
6+
# Dune Development Guide
7+
8+
## Key Architecture
9+
10+
**Directory Structure:**
11+
- `bench` - contain benchmarks
12+
- `bin` - dune's command line
13+
- `boot` - building dune itself
14+
- `doc` - documentation
15+
- `otherlibs` - public libraries that live in this repository. not necessarily dune related
16+
- `src` - the majority of the source code
17+
- `src/dune_rules` - build rule generation (main logic)
18+
- `src/dune_engine` - incremental build engine
19+
- `src/dune_lang` - configuration file parser
20+
- `test` - dune's test suite
21+
- `vendor` - 3rd party code pulled into dune.
22+
23+
## Build Commands
24+
```bash
25+
make check # Quick build (recommended for development)
26+
make dev # Full build
27+
make fmt # Auto-format code (always run before committing)
28+
```
29+
30+
## Test Commands
31+
```bash
32+
dune runtest dir/test.t # To run a .t test (each .t is a full dune project)
33+
dune promote dir/test.t # To accept test output changes
34+
make test # To run all tests (567+ tests, very slow)
35+
```
36+
37+
## Development Guidelines
38+
- Always verify changes build with `make check`
39+
- Run `make fmt` to ensure code formatting (requires ocamlformat 0.27.0)
40+
- Keep lines under 80 characters
41+
- Don't add excessive comments unless prompted
42+
- Don't disable warnings or tests unless prompted
43+
- Use pattern-matching and functional programming idioms
44+
- Avoid `assert false` and other unreachable code
45+
46+
## Important Notes
47+
48+
- NEVER create files unless absolutely necessary
49+
- ALWAYS prefer editing existing files
50+
- NEVER proactively create documentation files (*.md) or README files
51+
- NEVER stage or commit changes unless explicitly requested
52+
- NEVER run `dune clean`
53+
- NEVER use the `--force` argument
54+
- NEVER try to build dune manually to run a test

0 commit comments

Comments
 (0)