Skip to content
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

Support debug settings for different languages(cc, java) #440

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

WindLeeWT
Copy link
Collaborator

No description provided.

@chen3feng
Copy link
Owner

整体接口OK,错误信息更完善一些。help里能用的level也输出一下。
另外scala的要不要把也一并加了?

@WindLeeWT
Copy link
Collaborator Author

help 信息里已经有了?

parser.add_argument('--debug-info-level',
                    dest='debug_info_level',
                    help='Specify the level of how much debugging information to be generated. '
                         'This option can be used in two ways:'
                         '  A single level applied to all languages(C/C++, Java), level could be '
                         'no, low, mid or high. The default level is mid.'
                         '  A comma separated list of "language=level", such as cc=no,java=high')

这一版的改动已经比较大了,单独改一版 scala 的吧

Copy link
Owner

@chen3feng chen3feng left a comment

Choose a reason for hiding this comment

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

help 信息里已经有了?

parser.add_argument('--debug-info-level',
                    dest='debug_info_level',
                    help='Specify the level of how much debugging information to be generated. '
                         'This option can be used in two ways:'
                         '  A single level applied to all languages(C/C++, Java), level could be '
                         'no, low, mid or high. The default level is mid.'
                         '  A comma separated list of "language=level", such as cc=no,java=high')

这一版的改动已经比较大了,单独改一版 scala 的吧

很少有人去看help吧。

config.global_config(native_builder=options.native_builder)
debug_level = options.debug_info_level
if debug_level:
if isinstance(debug_level, str):
Copy link
Owner

Choose a reason for hiding this comment

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

这里混淆了debug_info_level和debug_info_levels吧?

Copy link
Owner

Choose a reason for hiding this comment

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

levels全局定义无需改变,level可以不同语言不同设置。另外scala的levels是否也需要加进去?

Copy link
Owner

Choose a reason for hiding this comment

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

问题1明白了

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

前面已经说了,这一版改动已经比较多了,scala 的信息单独加一次

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

不同语言不同设置,每个语言自己设置自己的 debug_info_level,全局通过命令行控制,命令行有2中控制方式:

  • --debug-info-level [no, low, mid, high],控制所有语言,原来的 --no-debug-info 等同于 --debug-info-level no

  • --debug-info-level cc=no,java=high,单独语言单独设置,不设置采用 config 中的默认值

pos = pair.find('=')
if (pos == -1 or
pair[:pos] not in DEBUG_LANGUAGES or pair[pos + 1:] not in DEBUG_LEVELS):
console.error_exit('Invalid debugging information level "%s"' % pair)
Copy link
Owner

Choose a reason for hiding this comment

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

需要给出允许值

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

--debug-info-level 支持的设置方式多一些,这里都列出来?

'make less disk space cost but hard to debug, '
'default is false')

parser.add_argument('--debug-info-level',
Copy link
Owner

Choose a reason for hiding this comment

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

既然java里总是高,是不是config就够了?不过由于命令行总是更优先,确实会把config里的覆盖

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

前面已经解释了,命令行优先级最高

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants