Skip to content

Empty/null source entry causes high memory usage #1595

@sophiesaunders

Description

@sophiesaunders

I've found that when a sources list contains an empty/null entry, XcodeGen experiences extreme memory growth and dramatically slower project generation.

Expected Behavior

XcodeGen rejects the null entry with a validation error, or silently ignores it.

Actual Behavior

XcodeGen appears to interpret the null entry as the project root directory and attempts to include every file as a source. Memory usage in my particular use case grows to ~4.5 GB and generation time increases from ~2 minutes to ~15 minutes.

Environment

XcodeGen version: 2.42.0
macOS version: 15.7.4
Project size: Very large (which likely explains the drastic increase in time and memory consumption)

Reproducing

Here's a simple example, note the empty sources line:

targets:
  MyTarget:
    type: tool
    sources:
      -
      - path/to/actual/source.cpp

This may be expected behavior and not a bug, but it seems highly possible for a user to accidentally introduce a blank source, without intentionally pulling in every source file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions