{"record":{"id":"80046e0a773f6f2c","repo":"nodejs/node","slug":"generator-output-not-implemented-for-eclipse","errorCode":null,"errorMessage":"--generator_output not implemented for eclipse","messagePattern":"--generator_output not implemented for eclipse","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"tools/gyp/pylib/gyp/generator/eclipse.py","lineNumber":452,"sourceCode":"                    # break if 'src' or 'java' exists in the package structure. This\n                    # could be further improved by inspecting the java file for the\n                    # package name if this proves to be too fragile in practice.\n                    parent_search = dir_\n                    while os.path.basename(parent_search) not in [\"src\", \"java\"]:\n                        parent_search, _ = os.path.split(parent_search)\n                        if not parent_search or parent_search == toplevel_dir:\n                            # Didn't find a known root, just return the original path\n                            yield dir_\n                            break\n                    else:\n                        yield parent_search\n\n\ndef GenerateOutput(target_list, target_dicts, data, params):\n    \"\"\"Generate an XML settings file that can be imported into a CDT project.\"\"\"\n\n    if params[\"options\"].generator_output:\n        raise NotImplementedError(\"--generator_output not implemented for eclipse\")\n\n    if user_config := params.get(\"generator_flags\", {}).get(\"config\", None):\n        GenerateOutputForConfig(target_list, target_dicts, data, params, user_config)\n    else:\n        config_names = target_dicts[target_list[0]][\"configurations\"]\n        for config_name in config_names:\n            GenerateOutputForConfig(\n                target_list, target_dicts, data, params, config_name\n            )\n","sourceCodeStart":434,"sourceCodeEnd":462,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/tools/gyp/pylib/gyp/generator/eclipse.py#L434-L462","documentation":"Raised by the eclipse GYP generator's GenerateOutput as a NotImplementedError when the --generator-output (generator_output) option is set. The eclipse generator writes its output alongside the source tree and does not support relocating generated files to a separate output directory. This is an explicit design limitation, not a bug.","triggerScenarios":"Invoking gyp with both `-f eclipse` and `--generator-output=<dir>` (or setting generator_output in any way that makes params['options'].generator_output truthy at eclipse.py:453).","commonSituations":"Copying a gyp invocation from a make/ninja workflow that uses --generator-output and forgetting to drop it for eclipse; a shared build script that unconditionally passes --generator-output across all generators.","solutions":["Remove --generator-output from the gyp command line when using the eclipse generator.","If you need isolated output, switch to a generator that supports --generator-output (make, ninja, msvs).","Adjust shared build scripts to conditionally pass --generator-output only for supported generators."],"exampleFix":"# before\ngyp --depth=. -f eclipse --generator-output=out\n# after\ngyp --depth=. -f eclipse","handlingStrategy":"validation","validationCode":"options = parse_args()\nif options.generator_format == 'eclipse' and options.generator_output:\n    raise SystemExit('--generator-output is unsupported with -f eclipse')","typeGuard":null,"tryCatchPattern":"try:\n    GenerateOutput(...)\nexcept NotImplementedError as e:\n    if 'generator_output' in str(e):\n        rerun_without_generator_output()\n    raise","preventionTips":["Do not pass --generator-output with the eclipse generator.","Make shared build scripts conditionally apply --generator-output per generator."],"tags":["gyp","eclipse","unsupported-option","generator-output"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}