Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate property error message should include the name of the model. #877

Open
tg-msft opened this issue Aug 16, 2022 · 3 comments
Open
Milestone

Comments

@tg-msft
Copy link
Member

tg-msft commented Aug 16, 2022

With a spec like:

model Foo { ...Bar, ...Baz }
model Bar { qux: string }
model Baz { qux: string }

It'd be helpful if the error gave the name of the model:

- error duplicate-property: Model already has a property named qux
+ error duplicate-property: Model Foo already has a property named qux 

Playground Link

@ghost ghost added the Needs Triage label Aug 16, 2022
@joheredi
Copy link
Member

I would expect qux from Baz to override qux from Bar as Baz comes last. Maybe I'm just biased by how Javascript works

@markcowl markcowl added this to the [2022] September milestone Aug 19, 2022
@markcowl markcowl added the design:needed A design request has been raised that needs a proposal label Aug 19, 2022
@markcowl
Copy link
Contributor

markcowl commented Aug 19, 2022

-go through all the cases for this error and ensure a useful message targeted at potential solutions

@markcowl markcowl removed the design:needed A design request has been raised that needs a proposal label Aug 19, 2022
@markcowl
Copy link
Contributor

estimate: 5, pri: 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants