XcodeGen/Tests/Fixtures/legacy_paths_test
Mathieu Olivari e7f753785e
Fix includes related issues and improve their performances (#1275)
* Fix recursive include path when relativePath is not set

If relativePath is not set on a particular include, the first level of
include will currently work, but starting at the second level of
iteration, the computed include path will fail as relativePath will be
appended over and over onto the filePath. We're fixing that recursion
problem here and adding the corresponding tests to make sure it doesn't
happen again.

* Include projectRoot in include paths

The projectRoot setting (when specified) is currently ignored when
computing the include paths. We're fixing that in that commit.

* Use memoization during recursive SpecFiles creation

SpecFile objects are created by recursive through includes. On a large
project with programatically generated SpecFile, it is not rare to have
hundreds of SpecFiles, creating a large web of include dependencies.
In such a case, it is not rare either for a particular SpecFile to be
included by multiple other SpecFiles. When that happens, XcodeGen
currently creates a SpecFile object every time a SpecFile gets included,
which can lead to an exponential growth of includes.

I have seen hundreds of files being turned into hundred of thousands of
SpecFile object creations, which leads to an impractical XcodeGen run of
tens of minutes.

This change adds memoization during SpecFile recursion, in order to
reuse the previously created SpecFiles, if available, instead of
re-creating them.

* Update CHANGELOG.md

Add the following changes to the changelog:
* b97bdc4 - Use memoization during recursive SpecFiles creation
* a6b96ad - Include projectRoot in include paths
* 557b074 - Fix recursive include path when relativePath is not set
2022-11-03 19:05:46 +11:00
..
legacy_included_paths_test.yml Fix includes related issues and improve their performances (#1275) 2022-11-03 19:05:46 +11:00
recursive_include.yml Fix includes related issues and improve their performances (#1275) 2022-11-03 19:05:46 +11:00