-
Notifications
You must be signed in to change notification settings - Fork 684
Split string-sending debugger API into output- and log-sending functions #2461
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
Split string-sending debugger API into output- and log-sending functions #2461
Conversation
This helps to avoid the use of non-public headers and protocol-internal constants in external code (e.g., in jerry-port and jerry-ext). The patch also cleans up the necessary includes in jerry-core public headers, and the include order in jerry-port/default public headers. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
* | ||
* Note: | ||
* This enum has to be kept in sync with jerry_log_level_t with an offset | ||
* of +2. |
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.
Note: it would be even simpler to get rid of jerry_debugger_output_subtype_t
completely and use jerry_log_level_t
as sub-type. But that would probably necessitate the introduction of a new message type JERRY_DEBUGGER_LOG_RESULT
(i.e., JERRY_DEBUGGER_OUTPUT_RESULT
+ JERRY_DEBUGGER_NO_SUBTYPE
to be used for user output and JERRY_DEBUGGER_LOG_RESULT
+ jerry_log_level_t
to be used for log messages.). Or the situation may be even more intricate, as I see a JERRY_DEBUGGER_OUTPUT_RESULT_END
message type as well. So, I rather didn't dare to touch the protocol itself, only the public API.
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.
I would keep the JERRY_DEBUGGER_OUTPUT_ as private myself.
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.
I like this idea. LGTM
* | ||
* Note: | ||
* This enum has to be kept in sync with jerry_log_level_t with an offset | ||
* of +2. |
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.
I would keep the JERRY_DEBUGGER_OUTPUT_ as private myself.
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.
LGTM
This helps to avoid the use of non-public headers and
protocol-internal constants in external code (e.g., in jerry-port
and jerry-ext).
The patch also cleans up the necessary includes in jerry-core public
headers, and the include order in jerry-port/default public headers.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]