Update slngen tooling to latest stable version and solution files since
a lot changed since the last time they were updated:
- NET7 (removal of older TFMs)
- Source Generators
Add a few more suites to help validate the device infrastructure
Enable soft trimming and skip failing tests
Co-authored-by: Steve Pfister <[email protected]>
Co-authored-by: Alexander Köplinger <[email protected]>
With the newest udpate of slngen, the order of elements (configuration, folders, etc.) is in sync with how Visual Studio arranges them.
Also the order is now deterministic.
Based on that, updating all solution files to have the correct ordering of elements. This change also unblocks adding CI protection for
making sure that solution files are up-to-date in regards to their dependencies as slngen is now generating the files deterministically.
* Used VectorXYZ.Create for constants in Base64
* Used VectorXYZ.Create for constants in BitArray
* Remove conditional compilation
It's only built for NetCoreAppCurrent, so no need to special case older runtimes.
Add test to check fix.
Checking comparison result against 1 or -1 causes problems when custom comparer is used.
As a result Min and Max properties return incorrect values.
Since AOT'ing each test suite takes between 3-9 min, we need to shift the burden over to helix.
## This is done by:
1. building the test assemblies on the build machine
- the wasm part of the build is not executed on the build machine,
because it has the AOT build part
2. Zip up the test assembly+friends, *and* any bits required to run the wasm
app build for that on helix (eg. emsdk, wasm app targets, cross compiler etc)
3. Send all this to helix, and use a custom `aot-build.proj`
- which recreates all the build inputs for the `WasmBuildApp` target
using the paths for the assets on helix
- then we can run `WasmBuildApp` for the build, resulting in a wasm app
bundle.
4. Run the tests!
- We already have the bits required for building wasm apps on helix, supported
for `Wasm.Build.Tests`, which we can use here too.
## Trimming:
- Since, AOT can be so expensive, we use `EnableAggressiveTrimming=true`(EAT), but
that means that we could have issues due to trimming.
- And it can sometimes be unclear whether the build/test failures are due to trimming
or AOT.
- Because these builds+test runs are different from other builds, owing to the
"build partially on helix" step, a normal EAT build would not be the same as
- to help with testing this, we add two lanes to `runtime-staging`:
- `*_Mono_AOT`: builds AOT+EAT on helix
- `*_Mono_EAT`: builds EAT, on helix
- this is required because we want to run almost the same kinda
build: 1. build test assembly; *2. send to helix; 3. build wasm app;* 4. run tests
- This should effectively mean that we can see which errors might be due to EAT, and
which are clearly because of EAT+AOT.
Co-authored-by: Steve Pfister <[email protected]>
Co-authored-by: Marek Safar <[email protected]>
Co-authored-by: Mitchell Hwang <[email protected]>
Co-authored-by: Ankit Jain <[email protected]>
* Add Array.GetMaxLength<T> implementation.
* Implement Array.MaxLength and fix all remaining references
* Apply suggestions from code review
Co-authored-by: Jan Kotas <[email protected]>
* Apply suggestions from code review
Co-authored-by: Jan Kotas <[email protected]>
* Update src/libraries/System.Collections/tests/Generic/Stack/Stack.Generic.Tests.cs
Co-authored-by: Jan Kotas <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
* Use IGenericSharedAPI test harness in PriorityQueue
* remove dead code
* remove index check from IEnumerator.Current
* Update src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Generic.cs
Co-authored-by: Stephen Toub <[email protected]>
* Update src/libraries/System.Collections/tests/Generic/PriorityQueue/PriorityQueue.Generic.cs
Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
* make comparer field readonly
* abstract IComparer in PriorityQueue generic tests
does minor refactorings and adds new tests
* add PriorityQueue property tests
* address feedback
* add seed for deterministic runs
* apply var fixes in property tests
* replace FsCheck properties with theories
* Add PriorityQueue to System.Collections.Generic (#43957)
This commit adds a new data structure, priority queue.
Fixes#43957
* (draft step, to squash) Modify API reference
In this commit, I modified the API reference using [these guidelines](https://github.com/dotnet/runtime/blob/4d784693ebc5f91c7eede32170046355ef3969b2/docs/coding-guidelines/updating-ref-source.md), following the advice from @danmosemsft.
The automatically generated code (with `dotnet msbuild /t:GenerateReferenceAssemblySource`) didn't build out of the box and I tweaked it manually.
* (draft step, to squash) Add tests for PriorityQueue
Added generic tests for <int, int> and <string, string>. Removed non-generic tests.
* (draft step, to squash) Add initial implementation
This commit adds the core of the heap implementation for the priority queue.
It doesn't implement the method `EnqueueDequeue`, as I'm not convinced by it. It also doesn't implement the method `CopyTo(Array array, int index)`, leaving this one for later.
* (draft step, to squash) Rename parameters
* (draft step, to squash) Replace `this.nodes` with `_nodes`
* (draft step, to squash) Use an array and handle sizing ourselves
* (draft step, to squash) Create UnorderedItemsCollection lazily
* (draft step, to squash) Deduplicate constructors
* (draft step, to squash) Replace excessive `var` with explicit types
* (draft step, to squash) Remove `this.` in front of methods
* (draft step, to squash) Improve out-of-range-argument exceptions
* (draft step, to squash) Use error messages from .resx
* (draft step, to squash) Use positive case first in try methods
* (draft step, to squash) Implement UnorderedItemsCollection.CopyTo
* (draft step, to squash) Optimize expressions involving Arity
* (draft step, to squash) Adjust implementation to be consistent with reference
* (draft step, to squash) Implement method `EnqueueDequeue`
* (draft step, to squash) Make EnsureCapacity return int
* (draft step, to squash) Simplify lazy initialization of _unorderedItems
* (draft step, to squash) Use `out _` discard for unused properties
* (draft step, to squash) Relax null checks on elements and priorities
* (draft step, to squash) Simplify method SetCapacity
* (draft step, to squash) Remove MethodImplOptions.AggressiveInlining attributed
* (draft step, to squash) Use Array.Empty if the initial capacity is zero
* (draft step, to squash) Simplify UnorderedItemsCollection.Enumerator declaration
* (draft step, to squash) Simplify GetEnumerator methods
* (draft step, to squash) Optimize EnqueueRange methods
* (draft step, to squash) Capitalize members of (TElement, TPriority)[]
* (draft step, to squash) Improve resize constants
* (draft step, to squash) Remove redundant `.this`
* (draft step, to squash) Optimize EnqueueDequeue
* (draft step, to squash) Reduce indentation
* (draft step, to squash) Simplify math expressions
* (draft step, to squash) Remove the PutAt helper method
* (draft step, to squash) Make the UnorderedItemsCollection constructor internal
* (draft step, to squash) Clear last node slot on removal
* (draft step, to squash) Improve next growth capacity computation
* (draft step, to squash) Optimize Enqueue method
* (draft step, to squash) Make UnorderedItemsCollection.CopyTo implemented explicitly on ICollection
* (draft step, to squash) Improve priority queue tests
* (draft step, to squash) Drop redundant casting
* (draft step, to squash) Cosmetic improvements
* (draft step, to squash) Change signature of UnorderedItemsCollection
* (draft step, to squash) Add test PriorityQueue_Generic_EnqueueDequeue_EqualToMin
* (draft step, to squash) Add tests of enqueue null functionality
* (draft step, to squash) Add test PriorityQueue_Generic_EnsureCapacity_Negative
* (draft step, to squash) Check underlying buffer length in tests with reflection
* (draft step, to squash) Check enumeration invalidation
* (draft step, to squash) Simplify code and improve documentation
* Sorted Dictionary Copy optimization
* Update src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs
Co-authored-by: Jan Kotas <[email protected]>
* Feedback
Co-authored-by: Jan Kotas <[email protected]>
* Change Task.FromResult to use same task cache as async methods
Task.FromResult today always creates a new task. This leads developers that are aware of this to then create their own caches for common values, typically 0, true, and false, to avoid task allocations for those common values. But we already have such values cached internally, used for async method return values. We can just use the same cache for Task.FromResult.
* Address PR feedback
- Remove depprojs which currently binplace external references into the RefPath folders in favor of PackageReference and PackageDownload items.
- Build all configurations by default when building an individual project (either on the CLI or inside VS) same as with the official SDK. This enables .NETFramework Test Explorer support.
- Centrally define libraries that compose the shared framework instead of in each Directory.Build.props file to be able to build the targeting pack first and consume it in the OOB libraries.
- Use ProjectReferences to reference OOB projects. Compile against the reference assembly but use the implementation assembly app-local during runtime.
- Remove OOBs from the testhost and remove the testhost folder for .NETFramework as it isn't required anymore.
- Only binplace for $(NetCoreAppCurrent) to compose a) the targeting pack, b) the runtime pack, c) the testhost, d) a full closure for the shims.
- Use Targeting Packs for OOB projects (with their implicit assembly references) but still explicitly define granular references for .NETCoreApp configurations (DisableImplicitAssemblyReferences switch). Use the implicit targeting pack references in some Microsoft.Extensions.* cases.
- Remove placeholder configurations as they aren't needed anymore with explicit P2Ps vs Targeting Pack references.
- Remove implicit assembly references (ie for .NETFramework, mscorlib)
- Remove AssemblySearchPath hacks that were introduced with b7c4cb7 as the targeting pack is now used by default.
- Reduce unnecessary .NETFramework configurations that were added to run tests in favor of the already existing ref&src configurations.
- Stop hardcoding the paths for wasm assemblies and use the returned TargetPath of the ProjectReferences.
- Addressed formatting (ItemGroups, References at the bottom of the project file, ordering of references, use LibrariesProjectRoot instead of a relative path, unnecessary AssemblyName and RootNamespace properties which are identical to the project name, ordering of tfms)
- Revert "fix clean (#33758)"