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

Add runtime support for Blazor attribute splatting #10357

Merged
merged 19 commits into from
May 29, 2019
Merged

Conversation

rynowak
Copy link
Member

@rynowak rynowak commented May 17, 2019

Implements: #5071

See design notes here for details: #5071 (comment)

Opening a PR now to get early feedback and discussions. This will require checkins and updates from the tooling repo to fix the runtime behaviour of markup blocks and to add support for splatting as a language features (syntax not yet locked).

@rynowak rynowak marked this pull request as ready for review May 19, 2019 23:10
@rynowak
Copy link
Member Author

rynowak commented May 19, 2019

@SteveSandersonMS @javiercn @pranavkm - ready for your review.

I need to merge the AddMultipleAttributes changes in order to make progress on the compiler. I'd also really like it if we could lock on the attribute/parameter terminology now.

@Eilon Eilon added the area-blazor Includes: Blazor, Razor Components label May 20, 2019
@rynowak rynowak force-pushed the rynowak/splatsville branch 4 times, most recently from 51fdeb6 to 8489a49 Compare May 26, 2019 01:14
@rynowak
Copy link
Member Author

rynowak commented May 27, 2019

@javiercn @pranavkm could one of you take a look? Steve and I already discussed the details of this works but he's on vactaion.

@javiercn
Copy link
Member

Looking at it.

@rynowak
Copy link
Member Author

rynowak commented May 28, 2019

@javiercn @pranavkm ping

Ryan Nowak added 4 commits May 28, 2019 12:16
- Adds AddMultipleAttributes
- Fix RTB to de-dupe attributes
- Fix RTB behaviour with boxed EventCallback (#8336)
- Add lots of tests for new RTB behaviour and EventCallback
This was being flaky while I was running E2E tests locally, and it
wasn't using a resiliant equality comparison.
Adds the option to mark a parameter as an *extra* parameter. Why is this
on ParameterAttribute and not a new type? It makes sense to make it a
modifier on Parameter so you can use it both ways (explicitly set it, or
allow it to collect *extras*).

Added unit tests and validations for interacting with the new setting.
Ryan Nowak added 14 commits May 28, 2019 12:16
This is the *easy way* to write an analyzer that looks at declarations.
The information that's avaialable from symbols is much more high level
than syntax. Much of what's in this code today is needed to reverse
engineer what the compiler does already. If you use symbols you get to
benefit from all of that.

Also added validation for cascading parameters to the analyzer that I
think was just missing due to oversight.

The overall design pattern here is what I've been converging on for the
ASP.NET Core analyzers as a whole, and it seems to scale really well.
This involved a refactor to run the analyzer per-type instead of
per-property.
@rynowak rynowak merged commit 6ca30bb into master May 29, 2019
@ghost ghost deleted the rynowak/splatsville branch May 29, 2019 00:17
@benaadams
Copy link
Member

Breaks on unixy style OSs I think its the embedded crlf in the test string; have added fix #10610

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants