-
-
Notifications
You must be signed in to change notification settings - Fork 1
Add RoadRunner building #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.x
Are you sure you want to change the base?
Conversation
…inaryHandle to LocalBinary
… `Binary::execute()` method
…ution and enhance version checks
…nd add exception handling
…ved logging and exception handling
…ectory removal methods
… and binary installation
… and error handling
… DloadResult class
…ersion constraint checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds RoadRunner custom build support via Velox and refactors core task and binary resolution to a promise-based API.
- Integrates Velox build actions in the XML schema and configuration metadata
- Introduces a new
build
CLI command withVeloxBuilder
and associated task/result models - Refactors binary provider methods and replaces the old
TaskManager
with a promise‐drivenManager
Reviewed Changes
Copilot reviewed 37 out of 38 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/Service/Container.php | Extended bind signature to allow class‐string aliases |
src/Module/Velox/Task.php | Added Task model for executing Velox builds |
src/Module/Velox/Result.php | Added Result model capturing build output and metadata |
src/Module/Velox/Internal/VeloxBuilder.php | Implemented Velox build logic and temporary directory handling |
src/Module/Velox/Internal/DependencyChecker.php | Added dependency resolution for Go and Velox binaries |
src/Module/Velox/Exception/Dependency.php | New exception for unmet build dependencies |
src/Module/Velox/Exception/Config.php | New exception for invalid/failed configuration |
src/Module/Velox/Exception/Build.php | Base exception class for all build errors |
src/Module/Velox/Exception/Api.php | New exception for API failures |
src/Module/Velox/Builder.php | Interface defining the Velox build contract |
src/Module/Velox/ApiClient.php | Interface for remote Velox configuration API |
src/Module/Task/Progress.php | Moved Progress class into a shared task namespace |
src/Module/Task/Manager.php | Replaced TaskManager with a Manager using promises |
src/Module/Downloader/Task/DownloadTask.php | Updated import to the new Progress namespace |
src/Module/Downloader/Internal/DownloadContext.php | Updated import to the new Progress namespace |
src/Module/Downloader/Downloader.php | Switched temp‐dir creation to FS::tmpDir |
src/Module/Config/Schema/Downloader.php | Tightened tmpDir type to `non-empty-string |
src/Module/Config/Schema/Actions.php | Added veloxBuilds list for Velox build actions |
src/Module/Config/Schema/Action/Velox/Plugin.php | New schema class for Velox plugins |
src/Module/Config/Schema/Action/Velox.php | New schema for <velox> build actions |
src/Module/Common/Internal/ObjectContainer.php | Enhanced bind to support string‐alias class names |
src/Module/Common/FileSystem/Path.php | Minor doc updates for __toString formatting |
src/Module/Common/FileSystem/FS.php | New file system utility class |
src/Module/Common/DloadResult.php | New wrapper for download task results |
src/Module/Binary/Internal/LocalBinary.php | Added LocalBinary implementation |
src/Module/Binary/Internal/GlobalBinary.php | Added GlobalBinary implementation |
src/Module/Binary/Internal/BinaryProviderImpl.php | Updated to getLocalBinary /getGlobalBinary methods |
src/Module/Binary/Internal/BinaryExecutor.php | Improved logging and return‐type clarity for execute |
src/Module/Binary/Internal/AbstractBinary.php | Refactored into AbstractBinary with unified execution logic |
src/Module/Binary/BinaryProvider.php | Updated interface for local/global binary resolution |
src/Module/Binary/Binary.php | Extended interface to include execute signature |
src/DLoad.php | Refactored addTask to return a PromiseInterface using Manager |
src/Command/Show.php | Switched to getLocalBinary and Path object for cwd resolution |
src/Command/Build.php | New CLI command to trigger Velox build actions |
src/Bootstrap.php | Updated container bindings for Builder and binary provider |
resources/software.json | Registered Velox in the software metadata file |
dload.xsd | Extended XSD schema to include <velox> actions |
Comments suppressed due to low confidence (3)
src/Module/Velox/Internal/VeloxBuilder.php:43
- This
build
method orchestrates multiple steps (dependency checks, config prep, build execution) but lacks accompanying unit tests. Consider adding tests for successful and failure scenarios to ensure coverage.
public function build(VeloxAction $config, \Closure $onProgress): Task
src/Bootstrap.php:109
- BinaryProviderImpl is not imported in this file, causing an undefined class error. Add
use Internal\DLoad\Module\Binary\Internal\BinaryProviderImpl;
at the top of the file.
$this->container->bind(BinaryProvider::class, BinaryProviderImpl::class);
src/Bootstrap.php:110
- Factory is not imported or defined in this namespace, leading to an unresolved class. Import the correct HTTP client factory interface (e.g.,
use Internal\DLoad\Module\HttpClient\Factory;
).
$this->container->bind(Factory::class, NyholmFactoryImpl::class);
…om RoadRunner and Velox configuration
…rity and consistency
What was changed
This pull request introduces support for the Velox build system, enhances binary handling, and refactors task management in the
DLoad
module. Key changes include the addition of Velox-specific elements in the XML schema, a newBuild
command for custom binary creation, updates to binary provider methods, and improvements to task management with promise-based handling.Velox Build System Integration:
<velox>
element to thedload.xsd
schema for defining Velox build actions, including attributes for version constraints, plugins, and configuration files.resources/software.json
with metadata such as binary name, version command, and GitHub repository.Build
command insrc/Command/Build.php
to execute Velox build actions defined in the configuration file.Binary Handling Enhancements:
BinaryProvider
to use a new methodgetLocalBinary
, which includes the software name for more precise binary resolution. Changes applied insrc/Command/Show.php
andsrc/DLoad.php
. [1] [2] [3]Task Management Refactor:
TaskManager
with a more genericManager
class insrc/DLoad.php
.addTask
method insrc/DLoad.php
to return aPromiseInterface
and handle task results asynchronously. [1] [2]These changes collectively enhance the flexibility and functionality of the
DLoad
module, particularly for users needing custom binary builds or improved binary management.Why?
Checklist
build
orvelox
action #60