Skip to content

Required trait removal doesn't emit any events - should it? #1744

@kubukoz

Description

@kubukoz

Hi!

I bumped into this: if you merge two models with a member that's @required in one but not in the other, the merged model will always make the field required.

While this behavior is consistent with the usual handling of traits in model merging, shouldn't this emit some sort of event, whether it be a NOTE or WARN? I imagine some code might misbehave if you merge things like these:

structure Greeting {
  from: String,
  @required to: String
}
structure Greeting {
  @required from: String,
  to: String
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigatingThis issue is being investigated and/or work is in progress to resolve the issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions