Skip to content

Guid parameters generate an object schema although profiles read GUID strings #701

Open

Description

@daniatic

Problem

Fallout 10.4.0 and current develop describe Guid parameters as reflected objects. System.Text.Json reads the same parameter from a JSON string. Editors therefore reject the value the build accepts. Nullable Guid also loses its nullable string shape.

Reproduction

Add these parameters to a FalloutBuild:

[Parameter] readonly Guid Id;
[Parameter] readonly Guid? OptionalId;
[Parameter] readonly Guid[] Ids;

Run any target and inspect .fallout/build.schema.json. The fields reference definitions.Guid, which contains object properties such as Variant and Version. A profile entry such as "Id": "70d8a2ef-dbbd-4e74-bca9-9a7e1867f97b" loads at runtime.

Outcome

Generate the same string representation the runtime reads, including nullable, array and nested values. Consumers should not rewrite the generated schema.

Acceptance criteria

  • Guid parameters generate a string schema with GUID format information.
  • Guid? allows both a GUID string and null.
  • Guid arrays and nested properties use that same shape.
  • Runtime profile loading continues to accept GUID strings.

Notes

I have a local generator fix and regression tests. All 254 Fallout.Build.Specs tests passed on Windows. The GUID check fails against the original mapper. This can accompany the profile-loading correction discussed in #667 (Enumeration profile loading).

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions