{"record":{"id":"60d7742709fad266","repo":"nodejs/node","slug":"gencmn-no-files-listed-in-s-n","errorCode":null,"errorMessage":"gencmn: no files listed in %s\\n","messagePattern":"gencmn: no files listed in (.+?)\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"deps/icu-small/source/tools/toolutil/pkg_gencmn.cpp","lineNumber":217,"sourceCode":"#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR)\n        {\n          char *t;\n          while((t = uprv_strchr(line,U_FILE_ALT_SEP_CHAR))) {\n            *t = U_FILE_SEP_CHAR;\n          }\n        }\n#endif\n        addFile(getLongPathname(line), name, source, sourceTOC, verbose);\n    }\n\n    uprv_free(linePtr);\n\n    if(in!=T_FileStream_stdin()) {\n        T_FileStream_close(in);\n    }\n\n    if(fileCount==0) {\n        fprintf(stderr, \"gencmn: no files listed in %s\\n\", dataFile == nullptr ? \"<stdin>\" : dataFile);\n        return;\n    }\n\n    /* sort the files by basename */\n    qsort(files, fileCount, sizeof(File), compareFiles);\n\n    if(!sourceTOC) {\n        UNewDataMemory *out;\n\n        /* determine the offsets of all basenames and files in this common one */\n        basenameOffset=4+8*fileCount;\n        fileOffset=(basenameOffset+(basenameTotal+15))&~0xf;\n        for(i=0; i<fileCount; ++i) {\n            files[i].fileOffset=fileOffset;\n            fileOffset+=(files[i].fileSize+15)&~0xf;\n            files[i].basenameOffset=basenameOffset;\n            basenameOffset+=files[i].basenameLength;\n        }","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/icu-small/source/tools/toolutil/pkg_gencmn.cpp#L199-L235","documentation":"The input list file opened fine but gencmn parsed zero file entries from it (fileCount==0 at line 217). Unlike most gencmn errors this is a soft return, not exit() — the function returns and no common data / TOC is emitted.","triggerScenarios":"Passing a list file that contains only comments/blank lines, or a .txt list whose lines all begin with reserved characters that get skipped. The check `if(fileCount==0)` fires after the read loop closes the stream.","commonSituations":"A filtered/generated list file ended up empty because an upstream filter (e.g. exclusion of locale data) removed every entry; a hand-edited list where every line is commented out; an encoding/line-ending issue causing every line to be skipped as whitespace/reserved.","solutions":["Inspect the list file and confirm it has at least one non-comment, non-reserved entry: `grep -vE '^\\s*(#|$)' \"$LIST\" | head`.","Regenerate the list from the upstream data step that enumerates the .res/.nrm/etc. files to pack.","Check that line endings are LF/CRLF and not NUL-separated, and that no line begins with a U_PKG_RESERVED_CHARS character.","If an empty pack is legitimately desired, skip the gencmn step rather than feeding it an empty list."],"exampleFix":"# before\ngencmn empty.txt   # fileCount==0, nothing emitted\n# after\nif grep -qE '^[^#[:space:]]' \"$LIST\"; then gencmn \"$LIST\"; else echo \"no entries; skipping\"; fi","handlingStrategy":"validation","validationCode":"# reject an empty (all-comment) list before running gencmn\nif ! grep -qE '^[^#[:space:]]' \"$LIST\"; then echo \"no file entries in $LIST\" >&2; exit 1; fi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate the list generator's output is non-empty before packaging.","Log the parsed entry count upstream so an empty list is caught early.","Remember this case is a soft return (no exit), so downstream tools may silently produce no output — check for the expected output file too."],"tags":["icu","gencmn","build-tools","empty-input"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}