{"record":{"id":"09c35a5c1b004f50","repo":"nodejs/node","slug":"only-one-of-the-v8-enable-object-print-or-v8-d","errorCode":null,"errorMessage":"Only one of the --v8-enable-object-print or --v8-disable-object-print options can be specified at a time.","messagePattern":"Only one of the --v8-enable-object-print or --v8-disable-object-print options can be specified at a time\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"configure.py","lineNumber":2260,"sourceCode":"      raise Exception('--enable-d8 is incompatible with --without-bundled-v8.')\n    if options.enable_v8windbg:\n      raise Exception('--enable-v8windbg is incompatible with --without-bundled-v8.')\n    (pkg_libs, pkg_cflags, pkg_libpath, _) = pkg_config(\"v8\")\n    if pkg_libs and pkg_libpath:\n      output['libraries'] += [pkg_libpath] + pkg_libs.split()\n    if pkg_cflags:\n      output['include_dirs'] += [flag for flag in [flag.strip() for flag in pkg_cflags.split('-I')] if flag]\n  if options.static_zoslib_gyp:\n    o['variables']['static_zoslib_gyp'] = options.static_zoslib_gyp\n  if flavor != 'linux' and options.v8_enable_hugepage:\n    raise Exception('--v8-enable-hugepage is supported only on linux.')\n  o['variables']['v8_enable_hugepage'] = 1 if options.v8_enable_hugepage else 0\n  if options.v8_enable_short_builtin_calls or o['variables']['target_arch'] == 'x64':\n    o['variables']['v8_enable_short_builtin_calls'] = 1\n  if options.v8_enable_snapshot_compression:\n    o['variables']['v8_enable_snapshot_compression'] = 1\n  if all(opt in sys.argv for opt in ['--v8-enable-object-print', '--v8-disable-object-print']):\n    raise Exception(\n        'Only one of the --v8-enable-object-print or --v8-disable-object-print options '\n        'can be specified at a time.')\n  if all(opt in sys.argv for opt in ['--v8-enable-temporal-support', '--v8-disable-temporal-support']):\n    raise Exception(\n        'Only one of the --v8-enable-temporal-support or --v8-disable-temporal-support options '\n        'can be specified at a time.')\n  if sys.platform != 'darwin':\n    if o['variables']['v8_enable_webassembly'] and o['variables']['target_arch'] == 'x64':\n      o['variables']['v8_enable_wasm_simd256_revec'] = 1\n\ndef configure_openssl(o):\n  variables = o['variables']\n  variables['node_use_openssl'] = b(not options.without_ssl)\n  variables['node_shared_openssl'] = b(options.shared_openssl)\n  variables['node_shared_ngtcp2'] = b(options.shared_ngtcp2)\n  variables['node_shared_nghttp3'] = b(options.shared_nghttp3)\n  variables['openssl_is_fips'] = b(options.openssl_is_fips)\n  variables['node_fipsinstall'] = b(False)","sourceCodeStart":2242,"sourceCodeEnd":2278,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/configure.py#L2242-L2278","documentation":"configure.py forbids passing both --v8-enable-object-print and --v8-disable-object-print. Unlike most options these are not argparse mutually-exclusive group flags; configure scans sys.argv directly and rejects the pair because they would write contradictory values into the same v8 variable.","triggerScenarios":"Raised when `all(opt in sys.argv for opt in ['--v8-enable-object-print','--v8-disable-object-print'])` is true. The check inspects raw argv, so the flags can appear anywhere, in any order.","commonSituations":"Build configs accumulated over time where enable and disable variants were both appended; templating bugs that concatenate a default flag list with an override list; copy-pasted CMake presets.","solutions":["Pick exactly one of the two flags and delete the other from your configure command.","Refactor the build wrapper to model object-print as a tri-state (on/off/unset) and emit only one flag.","Add a pre-flight argv de-duplicater that rejects toggling pairs before invoking configure."],"exampleFix":"// before\n./configure --v8-enable-object-print --v8-disable-object-print\n// after\n./configure --v8-enable-object-print","handlingStrategy":"validation","validationCode":"import sys\npair = {'--v8-enable-object-print', '--v8-disable-object-print'}\nassert not pair.issubset(sys.argv), 'pass only one of the object-print flags'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Model each V8 toggle as a single tri-state variable that emits exactly one flag.","Run a generic 'toggling-pair' linter over configure argv before building."],"tags":["nodejs","configure","v8","flag-conflict","build"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}