Commit Graph

38480 Commits

Author SHA1 Message Date
Larry Ewing a36a57df65 Avoid using exception filters for AOT runtimes 2019-05-08 07:49:48 -07:00
Steve Sanderson e0007f4f4b Improve robustness of components Bind and EventBubbling E2E tests 2019-05-08 13:53:04 +01:00
Andrew Stanton-Nurse 8759518a97
add support for both env vars in #7916 fix (#10009) 2019-05-07 22:10:31 -07:00
Doug Bunting 58c67727df
Update all the things (except EF Core dependencies) (#10025)
- see #9923 for related discussion
- pin aspnet/EntityFrameworkCore dependencies
- chain aspnet/Extensions dependencies through aspnet/AspNetCore-Tooling instead
- run `darc` to grab the latest
- remove System.Text.Encodings.Web references
  - now included in runtime.*.Microsoft.NETCORE.App packages

nits:
- copy a few `ReferenceResolution.md changes from aspnet/Extensions version
2019-05-07 22:06:39 -07:00
dotnet-bot 782a3f8f5e Merge in 'release/2.2' changes 2019-05-08 05:05:13 +00:00
Doug Bunting 858f5195d9
Merge 'release/2.1' -> 'release/2.2' (#10064) 2019-05-07 22:04:11 -07:00
Mikael Mengistu b0659f660b
Add System.Text.Json protocol to the SignalR functional tests (#9936) 2019-05-07 18:04:56 -07:00
Doug Bunting bdd2134928
Merge branch 'release/2.1' into release/2.2 2019-05-07 17:38:00 -07:00
dotnet-bot 03f29fb422 Merge in 'release/2.2' changes 2019-05-08 00:30:53 +00:00
Doug Bunting 0c0596b910
Merge branch 'release/2.1' => 'release/2.2' (#10017) 2019-05-07 17:29:50 -07:00
Mikael Mengistu a26c4e936b
Make stream buffer capacity configurable (#9877) 2019-05-07 17:13:07 -07:00
Andrew Stanton-Nurse 11516c9272
comment typo (#9954) 2019-05-07 15:22:00 -07:00
BrennanConroy f30e738848
Pre-encode known Json values in SignalR (#9999) 2019-05-07 15:21:00 -07:00
Ryan Nowak 1b47f44876
Add a top-level node for analyzers (#9906)
This is the first step, and just estabilishes a skeleton. The end goal
is organize our analyzers under this node because:
1. We're writing some 'top level' analyzers that depend on everything
else
2. We want to be able to service analyzers on the SDK schedule
(independent of runtime).

Next, we'll merge the MVC analyzers into this assembly since there's no
reason for them to be separate. The MVC API analyzers will remain a
separate package, but under this node. The component analyzers will
remain separate as they need to ship as a package, but will move under
this node as well.
2019-05-07 15:01:08 -07:00
Stafford Williams 04600e83fc Docs: Fix branch link (#10014) 2019-05-07 13:59:12 -07:00
John Luo 58447bee31
Remove gRPC template workarounds (#10026) 2019-05-07 13:57:15 -07:00
Justin Kotalik 18faf4ad7a
Make inprocess not set CaptureStartupErrors and let ANCM handle it. (#9859) 2019-05-07 12:03:11 -07:00
Ryan Nowak e401f35b45
Header propagation sample and UX improvements (#9793)
Creating a sample for the header propagation package and some various
misc UX improvements based on building the sample.

A small list:
- allow duplicate inbound names
- de-dupe based on outbound names
- add sugar for configuration
- simplify pattern for transforming values
- add error message for missing middleware

Also a few small perf things.

I started this out by wanting to remove the following from the
configuration pattern:
```C#
options.Headers.Add("X-TraceId", null);
```

This pattern with null is undiscoverable, but we didn't provide
something simpler. The most common case was to add a custom collection
type so we can define sugar methods.

The next realization is that in practical case (dist tracing sample) you
either way to *key* off of the same inbound header twice, or you don't
have an inbound header at all, and you will synthesize the value every
time. This means that the way we're treating inbound header names is a
bit wrong. We don't want inbound header names to be unique, we want
*outbound header names to be unique*.

Next, I want to consolidate DefaultValue and ValueFactory. The problems
I saw with this:
- DefaultValue is a trap. It's rare to use a static value.
- ValueFactory really wants the header name *and* value

I think what's there now is much more terse to work with.
2019-05-07 11:07:42 -07:00
Steve Sanderson e0c32f42f4
Key support. Implements #8232 (#9850)
* Store component/element keys on RenderTreeFrame

Also refactored how RenderTreeFrame gets constructed. The previous arrangement of having ad-hoc ctor overloads for different scenarios became intractible (too many combinations to avoid clashes; risk of accidentally losing field values when cloning). There's now one constructor per RenderTreeFrameType, so you always know where to add any new field values, and implicitly guarantees you don't lose other field values because adding a new param forces updates at all the call sites.

* Add StackObjectPool, which will be useful momentarily

* Support keyed insertions/deletions

* Refactor AppendDiffEntriesForRange to prepare for adding "move" logic

* Apply permutations on the JS side

* Handle keyed moves by writing a post-edit permutation list

* Shrink KeyedItemInfo struct

* Include sourcemaps when building client-side Blazor apps with ReferenceFromSource

* Update struct length of edit frames now it's explicit layout

It's longer now because all the reference-type fields, except the last, now have to be 8 bytes for compatibility with 64-bit runtimes. Previously on Mono WebAssembly the reference-type fields were all 4 bytes.

* Tolerate clashing keys (i.e., produce a valid diff, even if suboptimal)

* Tolerate keys being added/removed incorrectly

* E2E test harness for 'key'

* Some more unit test cases

* Invert diffing logic to prefer matching by key over sequence

Previously it preferred sequence over key, but that's wrong, and surfaces as bugs when you mix keyed and unkeyed items. We need to prefer key over sequence, because key is meant to guarantee preservation, whereas sequence is just best-effort preservation.

* Make unit test cases more adversarial

* First actual E2E test

* In E2E test, verify correct preservation of components

* E2E tests for simple insert/delete cases (with and without keys)

* E2E test for reordering. Also extend other tests to verify simultaneous editing.

* E2E test for many simultaneous changes

* Update reference sources

* CR: Avoid x = y = z

* CR: Only use 'finally' for actual cleanup

* CR: Clean up RenderTreeFrame assignment

* CR: Include 'key' in RenderTreeFrame.ToString()

* CR: Avoid "new T()" in StackObjectPool

* CR: Make KeyedItemInfo readonly

* CR: Handle change of frame type with matching keys (and sequence)

* CR: Add E2E test showing form + key scenarios

* Preserve focus across edits

* Tweak E2E test case

* In client-side Blazor, prevent recursive event handler invocations

* Actual E2E tests for moving form elements
2019-05-07 18:22:10 +01:00
BrennanConroy 14496c9989
React to SignalR hub protocol change (#10010)
https://github.com/aspnet/AspNetCore/issues/5320
2019-05-07 08:18:12 -07:00
dotnet-bot 1435be9c02 Merge in 'release/2.2' changes 2019-05-07 08:18:32 +00:00
John Luo 6e691e9f20
Use nuget release of netfx ref package (#10024) 2019-05-07 01:17:14 -07:00
Doug Bunting c7287509a0 Update EF Core submodule for 2.1
- aspnet/AspNetCore-Internal#2474
2019-05-06 21:50:39 -07:00
dotnet-bot 3432b599a5 Merge in 'release/2.2' changes 2019-05-07 01:50:45 +00:00
Doug Bunting fcd96b2fe5 Update EF Core submodule for 2.2
- aspnet/AspNetCore-Internal#2474
2019-05-06 18:49:46 -07:00
Doug Bunting 493e216ca6
Correct `$(StartArguments)` 2019-05-06 18:46:52 -07:00
Ryan Nowak d3400f7cb2
Fix: #6882 - Explode UseBlazor (#9449)
This changes the recipe for client-side blazor to use similar primitives
to server side applications.

---

I ignored auto-rebuild support because it's currently dead code until we
have that in VS. If we add auto-rebuild to ASP.NET Core - we'd probably want
to make that a separate gesture inside `IsDevelopement()` like other
dev-time features anyway.

---

The static files hookup is a special thing because creating the file
server for a client-side Blazor app involves some non-trivial work. We
plan to make this better in the future.

What's nice about this pattern is that the implementation is pretty
simple and literal, and it scales fine if you have multiple Blazor
client-side apps.

I didn't provide a lot of options here, it's pretty much the same as
UseBlazor.

---

I feel pretty good about the wireup with routing to use the
`index.html` from the client app. I think it's pretty to-the-point.
2019-05-06 18:09:26 -07:00
Ryan Brandenburg 8fd86c38db
Make some tests Flaky (#9935)
Mark some tests flaky.
2019-05-06 15:33:02 -07:00
Doug Bunting 2b186421d8
Merge branch 'release/2.2' into merge/release/2.1-to-release/2.2 2019-05-06 15:18:44 -07:00
Ben Adams bbf7ed2907 Lazy create ExceptionHandlerMiddleware statemachine (#9549) 2019-05-06 15:15:48 -07:00
huysentruitw e436fd9d08 Add support for Redirect preserving method/body (HTTP 307 and 308) (#9968) 2019-05-06 15:07:07 -07:00
Doug Bunting 17ea650638
Add `--update` option to BaselineGenerator (#9956)
- aspnet/AspNetCore-Internal#1649
- remove `$(StartArguments}` from project; conflicts with `--update`
- support v3 source _automatically_ when not using `--update`
  - use NuGet's V3 source by default
- update README.md

nits:
- `--source` -> `--package-source` due to conflict with a `dotnet` argument
- address Markdown lint warnings in README.md
- grab a couple of improvements from 'release/2.2'
  - never exit silently
  - remove `first` special case
2019-05-06 15:04:15 -07:00
Hao Kung 0dfe695468
Stop caching policies in AuthorizeFilter (#9957) 2019-05-06 11:59:37 -07:00
Andrew Stanton-Nurse 557bbf7870
fix #7916 by using DOTNET_RUNNING_IN_CONTAINERS env var to detect container (#9903) 2019-05-06 11:55:45 -07:00
Andrew Stanton-Nurse e6db096af5
fix #9130 by fixing source revision embedding (#9902)
We removed our CommitHash property in order to use the built-in SourceRevisionId property but didn't update ANCM
2019-05-06 10:16:15 -07:00
huysentruitw f2f1d77517 TestHost.WebSocketClient should set Request.Host (#9973) 2019-05-06 08:52:56 -07:00
Pavel Krymets fa239f20a5 EnableAzurePipelinesReporter for helix (#8094)
* EnableAzurePipelinesReporter for helix

* Update Helix SDK

* Revert a fix that broke things even more

* Try publishing test assets

* Try fixing Kestrel tests on Helix

* Try a temp file in the working directory

* Skip Http2Spec tests on Debian 8

* Missed update

* Try a different format

* Disable failing test on Fedora

* Mark flaky test
2019-05-05 22:15:10 -07:00
Justin Kotalik aaaaf572fd
Implement MaxRequestBodySize feature for IIS inprocess (#9475) 2019-05-05 19:30:12 -07:00
Doug Bunting 93d82b0883
Merge branch 'release/2.2' => 'master' (#9986) 2019-05-05 12:48:21 -07:00
Doug Bunting ed886c47fe
Merge branch 'release/2.2' -> 'master' 2019-05-05 11:14:25 -07:00
dotnet-bot 9ee1a878fc Merge in 'release/2.2' changes 2019-05-05 17:57:03 +00:00
Doug Bunting f226864cd6
Merge branch 'release/2.1' => 'release/2.2' (#9980) 2019-05-05 10:56:02 -07:00
bordecal 2d33c32187 Allow ValidationVisitor.ValidateComplexTypesIfChildValidationFails to be configured via MvcOptions (#9312)
* Allow ValidationVisitor.ValidateComplexTypesIfChildValidationFails to be configured via MvcOptions (#8519)

* Regenerated reference source for Mvc.Core to add MvcOptions.ValidateComplexTypesIfChildValidationFails

* Simplified functional tests for MvcOptions.ValidateComplexTypesIfChildValidationFails usage scenarios
2019-05-05 07:08:25 -07:00
Howard Richards 77424a6b06 Amend server-side blazor template WeatherForecast TemperatureF to use formula - fixes #9955 (#9981) 2019-05-05 06:19:41 -07:00
Doug Bunting ec4c3c4f8d
Merge branch 'release/3.0-preview5' => 'master' (#9744) 2019-05-04 22:46:21 -07:00
Doug Bunting 8cb331f8e1
Merge branch 'release/2.1' into release/2.2 2019-05-04 22:43:55 -07:00
Doug Bunting 6a6a119c9a Switch to non `-Int` pools and clear NuGet caches
- aspnet/AspNetCore-Internal#2436
- aspnet/AspNetCore#9767
2019-05-04 22:23:33 -07:00
Doug Bunting 26a43cdd00
Merge branch 'master' into merge/release/3.0-preview5-to-master 2019-05-04 19:05:14 -07:00
Ben Adams 19c9010c2f Read interface IList.Count once rather than per iteration (#9962) 2019-05-04 17:54:12 -07:00
John Luo 3e0afe4029
Update SDK to 3.0.100-preview5-011568 (#9963) 2019-05-04 17:05:34 -07:00