From 2a158b2f0b3a8f1b258fe58e017135a9f83337a2 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 30 Apr 2017 15:30:21 -0400 Subject: [PATCH 1/2] build: require `--without-debugger` explicitly * To fix #12758, added an assertion that if `--without-ssl` or `--without-intl` are set, --without-debugger must also be explicitly set. * Added `--without-debugger` is an alias to `--without-inspector`, since we removed the old TCP `debug` protocol the V8 `inspect` protocol is the only debugger available. Hence disabling `inspector` means disabling any kind on JS debugger. Fixes: https://github.com/nodejs/node/issues/12758 --- configure | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 34042bedbda264..53286a255c4772 100755 --- a/configure +++ b/configure @@ -465,8 +465,14 @@ parser.add_option('--no-browser-globals', parser.add_option('--without-inspector', action='store_true', - dest='without_inspector', - help='disable experimental V8 inspector support') + dest='without_debugger', + help='disable V8 inspector support, the only node debugger API') + +# more explicit alias to --without-inspector +parser.add_option('--without-debugger', + action='store_true', + dest='without_debugger', + help='disable V8 inspector support, the only node debugger API') parser.add_option('--shared', action='store_true', @@ -496,6 +502,8 @@ parser.add_option('-C', (options, args) = parser.parse_args() + + # Expand ~ in the install prefix now, it gets written to multiple files. options.prefix = os.path.expanduser(options.prefix or '') @@ -1296,11 +1304,15 @@ def configure_intl(o): pprint.pformat(icu_config, indent=2) + '\n') return # end of configure_intl -def configure_inspector(o): - disable_inspector = (options.without_inspector or - options.with_intl in (None, 'none') or - options.without_ssl) - o['variables']['v8_enable_inspector'] = 0 if disable_inspector else 1 +def configure_debugger(o): + implicit_disable = (options.with_intl in (None, 'none') or + options.without_ssl) + if implicit_disable and not options.without_debugger: + raise Exception('Setting --without_ssl or --without-intl will disable the ' + '`inspector` protocol. Ever since the removal of the ' + '`debug` protocol this is the only available debugger ' + 'API, so it will leave the binary with no debug interfacehence --without-debugger must be set explicitly.') + o['variables']['v8_enable_inspector'] = 0 if options.without_debugger else 1 output = { 'variables': {}, @@ -1332,7 +1344,7 @@ configure_v8(output) configure_openssl(output) configure_intl(output) configure_static(output) -configure_inspector(output) +configure_debugger(output) # variables should be a root level element, # move everything else to target_defaults From 38fca5bc8d79aedff65f1883305a6fc0d6949c4e Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Thu, 11 May 2017 17:14:56 -0400 Subject: [PATCH 2/2] [squash] change disable to load warning --- configure | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 53286a255c4772..436f93e195be9f 100755 --- a/configure +++ b/configure @@ -465,14 +465,8 @@ parser.add_option('--no-browser-globals', parser.add_option('--without-inspector', action='store_true', - dest='without_debugger', - help='disable V8 inspector support, the only node debugger API') - -# more explicit alias to --without-inspector -parser.add_option('--without-debugger', - action='store_true', - dest='without_debugger', - help='disable V8 inspector support, the only node debugger API') + dest='without_inspector', + help='disable experimental V8 inspector support') parser.add_option('--shared', action='store_true', @@ -502,8 +496,6 @@ parser.add_option('-C', (options, args) = parser.parse_args() - - # Expand ~ in the install prefix now, it gets written to multiple files. options.prefix = os.path.expanduser(options.prefix or '') @@ -1307,12 +1299,15 @@ def configure_intl(o): def configure_debugger(o): implicit_disable = (options.with_intl in (None, 'none') or options.without_ssl) - if implicit_disable and not options.without_debugger: - raise Exception('Setting --without_ssl or --without-intl will disable the ' - '`inspector` protocol. Ever since the removal of the ' - '`debug` protocol this is the only available debugger ' - 'API, so it will leave the binary with no debug interfacehence --without-debugger must be set explicitly.') - o['variables']['v8_enable_inspector'] = 0 if options.without_debugger else 1 + if implicit_disable and not options.without_inspector: + options.without_inspector = True + print('********************* Warning *************************') + print('Setting --without_ssl or --without-intl will disable the') + print('`inspector` protocol. Ever since the removal of the `debug`') + print('protocol this is the only available debugger API, so it will leave') + print('the binary with no debug interface.') + print('*********************************************************') + o['variables']['v8_enable_inspector'] = 0 if options.without_inspector else 1 output = { 'variables': {},