Skip to content

fix(sparql-qlever): unify mountDir/cwd into dataDir and fix NativeTaskRunner bugs#239

Merged
ddeboer merged 4 commits intomainfrom
fix/qlever-native-cwd
Mar 15, 2026
Merged

fix(sparql-qlever): unify mountDir/cwd into dataDir and fix NativeTaskRunner bugs#239
ddeboer merged 4 commits intomainfrom
fix/qlever-native-cwd

Conversation

@ddeboer
Copy link
Member

@ddeboer ddeboer commented Mar 15, 2026

Summary

  • Unify mountDir/cwd into dataDir on QleverOptions: the old discriminated union split mountDir (Docker-only) and cwd (native-only) into separate branches, so callers passing mountDir had it silently ignored in native mode. The new shared dataDir property is passed as mountDir to DockerTaskRunner and as cwd to NativeTaskRunner.
  • Accept optional downloader on createQlever and pass it through to Importer, instead of always using the default.
  • Fix operator precedence bug in NativeTaskRunner output accumulation: ?? '' + data only concatenated on the first chunk due to + binding tighter than ??.
  • Fix taskOutput() appending literal "undefined" when stderr was empty.

Breaking change: QleverOptions.mountDir and QleverOptions.cwd are replaced by QleverOptions.dataDir.

- Add RunOptions with optional cwd to TaskRunner.run() interface
- NativeTaskRunner respects per-command cwd override
- Importer passes dirname(file) so QLever finds downloaded files
- Fixes 'No such file or directory' in native mode where the process
  CWD didn't match the download directory
@ddeboer ddeboer force-pushed the fix/qlever-native-cwd branch from 855a20c to 83ede23 Compare March 15, 2026 18:45
@ddeboer ddeboer changed the title fix(sparql-qlever)!: unify mountDir/cwd into dataDir fix(sparql-qlever): pass download directory as cwd to task runner Mar 15, 2026
…lation

- ?? has lower precedence than +, so only the first chunk of
  stdout/stderr was ever stored; subsequent chunks were silently
  discarded. Add parentheses to accumulate correctly.
- Fix taskOutput() appending literal 'undefined' when stderr Map
  has no entry.
- Rename RunOptions to TaskRunOptions to avoid collision with
  @lde/pipeline's RunOptions.
@ddeboer ddeboer changed the title fix(sparql-qlever): pass download directory as cwd to task runner fix(task-runner): add per-command cwd and fix output accumulation bugs Mar 15, 2026
…ions

- Replace mode-specific mountDir (docker) and cwd (native) with shared dataDir property
- createQlever passes dataDir as mountDir to DockerTaskRunner, as cwd to NativeTaskRunner
- Accept optional downloader and pass it through to Importer
- Revert TaskRunner interface: remove TaskRunOptions, revert run() to run(command: string)
- Keep pre-existing bug fixes in NativeTaskRunner (operator precedence, taskOutput)
@ddeboer ddeboer changed the title fix(task-runner): add per-command cwd and fix output accumulation bugs fix(sparql-qlever): unify mountDir/cwd into dataDir and fix NativeTaskRunner bugs Mar 15, 2026
@ddeboer ddeboer enabled auto-merge (squash) March 15, 2026 19:19
@ddeboer ddeboer merged commit 90d048a into main Mar 15, 2026
2 checks passed
@ddeboer ddeboer deleted the fix/qlever-native-cwd branch March 15, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant