Skip to content

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

Merged
merged 1 commit into from
Aug 14, 2018

Conversation

akosthekiss
Copy link
Member

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]

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]
@akosthekiss akosthekiss added jerry-port Related to the port API or the default port implementation debugger Related to the debugger jerry-ext Related to the jerry-ext library labels Aug 9, 2018
*
* Note:
* This enum has to be kept in sync with jerry_log_level_t with an offset
* of +2.
Copy link
Member Author

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.

Copy link
Member

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.

@akosthekiss akosthekiss added the api Related to the public API label Aug 9, 2018
Copy link
Member

@zherczeg zherczeg left a 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.
Copy link
Member

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.

Copy link
Contributor

@robertsipka robertsipka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yichoi yichoi merged commit a3112ab into jerryscript-project:master Aug 14, 2018
@akosthekiss akosthekiss deleted the debugger-headers branch August 14, 2018 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the public API debugger Related to the debugger jerry-ext Related to the jerry-ext library jerry-port Related to the port API or the default port implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants