Select Git revision
compiler.md

René Schöne authored
- described incremental dependency tracking and tree connections - highlight compiler options and introduced dependencies
compiler.md 4.45 KiB
Compiler options
The compiler is JastAdd-compliant, i.e., it accepts all flags available for JastAdd, though there is no process how to chain pre-processors yet. Additional options are as follows.
Name | Required (Default) | Description |
---|---|---|
--rootNode |
Yes | Root node in the base grammar. |
--protocols |
No (mqtt ) |
Protocols to enable, currently available: mqtt, rest . |
--printYaml |
No (false) | Print out YAML instead of generating files. |
--verbose |
No (false) | Print more messages while compiling. |
--logReads |
No (false) | Enable logging for every received message. |
--logWrites |
No (false) | Enable logging for every sent message. |
--logIncremental |
No (false) | Enable logging for observer in incremental dependency tracking. |
--experimental-jastadd-329 |
No (false) | Use trace events INC_FLUSH_START and INC_FLUSH_END (JastAdd issue #329), see section about automatic dependency tracking. |
--incremental |
No (false) | Enables incremental dependency tracking (if trace is also set appropriately). |
--trace[=flush] |
No (false) | Enables incremental dependency tracking (if incremental is also set appropriately). |
--version |
No (false) | Print version info and exit (reused JastAdd option) |
--o |
No (. ) |
Output directory (reused JastAdd option) |
All files to be process have to be passed as arguments.
Their type is decided by the file extension (ast
and relast
for input grammars, connect
and ragconnect
for RagConnect definitions file).
Additional software dependencies
Using RagConnect itself does not introduce dependencies. However, depending on the selected protocols and/or used features, additional dependencies are required when using the generated code.
Communication protocol characteristics
MQTT
- Protocol identifier:
mqtt
- URI scheme:
mqtt://<broker-host>[:port]/<topic>
- Default port: 1883
- Type for mapping definitions:
byte[]
- Required runtime dependencies:
group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
- Additional remarks:
- First leading slash not included in topic.
- Mqtt is selected by default, so this dependency therefore is required "by default".
- Might work with other versions of
org.fusesource.mqtt-client.mqtt.client
as well.
REST
- Protocol identifier:
rest
- URI scheme:
rest://localhost[:port]/<path>
- Default port: 4567
- Type for mapping definitions:
String
- Required runtime dependencies:
group: 'com.sparkjava', name: 'spark-core', version: '2.9.3'
- Additional remarks:
- Host is always
localhost
. - Might work with newer versions of
com.sparkjava.spark-core
as well. - For debugging, it is beneficial to include an implementation for SLF4J.
- Host is always
Used features
Automatic dependency tracking
- Condition: When passing
--incremental
and--trace=flush
to RagConnect - Required runtime dependencies: none
- Required options for RelAST compiler: none
- Required options for JastAdd:
--incremental
--trace=flush
- Remarks:
- Other (additional) values passed to those two options must be equal (e.g.,
--incremental=param
passed to RagConnect must be also passed to JastAdd) - Other values besides
flush
can be added to--trace
- Feature description
- Other (additional) values passed to those two options must be equal (e.g.,
(Safer) Automatic dependency tracking
- Condition: When passing
--experimental-jastadd-329
to RagConnect - Required runtime dependencies: none
- Required options for RelAST compiler: none
- Required options for JastAdd: none
- Remarks:
- JastAdd version has to support
INC_FLUSH_START
andINC_FLUSH_END
(i.e., has issue #329 resolved) - Feature description
- JastAdd version has to support
Tree/List Endpoints
- Condition: When using
tree
orlist
endpoints along with default mappings - Required runtime dependencies:
group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.1'
group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.1'
- Required options for RelAST compiler:
--serializer=jackson
- Required options for JastAdd: none
- Remarks: