Skip to content

Commit 8fad819

Browse files
committed
Add warning for disable_file_parse
1 parent b7e533d commit 8fad819

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/codegen/sdk/codebase/codebase_context.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ def build_graph(self, repo_operator: RepoOperator) -> None:
224224

225225
# =====[ Add all files to the graph in parallel ]=====
226226
syncs = defaultdict(lambda: [])
227-
if not self.config.disable_file_parse:
227+
if self.config.disable_file_parse:
228+
logger.warning("WARNING: File parsing is disabled!")
229+
else:
228230
for filepath, _ in repo_operator.iter_files(subdirs=self.projects[0].subdirectories, extensions=self.extensions, ignore_list=GLOBAL_FILE_IGNORE_LIST):
229231
syncs[SyncType.ADD].append(self.to_absolute(filepath))
230232
logger.info(f"> Parsing {len(syncs[SyncType.ADD])} files in {self.projects[0].subdirectories or 'ALL'} subdirectories with {self.extensions} extensions")
@@ -266,7 +268,9 @@ def apply_diffs(self, diff_list: list[DiffLite]) -> None:
266268
else:
267269
logger.warning(f"Unhandled diff change type: {diff.change_type}")
268270
by_sync_type = defaultdict(lambda: [])
269-
if not self.config.disable_file_parse:
271+
if self.config.disable_file_parse:
272+
logger.warning("WARNING: File parsing is disabled!")
273+
else:
270274
for filepath, sync_type in files_to_sync.items():
271275
if self.get_file(filepath) is None:
272276
if sync_type is SyncType.DELETE:

0 commit comments

Comments
 (0)