ncc project --generate=web Throws warnings #64

Open
opened 2026-02-12 20:38:21 +00:00 by netkas · 0 comments
Owner

When running ncc project --generate=web warnings are shown as so:

Generated File: /home/netkas/Desktop/sdcard/Projects/DynamicalWeb/samples/ExampleBootstrap/web_entry
PHP Warning:  Undefined array key "type" in phar:///usr/share/php/ncc/Objects/Project/BuildConfiguration.php on line 56
PHP Stack trace:
PHP   1. {main}() /usr/share/php/ncc:0
PHP   2. include() /usr/share/php/ncc:9
PHP   3. ncc\CLI\Main::main($argv = [0 => 'project', 1 => '--generate=web']) phar:///usr/share/php/ncc/ncc.php:148
PHP   4. ncc\CLI\Commands\ProjectCommand::handle($argv = ['project' => TRUE, 'generate' => 'web']) phar:///usr/share/php/ncc/CLI/Main.php:83
PHP   5. ncc\CLI\Commands\Project\ApplyTemplate::handle($argv = ['project' => TRUE, 'generate' => 'web']) phar:///usr/share/php/ncc/CLI/Commands/ProjectCommand.php:52
PHP   6. ncc\CLI\Commands\Project\Templates\Web\WebTemplate::generate($projectDirectory = '/home/netkas/Desktop/sdcard/Projects/DynamicalWeb/samples/ExampleBootstrap', $projectConfiguration = class ncc\Objects\Project { private string $sourcePath = 'src'; private string $defaultBuild = 'release'; private ?string $entryPoint = NULL; private ?string $webEntryPoint = NULL; private ?ncc\Objects\PackageSource $updateSource = NULL; private array|string|null $preCompile = NULL; private array|string|null $postCompile = NULL; private array|string|null $preInstall = NULL; private array|string|null $postInstall = NULL; private ncc\Objects\RepositoryConfiguration|array|null $repositories = NULL; private ncc\Objects\Project\Assembly $assembly = class ncc\Objects\Project\Assembly { private string $name = 'ExampleBootstrap'; private string $package = 'com.example.bootstrap'; private string $version = '0.1.0'; private ?string $url = NULL; private ?string $license = NULL; private ?string $description = NULL; private ?string $author = NULL; private ?string $organization = NULL; private ?string $product = NULL; private ?string $copyright = NULL; private ?string $trademark = NULL }; private ?array $dependencies = NULL; private ?array $executionUnits = NULL; private array $buildConfigurations = [0 => class ncc\Objects\Project\BuildConfiguration { ... }, 1 => class ncc\Objects\Project\BuildConfiguration { ... }]; private ?array $extensions = NULL }) phar:///usr/share/php/ncc/CLI/Commands/Project/ApplyTemplate.php:127
PHP   7. ncc\Objects\Project\BuildConfiguration->__construct($data = []) phar:///usr/share/php/ncc/CLI/Commands/Project/Templates/Web/WebTemplate.php:54
Modified File: /home/netkas/Desktop/sdcard/Projects/DynamicalWeb/samples/ExampleBootstrap/project.yml
Template 'web' generated successfully.

The project configuration looks like this after generation, which looks fine:

source: src
default_build: release
web_entry_point: web_entry
assembly:
  name: ExampleBootstrap
  package: com.example.bootstrap
  version: 0.1.0
execution_units:
  -
    name: web_entry
    type: php
    mode: auto
    entry: web_entry
build_configurations:
  -
    name: debug
    output: target/debug/com.example.bootstrap.ncc
    type: ncc
    definitions:
      NCC_DEBUG: true
  -
    name: release
    output: target/release/com.example.bootstrap.ncc
    type: ncc
  -
    name: web_release
    output: 'target/web_release/${ASSEMBLY.PACKAGE}.ncc'
    type: ncc
    options:
      NCC_DISABLE_LOGGING: '1'
When running `ncc project --generate=web` warnings are shown as so: ```log Generated File: /home/netkas/Desktop/sdcard/Projects/DynamicalWeb/samples/ExampleBootstrap/web_entry PHP Warning: Undefined array key "type" in phar:///usr/share/php/ncc/Objects/Project/BuildConfiguration.php on line 56 PHP Stack trace: PHP 1. {main}() /usr/share/php/ncc:0 PHP 2. include() /usr/share/php/ncc:9 PHP 3. ncc\CLI\Main::main($argv = [0 => 'project', 1 => '--generate=web']) phar:///usr/share/php/ncc/ncc.php:148 PHP 4. ncc\CLI\Commands\ProjectCommand::handle($argv = ['project' => TRUE, 'generate' => 'web']) phar:///usr/share/php/ncc/CLI/Main.php:83 PHP 5. ncc\CLI\Commands\Project\ApplyTemplate::handle($argv = ['project' => TRUE, 'generate' => 'web']) phar:///usr/share/php/ncc/CLI/Commands/ProjectCommand.php:52 PHP 6. ncc\CLI\Commands\Project\Templates\Web\WebTemplate::generate($projectDirectory = '/home/netkas/Desktop/sdcard/Projects/DynamicalWeb/samples/ExampleBootstrap', $projectConfiguration = class ncc\Objects\Project { private string $sourcePath = 'src'; private string $defaultBuild = 'release'; private ?string $entryPoint = NULL; private ?string $webEntryPoint = NULL; private ?ncc\Objects\PackageSource $updateSource = NULL; private array|string|null $preCompile = NULL; private array|string|null $postCompile = NULL; private array|string|null $preInstall = NULL; private array|string|null $postInstall = NULL; private ncc\Objects\RepositoryConfiguration|array|null $repositories = NULL; private ncc\Objects\Project\Assembly $assembly = class ncc\Objects\Project\Assembly { private string $name = 'ExampleBootstrap'; private string $package = 'com.example.bootstrap'; private string $version = '0.1.0'; private ?string $url = NULL; private ?string $license = NULL; private ?string $description = NULL; private ?string $author = NULL; private ?string $organization = NULL; private ?string $product = NULL; private ?string $copyright = NULL; private ?string $trademark = NULL }; private ?array $dependencies = NULL; private ?array $executionUnits = NULL; private array $buildConfigurations = [0 => class ncc\Objects\Project\BuildConfiguration { ... }, 1 => class ncc\Objects\Project\BuildConfiguration { ... }]; private ?array $extensions = NULL }) phar:///usr/share/php/ncc/CLI/Commands/Project/ApplyTemplate.php:127 PHP 7. ncc\Objects\Project\BuildConfiguration->__construct($data = []) phar:///usr/share/php/ncc/CLI/Commands/Project/Templates/Web/WebTemplate.php:54 Modified File: /home/netkas/Desktop/sdcard/Projects/DynamicalWeb/samples/ExampleBootstrap/project.yml Template 'web' generated successfully. ``` The project configuration looks like this after generation, which looks fine: ```yml source: src default_build: release web_entry_point: web_entry assembly: name: ExampleBootstrap package: com.example.bootstrap version: 0.1.0 execution_units: - name: web_entry type: php mode: auto entry: web_entry build_configurations: - name: debug output: target/debug/com.example.bootstrap.ncc type: ncc definitions: NCC_DEBUG: true - name: release output: target/release/com.example.bootstrap.ncc type: ncc - name: web_release output: 'target/web_release/${ASSEMBLY.PACKAGE}.ncc' type: ncc options: NCC_DISABLE_LOGGING: '1' ```
netkas changed title from ncc project --generate=web Trhrows warnings to ncc project --generate=web Throws warnings 2026-02-12 20:39:27 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Nosial/ncc#64
No description provided.