diff --git a/CHANGELOG.md b/CHANGELOG.md index d69534a..75092a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This update introduces minor bug fixes. ### Fixed - Improve build efficiency by preventing duplicate merges + - Updated file tracking in Runtime class ## [2.0.3] - 2023-10-17 diff --git a/src/ncc/Classes/Runtime.php b/src/ncc/Classes/Runtime.php index 7800e67..fb43d82 100644 --- a/src/ncc/Classes/Runtime.php +++ b/src/ncc/Classes/Runtime.php @@ -572,9 +572,16 @@ return; } - if(!in_array($path, self::$included_files, true)) + $acquired_name = $path; + + if(!is_file($path)) { - self::$included_files[] = $path; + $acquired_name = hash('crc32', $acquired_file); + } + + if(!in_array($acquired_name, self::$included_files, true)) + { + self::$included_files[] = sprintf('virtual(%s)', $acquired_name); } self::extendedEvaluate($acquired_file); @@ -617,9 +624,16 @@ throw new RuntimeException(sprintf('Failed to acquire file "%s" at runtime: %s', $path, $e->getMessage()), $e->getCode(), $e); } - if(!in_array($path, self::$included_files, true)) + $acquired_name = $path; + + if(!is_file($path)) { - self::$included_files[] = $path; + $acquired_name = hash('crc32', $acquired_file); + } + + if(!in_array($acquired_name, self::$included_files, true)) + { + self::$included_files[] = sprintf('virtual(%s)', $acquired_name); } self::extendedEvaluate($acquired_file);