mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-07 08:26:11 +00:00
chore(parse): use template literal for warning, add .hh test case
Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/5591f1ba-9032-4706-b007-effb0df46eb8 Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>
This commit is contained in:
parent
af81512f61
commit
350b1ece63
2 changed files with 6 additions and 5 deletions
|
|
@ -386,10 +386,10 @@ export async function runChunkedParseAndResolve(
|
|||
if (chunkHasWorkerUnsafeFiles && !hasWarnedAboutCppChunks) {
|
||||
hasWarnedAboutCppChunks = true;
|
||||
logger.warn(
|
||||
'C/C++ files detected — parsing those chunks in sequential mode to avoid known ' +
|
||||
'worker-thread native binding errors (e.g. `Napi::Error`). C/C++ source files ' +
|
||||
'are still fully indexed; chunks with no C/C++ continue using workers. ' +
|
||||
'Set GITNEXUS_ALLOW_CPP_WORKERS=1 if you use a custom tree-sitter build without this issue.',
|
||||
`C/C++ files detected — parsing those chunks in sequential mode to avoid known ` +
|
||||
`worker-thread native binding errors (e.g. \`Napi::Error\`). C/C++ source files ` +
|
||||
`are still fully indexed; chunks with no C/C++ continue using workers. ` +
|
||||
`Set GITNEXUS_ALLOW_CPP_WORKERS=1 if you use a custom tree-sitter build without this issue.`,
|
||||
);
|
||||
}
|
||||
chunkWorkerData = await processParsing(
|
||||
|
|
|
|||
|
|
@ -29,9 +29,10 @@ describe('hasWorkerUnsafeLanguages', () => {
|
|||
expect(hasWorkerUnsafeLanguages([{ path: 'include/api.h', size: 100 }])).toBe(true);
|
||||
});
|
||||
|
||||
it('returns true when C++ header files (.hpp, .hxx) are present', () => {
|
||||
it('returns true when C++ header files (.hpp, .hxx, .hh) are present', () => {
|
||||
expect(hasWorkerUnsafeLanguages([{ path: 'include/api.hpp', size: 100 }])).toBe(true);
|
||||
expect(hasWorkerUnsafeLanguages([{ path: 'include/core.hxx', size: 100 }])).toBe(true);
|
||||
expect(hasWorkerUnsafeLanguages([{ path: 'include/util.hh', size: 100 }])).toBe(true);
|
||||
});
|
||||
|
||||
it('returns false for an empty list', () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue