Skip to content

Generator fails without error message #93

@puelocesar

Description

@puelocesar

Description of the bug

When running dart run build_runner build --delete-conflicting-outputs -v, it fails with a [SEVERE] message, but no error message:

dart run build_runner build --delete-conflicting-outputs -v
Building package executable... (3.4s)
Built build_runner:build_runner.
[INFO] Entrypoint:Generating build script...
[INFO] Entrypoint:Generating build script completed, took 168ms

[INFO] BuildDefinition:Initializing inputs
[INFO] BuildDefinition:Reading cached asset graph...
[INFO] BuildDefinition:Reading cached asset graph completed, took 64ms

[INFO] BuildDefinition:Checking for updates since last build...
[INFO] BuildDefinition:Checking for updates since last build completed, took 628ms

[INFO] Build:Running build...
[INFO] Build:Running build completed, took 9ms

[INFO] Build:Caching finalized dependency graph...
[INFO] Build:Caching finalized dependency graph completed, took 38ms

[SEVERE] openapi_generator on lib/open_api_config.dart (cached):


[SEVERE] Build:
Failed after 54ms

Steps to reproduce

My configuration looks like this:

@Openapi(
  additionalProperties: AdditionalProperties(
    pubName: 'my_api',
    pubAuthor: 'MyAuthor',
  ),
  inputSpecFile: 'openapi.json',
  generatorName: Generator.dio,
  outputDirectory: 'packages/my_api',
)
class MyApiGeneratorConfig extends OpenapiGeneratorConfig {}

And I'm running it like this:
dart run build_runner build --delete-conflicting-outputs -v

Expected behavior

If there's something wrong with my openapi spec, of something wrong with my configuration, I expect to see error messages telling me why the generation failed.

Logs

No response

Screenshots

No response

Platform

macOS

Library version

4.11.0

Flutter version

3.10.6

Flutter channel

stable

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions