Skip to content

Commit

Permalink
Fixes #18081: move toml data into rudderlang stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
gpoblon committed Aug 4, 2020
1 parent b9837fe commit 74adb23
Show file tree
Hide file tree
Showing 17 changed files with 796 additions and 693 deletions.
2 changes: 1 addition & 1 deletion rudder-lang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ install: build
install -m 644 libs/corelib.rl $(DESTDIR)/opt/rudder/share/rudder-lang/lib/corelib.rl
install -m 644 libs/oslib.rl $(DESTDIR)/opt/rudder/share/rudder-lang/lib/oslib.rl
install -m 644 libs/cfengine_core.rl $(DESTDIR)/opt/rudder/share/rudder-lang/lib/cfengine_core.rl
# stdlib and meta_generic_methods are generated by generate_lib along with every build so no need to manually cp it
# stdlib is generated by generate_lib along with every build so no need to manually cp it

# Python libs
cp -r tools/jsondiff $(DESTDIR)/opt/rudder/share/python/
Expand Down
5 changes: 1 addition & 4 deletions rudder-lang/docs/contributing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ Contains the exhaustive list of CFEngine reserved words and namespaces that rudd

==== generate_lib

A perl script that generates _rudder-lang_ libraries, calling ncf api.
Files generated are:
- _resourcelib.rl_
- _translate_config.toml_
A perl script that generates _resourcelib.rl_ calling ncf api: _rudder-lang_ generic methods library

[align=center]
image::generate-lib.svg[_rudder-lang-lib generation]
Expand Down
6 changes: 1 addition & 5 deletions rudder-lang/docs/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ FLAGS:
OPTIONS:
-c, --config-file <config-file>
Path of the configuration file to use.
A configuration file is required (containing at least stdlib and meta_generic_methods paths)
A configuration file is required (containing at least stdlib path)
[default: /opt/rudder/etc/rudderc.conf]
-f, --format <format>
Expand Down Expand Up @@ -85,7 +85,6 @@ Entire _rudder-lang_ environment is already set up alongside the agent: this inc
----
[shared]
stdlib="libs/" # only required field for rudderc --compile
meta_generic_methods="tools/meta_generic_methods.toml" # required field for rudderc --translate
ncf_generic_methods="/usr/share/ncf/tree/30_generic_methods/"
dsc_generic_methods="/var/rudder/configuration-repository/dsc/ncf/30_generic_methods/"
Expand Down Expand Up @@ -167,7 +166,6 @@ By using an adapted configuration file, it can be simplified:
----
[shared]
stdlib="libs/" # only required field for rudderc
meta_generic_methods="tools/meta_generic_methods.toml"
[compile]
source="rl/technique.rl"
Expand All @@ -193,7 +191,6 @@ rudderc -j -l debug -c tools/myconf -n another.rl -o another_from_rl.rl.dsc
----
[shared]
stdlib="libs/" # only required field for rudderc --compile
meta_generic_methods="tools/meta_generic_methods.toml" # required field for rudderc --translate
----

2. CLI full version
Expand Down Expand Up @@ -221,7 +218,6 @@ By using an adapted configuration file, it can be simplified:
----
[shared]
stdlib="libs/" # only required field for rudderc
meta_generic_methods="tools/meta_generic_methods.toml"
[translate]
source="json/technique.json"
Expand Down
Loading

0 comments on commit 74adb23

Please sign in to comment.