Skip to content

Improve GeneratorConfig.load #3298

Open

Description

@nielsenko

Revisit validation in GeneratorConfig.load

There are a few issues with the current implementation of the GeneratorConfig.load method.

  1. A serverpod project created with --mini does not have a config/generator.yaml file. This makes it legal to not have a generator.yaml file, and impossible to distinguish between a missing file and mini project.
  2. Two pubspec.yaml files are required for the client and server projects, but what if no client is to be created?
  3. Error reporting is very coarse. Much better errors are reported by lower level code in the form of SourceSpanExceptions, but these are never surfaced to the user. This makes it difficult to diagnose and fix issues with the generator configuration.
  4. The same pubspec files are multiple times, which can lead to inconsistencies and errors. Also it just feels clumsy. We traffic in plain paths for too much of the stack.

See also: #3273 (comment)

Activity

  1. added
    enhancement
    area: configuration
    on Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: configurationenhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions