-
Notifications
You must be signed in to change notification settings - Fork 497
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
base: master
Are you sure you want to change the base?
Conversation
整体接口OK,错误信息更完善一些。help里能用的level也输出一下。 |
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 的吧 |
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.
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): |
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.
这里混淆了debug_info_level和debug_info_levels吧?
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.
levels全局定义无需改变,level可以不同语言不同设置。另外scala的levels是否也需要加进去?
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.
问题1明白了
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.
前面已经说了,这一版改动已经比较多了,scala 的信息单独加一次
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.
不同语言不同设置,每个语言自己设置自己的 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) |
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.
需要给出允许值
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.
--debug-info-level 支持的设置方式多一些,这里都列出来?
'make less disk space cost but hard to debug, ' | ||
'default is false') | ||
|
||
parser.add_argument('--debug-info-level', |
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.
既然java里总是高,是不是config就够了?不过由于命令行总是更优先,确实会把config里的覆盖
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.
前面已经解释了,命令行优先级最高
No description provided.