Skip to content

Commit

Permalink
Loki-transform: Don't trigger a full parse for plan mode
Browse files Browse the repository at this point in the history
When planning mode is required, we can save a lot of time by not
parsing the full source tree.
  • Loading branch information
mlange05 committed Jan 15, 2025
1 parent eff4036 commit c7f9758
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/loki_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,12 @@ def convert(
# Create a scheduler to bulk-apply source transformations
paths = [Path(p).resolve() for p in as_tuple(source)]
paths += [Path(h).resolve().parent for h in as_tuple(header)]
# Skip full source parse for planning mode
full_parse = processing_strategy == ProcessingStrategy.DEFAULT
scheduler = Scheduler(
paths=paths, config=config, frontend=frontend, definitions=definitions, output_dir=build, **build_args
paths=paths, config=config, frontend=frontend,
full_parse=full_parse, definitions=definitions,
output_dir=build, **build_args
)

# If requested, apply a custom pipeline from the scheduler config
Expand Down

0 comments on commit c7f9758

Please sign in to comment.