Skip to content

initial coqdoc support#5695

Merged
rgrinberg merged 1 commit intoocaml:mainfrom
Alizter:coqdoc
May 26, 2022
Merged

initial coqdoc support#5695
rgrinberg merged 1 commit intoocaml:mainfrom
Alizter:coqdoc

Conversation

@Alizter
Copy link
Copy Markdown
Collaborator

@Alizter Alizter commented May 12, 2022

No description provided.

@rgrinberg
Copy link
Copy Markdown
Member

@Alizter try running the tests again in this PR.

@rgrinberg rgrinberg linked an issue May 19, 2022 that may be closed by this pull request
@rgrinberg rgrinberg added the coq label May 19, 2022
@Alizter Alizter marked this pull request as ready for review May 22, 2022 00:41
@Alizter Alizter force-pushed the coqdoc branch 3 times, most recently from d01e2d7 to 314b3db Compare May 22, 2022 01:00
@rgrinberg
Copy link
Copy Markdown
Member

Looks good. Now for the mundane:

  • CHANGES entry
  • description of the feature in the manual
  • Fix CI

@ejgallego
Copy link
Copy Markdown
Collaborator

Would it be worth modifying coqdoc so it can be run incrementally? As far as I can tell, there is nothing preventing us to do that.

@Alizter
Copy link
Copy Markdown
Collaborator Author

Alizter commented May 23, 2022

@ejgallego Little tricky to know what is right. Compare:

html: $(GLOBFILES) $(VFILES)
	$(SHOW)'COQDOC -d html $(GAL)'
	$(HIDE)mkdir -p html
	$(HIDE)$(COQDOC) \
		-toc $(COQDOCFLAGS) -html $(GAL) $(COQDOCLIBS) -d html $(VFILES)

https://github.com/coq/coq/blob/6eda65e288831a27ef2edb7607ed2d01dffb3975/tools/CoqMakefile.in#L543-L547

with

$(HTMLFILES): %.html: %.v %.glob
	$(SHOW)'COQDOC -html $<'
	$(HIDE)$(COQDOC) $(COQDOCFLAGS) -html $< -o $@

https://github.com/coq/coq/blob/6eda65e288831a27ef2edb7607ed2d01dffb3975/tools/CoqMakefile.in#L829-L831

The coq_makefile approach seems to be both incrementally making HTML files and globbing them all into one operation. The latter is done for a table-of-contents --toc. Currently in dune we are doing only the latter. I don't see a way to make this incremental tbh.

@ejgallego
Copy link
Copy Markdown
Collaborator

@Alizter I guess we'll have to look at the code of Coqdoc to figure out how it works, not surprising 😈

@ejgallego
Copy link
Copy Markdown
Collaborator

Incidentally my first PR to Coq was on coqdoc, sadly it wasn't merged rocq-prover/rocq#133

@Alizter
Copy link
Copy Markdown
Collaborator Author

Alizter commented May 25, 2022

@ejgallego Incremental builds would be nice to have but I will leave it for a future PR. This is ready to merge.

@rgrinberg
Copy link
Copy Markdown
Member

Unfortunately this PR requires the fix in #5754 which is not yet done correctly.

@rgrinberg
Copy link
Copy Markdown
Member

@Alizter could you squash into a single commit?

@Alizter Alizter force-pushed the coqdoc branch 2 times, most recently from 183daec to a46d9bb Compare May 26, 2022 16:26
@Alizter
Copy link
Copy Markdown
Collaborator Author

Alizter commented May 26, 2022

FTR doc changes will come later in #5777

@Alizter Alizter force-pushed the coqdoc branch 2 times, most recently from 2ec7816 to 16304fe Compare May 26, 2022 17:01
The coq.theory stanza now provides rules for building Coq
documentation with coqdoc.

Given a theory name A, the directory targets A.html/ and A.tex/ build
the HTML and LaTeX documentation of Coq respectively.

The aliases @doc and (new) @doc-latex will build the HTML and LaTeX
targets respectively.

Signed-off-by: Ali Caglayan <alizter@gmail.com>

Co-Authored by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg rgrinberg merged commit d4e004e into ocaml:main May 26, 2022
@rgrinberg rgrinberg added this to the 3.3.0 milestone May 26, 2022
@Alizter Alizter deleted the coqdoc branch May 26, 2022 18:26
kit-ty-kate pushed a commit to ocaml/opam-repository that referenced this pull request Jun 17, 2022
…ne-site, dune-rpc, dune-rpc-lwt, dune-private-libs, dune-glob, dune-configurator, dune-build-info, dune-action-plugin and chrome-trace (3.3.0)

CHANGES:

- Sandbox preprocessing, lint, and dialect rules by default. All these rules
  now require precise dependency specifications (ocaml/dune#5807, @rgrinberg)

- Allow list expansion in the `pps` specification for preprocessing (ocaml/dune#5820,
  @Firobe)

- Add warnings 67-69 to dune's default set of warnings. These are warnings of
  the form "unused X.." (ocaml/dune#5844, @rgrinbreg)

- Introduce project "composition" for coq theories. Coq theories in separate
  projects can now refer to each other when in the same workspace (ocaml/dune#5784,
  @Alitzer, @rgrinberg)

- Fix hint message for ``data_only_dirs`` that wrongly mentions the unknown
  constructor ``data_only`` (ocaml/dune#5803, @lambdaxdotx)

- Fix creating sandbox directory trees by getting rid of buggy memoization
  (@5794, @rgrinberg, @snowleopard)

- Handle directory dependencies in sandboxed rules. Previously, the parents of
  these directory dependencies weren't created. (ocaml/dune#5754, @rgrinberg)

- Set the exit code to 130 when dune is terminated with a signal (ocaml/dune#5769, fixes
  ocaml/dune#5757)

- Support new locations of unix, str, dynlink in OCaml >= 5.0 (ocaml/dune#5582, @dra27)

- The ``coq.theory`` stanza now produces rules for running ``coqdoc``. Given a
  theory named ``mytheory``, the directory targets ``mytheory.html/`` and
  ``mytheory.tex/`` or additionally the aliases `@doc` and `@doc-latex` will
  build the HTML and LaTeX documentation repsectively. (ocaml/dune#5695, fixes ocaml/dune#3760,
  @Alizter)

- Coq theories marked as `(boot)` cannot depend on other theories
  (ocaml/dune#5867, @ejgallego)

- Ignore `bigarray` in `(libraries)` with OCaml >= 5.0. (ocaml/dune#5526, fixes ocaml/dune#5494,
  @moyodiallo)

- Start with :standard when building the ctypes generated foreign stubs so that
  we include important compiler flags, such as -fPIC (ocaml/dune#5816, fixes ocaml/dune#5809).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Coqdoc support

3 participants