Skip to content

Commit cf4e968

Browse files
respencer-nclclaude
andcommitted
Update documentation for hugo/diagrams relocation to riddl-gen
- Update command-line-help.md with current riddlc commands - Add riddl-gen notices to hugo.md, diagrams.md, translation/_index.md - Update options.md with current command options (bastify, unbastify, etc.) - Update ways-to-use-riddl.md with riddl-gen reference - Add deprecation warning to riddlcExamples.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3c242dd commit cf4e968

7 files changed

Lines changed: 293 additions & 425 deletions

File tree

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
---
22
title: "Diagrams"
3-
description: "RIDDL can generate diagrams"
3+
description: "RIDDL diagram generation"
44
type: "page"
55
draft: "false"
66
weight: 20
77
---
8+
9+
{{% hint info %}}
10+
**Moved to riddl-gen**
11+
12+
Diagram generation has been moved to the
13+
[riddl-gen](https://github.com/ossuminc/riddl-gen) repository.
14+
15+
The `riddl-gen` tool can generate various diagram types from RIDDL models:
16+
- Context maps
17+
- Data flow diagrams
18+
- Entity relationship diagrams
19+
- Use case diagrams
20+
- And more
21+
22+
Please see the [riddl-gen documentation](https://github.com/ossuminc/riddl-gen)
23+
for usage instructions.
24+
{{% /hint %}}

doc/src/main/hugo/content/guides/authors/riddlcExamples.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ draft: true
55
weight: 20
66
---
77

8+
{{% hint warning %}}
9+
**Note**: This page references the `hugo` and `hugo-git-check` commands which
10+
have been moved to the [riddl-gen](https://github.com/ossuminc/riddl-gen)
11+
repository. The examples below need to be updated for current `riddlc` commands.
12+
{{% /hint %}}
13+
814
Because riddlc is a very rich command, we thought it might be useful to provide
915
some examples. We use these commands in our day to day work and hope that these
1016
examples give you ideas on how to adapt riddlc to your particular work style

doc/src/main/hugo/content/guides/implementors/ways-to-use-riddl.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ command in sbt. Follow these steps:
5353
* `riddlcPath := file("...")` This defaults to "riddlc" which is
5454
appropriate if the right version is in your path; otherwise specify the
5555
full path to the `riddlc` command
56-
* `riddlcOptions := Seq("from", "path/to/config/file", "hugo")` This is
57-
just an example, you can put any command or options you want in that
58-
sequence. Use `riddlc help` to find out what commands you can use.
56+
* `riddlcOptions := Seq("from", "path/to/config/file", "validate")` This is
57+
just an example, you can put any command or options you want in that
58+
sequence. Use `riddlc help` to find out what commands you can use.
59+
Note: Hugo generation has moved to the `riddl-gen` repository.
5960
* To run a translator in this way, put a `riddlc.conf` file next to the top
6061
level `.riddl` file you want to translate. The content of that file can
6162
specify common options and the commands you want to support from
@@ -64,7 +65,7 @@ command in sbt. Follow these steps:
6465
These files use
6566
[Human-Oriented-CONfiguration](https://github.com/lightbend/config)
6667

67-
```hocon
68+
```hocon
6869
common {
6970
show-times = true
7071
verbose = true
@@ -74,20 +75,18 @@ common {
7475
show-missing-warnings = false
7576
show-style-warnings = false
7677
}
77-
hugo {
78+
validate {
7879
input-file = "ReactiveBBQ.riddl"
79-
output-dir = "target/hugo/ReactiveBBQ"
80-
project-name = "Reactive BBQ"
81-
site-title = "Reactive BBQ Generated Specification"
82-
site-description = "This site provides a specification for the Reactive BBQ application as generated by riddlc"
83-
site-logo-path = "images/RBBQ.png"
84-
erase-output = true
85-
base-url = "https://bbq.riddl.tech"
86-
source-url = "https://github.com/ossuminc/riddl"
87-
edit-path = "/-/blob/main/src/riddl/ReactiveBBQ"
8880
}
89-
validate {
81+
prettify {
9082
input-file = "ReactiveBBQ.riddl"
83+
output-dir = "target/prettified"
84+
}
9185
```
9286

87+
{{% hint info %}}
88+
**Note**: Hugo documentation generation has moved to the
89+
[riddl-gen](https://github.com/ossuminc/riddl-gen) repository.
90+
{{% /hint %}}
91+
9392

doc/src/main/hugo/content/tooling/riddlc/command-line-help.md

Lines changed: 105 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ draft: false
66
weight: 10
77
---
88

9-
riddlc is the command that makes all the magic happen. As you will see, riddlc
10-
is a rich and powerful tool for processing RIDDL input.
9+
riddlc is the command that makes all the magic happen. As you will see, riddlc
10+
is a rich and powerful tool for processing RIDDL input.
1111

1212
## Command Syntax overview
1313
`riddlc` uses a sub-command structure. At a high level, the command line syntax
@@ -16,125 +16,129 @@ is very simple:
1616
> riddlc [common options] command-name [command-options]
1717
```
1818

19+
## Available Commands
20+
21+
The following commands are available in `riddlc`:
22+
23+
| Command | Description |
24+
|---------|-------------|
25+
| `about` | Print out information about RIDDL |
26+
| `bastify` | Convert a RIDDL file to BAST (Binary AST) format |
27+
| `dump` | Dump the AST of the input file |
28+
| `unbastify` | Convert a BAST file back to RIDDL source files |
29+
| `flatten` | Flatten all includes into a single file |
30+
| `from` | Load a configuration file and execute a command from it |
31+
| `help` | Print out how to use this program |
32+
| `info` | Print out build information about this program |
33+
| `onchange` | Watch a directory and run a command when changes occur |
34+
| `parse` | Parse the input file and report any errors |
35+
| `prettify` | Reformat RIDDL source to a standard layout |
36+
| `repeat` | Repeatedly run a command for edit-build-check cycles |
37+
| `stats` | Generate statistics about a RIDDL model |
38+
| `validate` | Parse and validate the input file |
39+
| `version` | Print the version of riddlc and exit |
40+
41+
{{% hint info %}}
42+
**Note**: Hugo documentation generation and diagram generation have been moved
43+
to the [riddl-gen](https://github.com/ossuminc/riddl-gen) repository. Use that
44+
tool if you need to generate Hugo sites or diagrams from RIDDL models.
45+
{{% /hint %}}
46+
1947
## Info Command Output
2048
For this version of `riddlc`:
2149
```shell
22-
> content % riddlc info
50+
> riddlc info
2351
[info] About riddlc:
2452
[info] name: riddlc
25-
[info] version: 0.14.0
53+
[info] version: 1.1.2
2654
[info] documentation: https://riddl.tech
27-
[info] copyright: © 2019-2022 Ossum Inc.
28-
[info] built at: 2022-09-09 11:28:07.485-0400
55+
[info] copyright: © 2019-2026 Ossum Inc.
2956
[info] licenses: Apache License, Version 2.0
3057
[info] organization: Ossum Inc.
31-
[info] scala version: 2.13.8
32-
[info] sbt version: 1.7.1
33-
```
34-
the help text shows the commands and options available:
35-
58+
[info] scala version: 3.3.7
3659
```
37-
RIDDL Compiler © 2019-2022 Ossum Inc. All rights reserved."
38-
Version: 0.13.3-2-49ff0a59-20220909-1104-SNAPSHOT
3960

40-
This program parses, validates and translates RIDDL sources to other kinds
41-
of documents. RIDDL is a language for system specification based on Domain
42-
Drive Design, Reactive Architecture, and distributed system principles.
61+
## Common Options
4362

63+
The following options apply to all commands:
4464

45-
Usage: riddlc [options]
46-
65+
```
4766
-t | --show-times
48-
Show compilation phase execution times
67+
Show parsing phase execution times
68+
-I | --show-include-times
69+
Show parsing of included files execution times
4970
-d | --dry-run
5071
go through the motions but don't write any changes
5172
-v | --verbose
52-
Provide verbose output detailing riddlc's actions
73+
Provide verbose output detailing actions taken by riddlc
5374
-D | --debug
5475
Enable debug output. Only useful for riddlc developers
5576
-q | --quiet
5677
Do not print out any output, just do the requested command
57-
-w | --suppress-warnings
78+
-a | --no-ansi-messages
79+
Do not print messages with ANSI formatting
80+
-w <value> | --show-warnings <value>
5881
Suppress all warning messages so only errors are shown
59-
-m | --suppress-missing-warnings
60-
Show warnings about things that are missing
61-
-s | --suppress-style-warnings
62-
Show warnings about questionable input style.
63-
-P <value> | --plugins-dir <value>
64-
Load riddlc command extension plugins from this directory.
65-
66-
Usage: [about|dump|from|help|hugo|info|parse|repeat|validate|version] <args>...
67-
68-
Command: about
69-
Print out information about RIDDL
70-
71-
Command: dump input-file
72-
input-file
73-
74-
Command: from config-file target-command
75-
Loads a configuration file and executes the command in it
76-
config-file
77-
A HOCON configuration file with riddlc options in it.
78-
target-command
79-
The name of the command to select from the configuration file
80-
81-
Command: help
82-
Print out how to use this program
83-
84-
Command: hugo [options] input-file
85-
Parse and validate the input-file and then translate it into the input
86-
needed for hugo to translate it to a functioning web site.
87-
input-file
88-
required riddl input file to read
89-
-o <value> | --output-dir <value>
90-
required output directory for the generated output
91-
-p <value> | --project-name <value>
92-
optional project name to associate with the generated output
93-
-e <value> | --erase-output <value>
94-
Erase entire output directory before putting out files
95-
-b <value> | --base-url <value>
96-
Optional base URL for root of generated http URLs
97-
-t <value> | --themes <value>
98-
Add theme name/url pairs to use alternative Hugo themes
99-
-s <value> | --source-url <value>
100-
URL to the input file's Git Repository
101-
-h <value> | --edit-path <value>
102-
Path to add to source-url to allow editing
103-
-m <value> | --site-logo-path <value>
104-
Path, in 'static' directory to placement and use
105-
of the site logo.
106-
-n <value> | --site-logo-url <value>
107-
URL from which to copy the site logo.
108-
109-
Command: info
110-
Print out build information about this program
111-
112-
Command: parse input-file
113-
input-file
114-
115-
Command: repeat [options] config-file target-command [refresh-rate] [max-cycles]
116-
This command supports the edit-build-check cycle. It doesn't end
117-
until <max-cycles> has completed or EOF is reached on standard
118-
input. During that time, the selected subcommands are repeated.
119-
config-file
120-
The path to the configuration file that should be repeated
121-
target-command
122-
The name of the command to select from the configuration file
123-
refresh-rate
124-
Specifies the rate at which the <git-clone-dir> is checked
125-
for updates so the process to regenerate the hugo site is
126-
started
127-
max-cycles
128-
Limit the number of check cycles that will be repeated.
129-
-n | --interactive
130-
This option causes the repeat command to read from the standard
131-
input and when it reaches EOF (Ctrl-D is entered) then it cancels
132-
the loop to exit.
133-
134-
Command: validate input-file
135-
input-file
136-
137-
Command: version
138-
Print the version of riddlc and exits
82+
-m <value> | --show-missing-warnings <value>
83+
Suppress warnings about things that are missing
84+
-s <value> | --show-style-warnings <value>
85+
Suppress warnings about questionable input style
86+
-u <value> | --show-usage-warnings <value>
87+
Suppress warnings about usage of definitions
88+
-i <value> | --show-info-messages <value>
89+
Suppress information output
90+
-S <value> | --sort-messages-by-location <value>
91+
Print all messages sorted by file name and line number
92+
-G <value> | --group-messages-by-kind <value>
93+
Print all messages grouped by severity
94+
-x <value> | --max-parallel-parsing <value>
95+
Maximum number of include files parsed in parallel
96+
--max-include-wait <value>
97+
Maximum time to wait for include file parsing
98+
--warnings-are-fatal <value>
99+
Makes validation warnings fatal
100+
-B | --auto-generate-bast
101+
Automatically generate .bast files after parsing
102+
```
103+
104+
## Command Details
105+
106+
### bastify
107+
Convert a RIDDL file to BAST (Binary AST) format for faster loading:
108+
```shell
109+
riddlc bastify input-file.riddl
110+
```
111+
Creates a `.bast` file next to the input file.
112+
113+
### unbastify
114+
Convert a BAST file back to RIDDL source:
115+
```shell
116+
riddlc unbastify input-file.bast -o output-dir
117+
```
118+
119+
### from
120+
Load options from a HOCON configuration file:
121+
```shell
122+
riddlc from config-file.conf target-command
123+
```
139124

125+
### prettify
126+
Reformat RIDDL source to a standard layout:
127+
```shell
128+
riddlc prettify input-file.riddl -o output-dir
140129
```
130+
Options:
131+
- `--project-name <value>` - Project name for the output
132+
- `-s | --single-file <value>` - Resolve all includes into a single file
133+
134+
### validate
135+
Parse and validate a RIDDL file:
136+
```shell
137+
riddlc validate input-file.riddl
138+
```
139+
140+
### stats
141+
Generate statistics about a RIDDL model:
142+
```shell
143+
riddlc stats -I input-file.riddl
144+
```

doc/src/main/hugo/content/tooling/riddlc/translation/_index.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,29 @@ draft: "false"
66
weight: 50
77
---
88

9-
The RIDDL compiler, `riddlc` is able to translate RIDDL into a variety of other
10-
document types, after the input passes the
11-
[compilation phases]({{< relref "../compilation.md" >}}).
9+
{{% hint warning %}}
10+
**Moved to riddl-gen**
1211

13-
The various kinds of output from `riddlc` are described in the following
14-
sections:
12+
The RIDDL translation commands (Hugo documentation generation and diagram
13+
generation) have been moved to the
14+
[riddl-gen](https://github.com/ossuminc/riddl-gen) repository.
1515

16-
* [_Hugo_]({{< relref "hugo.md" >}}) - Hugo source input for producing an
17-
HTML website where diagrams are all automatically deduced from the RIDDL
18-
model
16+
Please use `riddl-gen` for:
17+
- Generating Hugo-based documentation websites from RIDDL models
18+
- Generating various diagram types (context maps, data flow diagrams, etc.)
1919

20-
{{% hint ok %}}
21-
It is recommended that you become familiar with the `riddlc`command line and
22-
configuration [options]({{< relref "options" >}}) as these control the kind of
23-
output generated.
20+
The core `riddlc` compiler focuses on parsing, validation, and BAST
21+
serialization.
2422
{{% /hint %}}
23+
24+
## What riddlc Can Do
25+
26+
The `riddlc` compiler provides these core capabilities:
27+
28+
- **Parse** - Parse RIDDL source files and report syntax errors
29+
- **Validate** - Validate RIDDL models for semantic correctness
30+
- **Prettify** - Reformat RIDDL source to a standard layout
31+
- **BAST** - Convert between RIDDL and Binary AST format for faster loading
32+
- **Stats** - Generate statistics about RIDDL models
33+
34+
See the [command-line help]({{< relref "command-line-help.md" >}}) for details.

0 commit comments

Comments
 (0)