in the project.
The build command in ncc has been updated to accept 'all' as a build configuration which prompts the build of all configurations in the project. Previously, builds had to be triggered for each individual configurations. This change simplifies the build process especially for projects with multiple configurations, making the process more efficient and less prone to human error.
produce a package length exactly to where the end-of-package byte sequence is cut in half, the shadow copy will fail
to be created due to the end-of-package byte sequence being cut in half, this issue was fixed by reading the package
in chunks to determine the end-of-package byte sequence.
The PackageReader class has been updated to use a more efficient buffer management when reading data from a file. Previously, buffer size was growing uncontrollably and can eventually lead to out-of-memory errors for large files.
Now, the data is read in chunks and the buffer is cleared when it exceeds approximately 1MB size, maintaining only the last 512KB. This change ensures a more memory-efficient package reading and effectively prevents erroneous deadlocks for large package files.
Additionally, detection for end-of-data byte sequence has been modified to rectify an issue where package length could cut off the end-of-package byte sequence. This results in an improved reliability for package validation.
instead these dependencies were added globally to the build configuration. This issue was fixed by adding all the
development dependencies to the debug build configurations only.
This commit revises the handling of composer dependencies in 'ProjectManager.php'. A problem was encountered where software development dependencies were added globally to the build configuration, rather than exclusively to debug builds. By reassigning these dependencies to the debug configuration, this issue has been remedied.
Additionally, a bug-fix in 'PackageReader.php' has been implemented to validate the package file by checking the data length. If the file is discovered to be invalid (data length is null or zero), an IOException is triggered.
These changes enhance the accuracy of dependency management and improve the robustness of package validation.
The 'Resolver' utility was utilized to resolve the host and cache the result, enhancing the robustness and efficiency of the network calling mechanism across different modules including PackageManager, GiteaRepository, GithubRepository, and others.
Updated the downloadFile function in PackageManager.php to retry the download upon an error for at least 3 times. This improvement on error handling will enhance the resilience of the download process, reducing the likelihood of a single network hiccup resulting in a failed download. This change has also been reflected in the CHANGELOG.md file.
A fix has been implemented for an issue where a newline was unintentionally added to the end of download output, mostly when the download process was too short. This has been mitigated by ensuring a "done" update whenever a download finishes.
At the same time, improvements have been made to the download progress output. Specifically, the downloaded size now won't exceed the total download size, and a definitive "100%" progress indication is enforced when the download ends.
Optimized exception handling in PackageReader class by replacing NotSupportedException with IntegrityException. The update aligns with the objective of more accurate error handling and reporting during ZiProto decoding. The new IntegrityException provides a detailed error message, facilitating easier debugging.
This commit sets the default timeout and idleTimeout for the execution process in ExecutionUnitRunner to null when there are no specific timeouts provided by the execution policy. This change was made to avoid unexpected timeouts when no specific values are set in the execution policy.
Modified the progress bar text display in PackageManager.php and NccCompiler.php classes. Changed 'setMiscText' function to now display only the basename of the component name, execution policy name, and resource name. This change improves readability and clarity of the progress bar by reducing clutter from long file paths.
Added checks in the update method of the ConsoleProgressBar class to prevent it from displaying when log level is set to VERBOSE. This is to prevent cluttering the command-line interface with unnecessary information when running in VERBOSE mode. The changes also are reflected in the changelog.
The rendering of the progress bar was causing a division by zero error when the maximum value was set to 0. This change adds a condition to check if the maximum value is not 0 before calculating the number of hashes and the percentage done in the progress bar. This avoids the division by zero error and makes the progress bar rendering more robust. The CHANGELOG.md file has also been updated to reflect this bug fix.
Implemented changes in Runtime.php to better handle file tracking and to prevent unnecessary inclusion of duplicate files during Runtime. Instead of directly checking if a file is already included, we now create a unique identifier for each file using a crc32 hash function. This identifier (instead of the file path) is checked and stored in the inclusion list, allowing for better handling of dynamic or virtual files.
Introduced a private property to the `NccCompiler` class, `$merged_dependencies`, to keep track of the dependencies that have already been merged. This prevents unnecessary re-merging during the build operation, potentially enhancing the efficiency of the process. The implementation involves a check for a preexisting merge before a new merge is performed. If a merge already exists, the process is skipped, thereby avoiding redundancies.
appears to be incorrect, added a optional parameter to the `registerExtension` method to allow the installer to pass
the correct installation path.
- Implemented support in the AST traversal for the PHP statements `include`, `include_once`, `require`, and
`require_once`. These statements are transformed into function calls. With this change, ncc can correctly handle and
import files from system packages or direct binary package files.