daml/docs
Stefano Baghino f1ffd52e08
Java bindings: add DamlRecord, deprecate Record (#10132)
* Java bindings: add DamlRecord, deprecate Record

Fixes #10130

changelog_begin
[Java bindings] In order to avoid clashing with `java.lang.Record` (introduced
in Java 14), `com.daml.ledger.javaapi.data.Record` has been renamed to
`com.daml.ledger.javaapi.data.DamlRecord`. The old name has been used to
denote a sub-type of the newly renamed one, so it can still be used, but it has
been marked as deprecated.
[Java codegen] The Java codegen now uses the `DamlRecord` type wherever `Record`
was used before.
changelog_end

Boy-scout rule:
- removed references to ~old~ ancient versioning
- used `@deprecated` Javadoc annotation wherever meaningful
- some import re-arrangement performed by the linter

* Address https://github.com/digital-asset/daml/pull/10132#discussion_r659705929
2021-06-28 12:08:51 +00:00
..
configs Delete "testing with scenarios" section (#9360) 2021-04-08 14:50:33 +02:00
scripts Bump urllib3 to address dependabot warning (#9879) 2021-06-02 08:16:38 +00:00
source Java bindings: add DamlRecord, deprecate Record (#10132) 2021-06-28 12:08:51 +00:00
theme Minor docs fixes (#8662) 2021-01-29 08:42:36 +00:00
.gitignore docs: remove references to create-daml-app repo (#8805) 2021-02-10 11:45:59 +00:00
BUILD.bazel Add a section on exceptions to the Daml intro (#9832) 2021-05-28 14:48:34 +00:00
daml-intro-7.yaml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
error.html update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
README.md Daml case and logo (#8433) 2021-01-08 12:50:15 +00:00
redirect_template.html update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
redirects.map fix 9_functional redirect (#10067) 2021-06-21 19:11:23 +02:00

Daml Documentation

This directory contains all of the documentation that gets published to docs.daml.com.

Writing documentation

The docs are written in reStructuredText, built using Sphinx.

To edit documentation:

  • Same as code: find the file, edit it on a branch, make a PR.

  • For new files, best to copy existing ones, to get the formatting right.

    Don't forget you need to add your file to the toctree in /docs/source/index.rst and /docs/configs/pdf/index.rst.

  • Make sure you preview before you push.

  • Don't insert line-breaks inside inline literals. Building preview will treat this as an error.

Generated documentation

Not all of our docs are in rst files: some get generated. They are:

  • the ledger API proto docs
  • the Daml standard library reference
  • the Java bindings reference

To edit those docs, edit the content inside the code source.

Previewing

To preview the full docs, as deployed to docs.daml.com, run scripts/preview.sh.

To live-preview the docs, run scripts/live-preview.sh. The script accepts two flags:

  • --pdf includes the PDF documentation
  • --gen includes the generated documentation

Note that neither PDF, nor generated docs will benefit from live updates. To update generated docs or PDF docs, quit the preview script with CTRL+C and start it again.

Style conventions

For terminology and other style questions, follow the main DA documentation style guide.

A few pieces of RST guidance:

If youre not familiar, its really worth reading the primer for the basic syntax (emphasis, code text, lists, tables, images, comments, etc).

  • Keep paragraphs all on the same line (no newlines/line breaks).

  • Heading underlines in this hierarchical order:

    ######
    ******
    ======
    ------
    ^^^^^^
    """"""
    
  • For internal links, use the doc directive where you can.

  • For bullet points (unordered lists), use - (dashes).

  • For code blocks, use the literalinclude directive if you can: it's best to source code from files that we test whether they compile.

How the docs get built

The docs get built as part of the main daml repo CI, to make sure we don't break any links or do anything else that would cause Sphinx warnings.

Publishing docs

Documentation is published automatically whenever a release is made public on Github. Note that there is a delay so you might have to wait up to an hour until the docs are published after making a release public.

Testing code in docs

TBD