-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pragma module-dependency for optional include #1956
Conversation
success |
f40646c
to
8b93eb2
Compare
failure |
success |
success |
lib/pragma-parser.c
Outdated
@@ -34,6 +34,7 @@ static CfgLexerKeyword pragma_keywords[] = | |||
{ "include", KW_INCLUDE, }, | |||
{ "module", KW_MODULE, }, | |||
{ "define", KW_DEFINE, }, | |||
{ "module_dependency", KW_MODULE_DEPENDENCY, }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we call it @requires
or similar? That would mean some analogy to php, ruby or emacslisp :)
I do not have comment to the code itself. Just a little question on the naming. Apart from that, approve from my side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename module-dependency
to requires
as @furiel suggested. I think he is right :)
... and thanks for the PR ! |
Signed-off-by: kokan <peter.kokai@balabit.com>
Signed-off-by: kokan <peter.kokai@balabit.com>
success |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
@furiel : thanks! |
cool \o/
…--
Bazsi
On Tue, Apr 17, 2018 at 1:00 PM, Budai Laszlo ***@***.***> wrote:
Merged #1956 <#1956>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1956 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AArldr-dDoVdPhc2Ttz4P2abRnR2jk_Zks5tpctagaJpZM4TD7lH>
.
|
A lot of
scl
has a hidden dependency for modules to be present. In case of thatscl
uses a plugin, that is not installed; the syslog-ng is not going to start up even if that specific block is not used in the configuration (but only included).One of the most common example is the
json
, if thejson
module is not installed, with the default set ofscl
s syslog-ng is not going to start. There are two main workaround exists for this:This PR aim to give a solution by creating a new pragma keyword, which can specify module requirement. If the requirement is not specified the syslog-ng is going to skip the current file, thus not causing an issue in case of missing module.
Fixes #827.