Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
b583e61d
Unverified
Commit
b583e61d
authored
May 02, 2022
by
Noir
Committed by
GitHub
May 02, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1335
Load modules before parsing CLI / config file
parents
0137c589
042c79ed
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
CHANGELOG.md
CHANGELOG.md
+1
-0
libcaf_core/caf/exec_main.hpp
libcaf_core/caf/exec_main.hpp
+3
-3
No files found.
CHANGELOG.md
View file @
b583e61d
...
@@ -14,6 +14,7 @@ is based on [Keep a Changelog](https://keepachangelog.com).
...
@@ -14,6 +14,7 @@ is based on [Keep a Changelog](https://keepachangelog.com).
-
The JSON parser no longer chokes when encountering
`null`
as last value before
-
The JSON parser no longer chokes when encountering
`null`
as last value before
the closing parenthesis.
the closing parenthesis.
-
The JSON reader now automatically widens integers to doubles as necessary.
-
The JSON reader now automatically widens integers to doubles as necessary.
-
Module options (e.g. for the
`middleman`
) now show up in
`--long-help`
output.
### Changed
### Changed
...
...
libcaf_core/caf/exec_main.hpp
View file @
b583e61d
...
@@ -74,8 +74,10 @@ int exec_main(F fun, int argc, char** argv) {
...
@@ -74,8 +74,10 @@ int exec_main(F fun, int argc, char** argv) {
"second parameter of main function must take a subtype of "
"second parameter of main function must take a subtype of "
"actor_system_config as const reference"
);
"actor_system_config as const reference"
);
using
helper
=
exec_main_helper
<
typename
trait
::
arg_types
>
;
using
helper
=
exec_main_helper
<
typename
trait
::
arg_types
>
;
// Pass CLI options to config.
typename
helper
::
config
cfg
;
typename
helper
::
config
cfg
;
// Load modules.
(
exec_main_load_module
<
Ts
>
(
cfg
),
...);
// Pass CLI options to config.
if
(
auto
err
=
cfg
.
parse
(
argc
,
argv
))
{
if
(
auto
err
=
cfg
.
parse
(
argc
,
argv
))
{
std
::
cerr
<<
"error while parsing CLI and file options: "
<<
to_string
(
err
)
std
::
cerr
<<
"error while parsing CLI and file options: "
<<
to_string
(
err
)
<<
std
::
endl
;
<<
std
::
endl
;
...
@@ -84,8 +86,6 @@ int exec_main(F fun, int argc, char** argv) {
...
@@ -84,8 +86,6 @@ int exec_main(F fun, int argc, char** argv) {
// Return immediately if a help text was printed.
// Return immediately if a help text was printed.
if
(
cfg
.
cli_helptext_printed
)
if
(
cfg
.
cli_helptext_printed
)
return
EXIT_SUCCESS
;
return
EXIT_SUCCESS
;
// Load modules.
(
exec_main_load_module
<
Ts
>
(
cfg
),
...);
// Initialize the actor system.
// Initialize the actor system.
actor_system
system
{
cfg
};
actor_system
system
{
cfg
};
if
(
cfg
.
slave_mode
)
{
if
(
cfg
.
slave_mode
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment