Skip to content

Commit 2365158

Browse files
authored
Merge pull request #58 from Sudha247/dune_pkg_new
Updates
2 parents 5674aad + ed0b182 commit 2365158

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ FROM alpine:3.21 AS build
33
# Install system dependencies
44
RUN apk -U upgrade --no-cache && apk add --no-cache \
55
# to download and install Dune Developer Preview with alpine:3.21
6-
build-base patch tar ca-certificates git rsync curl sudo bash \
7-
libx11-dev nano coreutils xz \
6+
build-base patch tar ca-certificates git \
7+
libx11-dev coreutils xz curl bash \
88
autoconf \
99
curl-dev \
1010
gmp-dev \
@@ -13,10 +13,12 @@ RUN apk -U upgrade --no-cache && apk add --no-cache \
1313
oniguruma-dev \
1414
openssl-dev
1515

16-
# Install Dune Developer Preview
17-
RUN curl -fsSL https://get.dune.build/install | sh
18-
RUN /bin/bash -c 'source "/root/.local/share/dune/env/env.bash"'
16+
ADD https://get.dune.build/2025-07-17/x86_64-unknown-linux-musl/dune-2025-07-17-x86_64-unknown-linux-musl.tar.gz .
17+
RUN tar xzf dune-2025-07-17-x86_64-unknown-linux-musl.tar.gz
18+
RUN mkdir -p /root/.local/bin \
19+
&& mv dune-2025-07-17-x86_64-unknown-linux-musl/dune /root/.local/bin/
1920
ENV PATH="/root/.local/bin:$PATH"
21+
RUN dune --version
2022

2123
# Build project
2224
WORKDIR "/root/ocaml.org"

HACKING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ cd OCaml.org
2626

2727
Ensure you have [Dune Developer Preview](https://preview.dune.build) installed. Dune will manage the OCaml compiler along with all of the OCaml packages needed to build and run the project. By this point, we should all be using some Unix-like system (Linux, macOS, WSL2). We assume you are using the most recent version of Dune Developer Preview.
2828

29+
If you would like to build using Dune installed via `opam`, make sure to remove the `dune.lock/` directories and use the same build commands present in the Makefile, skipping `dune pkg lock`.
30+
2931
### Running the Server
3032

3133
From the root of your project, you can just build and run the project with
3234

33-
```
35+
```bash
3436
make start
3537
```
3638

@@ -110,7 +112,7 @@ before they get merged.
110112

111113
OCaml.org is using an pinned version of `opam-repository`. This is intended to protect the build from upstream regressions. The opam repository is specified in one place:
112114

113-
```
115+
```bash
114116
dune-workspace
115117
```
116118

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fmt: ## Format the codebase with ocamlformat
4040
dune build --root . --auto-promote @fmt
4141

4242
.PHONY: watch
43-
watch: ## Watch for the filesystem and rebuild on every change
43+
watch: dune.lock ## Watch for the filesystem and rebuild on every change
4444
dune build @run -w --force --no-buffer
4545

4646
.PHONY: utop
@@ -49,8 +49,9 @@ utop: ## Run a REPL and link with the project's libraries
4949

5050
.PHONY: scrape_ocaml_planet
5151
scrape_ocaml_planet: dune.lock ## Generate the po files
52-
dune build --root . tool/ood-gen/bin/scrape.exe planet
53-
dune build --root . tool/ood-gen/bin/scrape.exe video
52+
dune build --root . tool/ood-gen/bin/scrape.exe
53+
dune exec --root . tool/ood-gen/bin/scrape.exe planet
54+
dune exec --root . tool/ood-gen/bin/scrape.exe video
5455

5556
.PHONY: scrape_changelog
5657
scrape_changelog:

playground/asset/merlin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

playground/asset/worker.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)