razor icon indicating copy to clipboard operation
razor copied to clipboard

Renaming [Parameter]'s in Components is RUNTIME error... can this be COMPILE TIME error?

Open loganmarshall1 opened this issue 3 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

  • If I rename a [Parameter] on a component, and 300 pages use that component => auto rename update all .razor files that use it
  • If I remove a [Parameter] on a component, and 300 pages use that components parameter => compile time throw, right now its runtime console error

image

We need to know these errors at compile time not runtime, else its just JavaScript then :).

Describe the solution you'd like

  • If I rename a [Parameter] on a component, and 300 pages use that component => auto rename update all .razor files that use it
  • If I remove a [Parameter] on a component, and 300 pages use that components parameter => compile time throw, right now its runtime console error

image

We need to know these errors at compile time not runtime, else its just JavaScript then :).

Additional context

I searched open/closed issues to try to find a similar request for about 20 min before creating this. Please let me know if this is already requested. thanks

loganmarshall1 avatar Aug 19 '22 19:08 loganmarshall1

For issue no. 2: setting a parameter that doesn't exist on a component results in a runtime error, while it would be nice for it to be a compile time error. @davidwengier Is this a scenario that will be improved with cohosting? I tried asking in the Community Standup, but it slipped through the cracks.

dubeg avatar Oct 08 '25 00:10 dubeg

@dubeg Sorry I didn't see your comment. If you included a link to this issue in it, YouTube probably blocked it. I had a couple blocked :)

I wouldn't expect cohosting to change this at all, the compiler is the same its just how to talk to it that has changed.

davidwengier avatar Oct 08 '25 00:10 davidwengier

Ah, bummer! Thanks for the quick response.

dubeg avatar Oct 08 '25 00:10 dubeg