This change enables device runs on CI by building each test app on the helix instance it was deployed to. In past attempts, we looked at enhancing what takes place on the build machine via build tricks, compressing / cleaning up files early, etc and we could not overcome the need for excessively long timeouts and far more disk space.
The change also adopts the patterns established in the wasm test build, giving us the opportunity to support different scenario runs as well as workloads testing in the future.
* All of System.Security.Cryptography.Primitives has been moved
* AsymmericKeyExchangeFormatter moved from S.S.C.Algorithms
* This just starts the process to keep the infrastructure pieces separate from code layout pieces.
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
* XmlSerializer support for IsDynamicCodeSupported=false
Add more checks to XmlSerializer to check the SerializationMode. Don't try to use Reflection.Emit if the SerializationMode is ReflectionOnly.
These changes were ported from
* https://github.com/dotnet/runtimelab/pull/593
* https://github.com/dotnet/runtimelab/pull/600Fix#59167
* Fix a bug in XmlSerializer.CanDeserialize when in ReflectionOnly mode.
* Port UAP code for CanDeserialize
* PR feedback
* Add a linker test to ensure linker option '--enable-opt sealer' works when IsDynamicCodeSupported==false.
* Replace XmlUntypedStringConverter to XmlUntypedConverter
* Add more test
* add more tests
* remove unssoprt test
* feedback review
Co-authored-by: kronic <[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.
* Use official Type.GetTypeCode() instead of the extension that was added to fill the gap in the earlier days of .Net Core.
* Bring reflection-based serializer in line with RefEmit behavior for 'object' serialization.
* Allow easier creation of correctly sized dictionaries in scenarios with lots of known namespaces.
* Stop passing internal dictionaries around.
* Reduce enumerations, and immutable-ish improvements.
* PR feedback.
* Use ValueCollection directly instead of IEnumerable<> to avoid virtual calls.
* Update XmlSerializerNamespaces.cs
* Remove old fwlink from Obsolete messages and make message improvements
* Thorough review and update of Obsolete messages
* Cleanup
* Make messages about unsupported APIs more consistent
* Update RequiresUnreferencedCodeAttribute messages to be consistent between ref and src
* Cleanup
* Cleanup
* Use 'not supported' instead of 'no longer supported'
* Omit unnecessary error:false from Obsolete attributes. Fix message typo.
* Remove old comment
* PR feedback
Fixes#50576Fixes#50881Fixes#50916Fixes#50917Fixes#50918Fixes#50919Fixes#50927Fixes#50928Fixes#50944Fixes#50945Fixes#50946Fixes#50947Fixes#50948Fixes#50999
When setting up functional tests for mobile, the feature switches being used for the tests were misplaced in a broader project, affecting the library tests and causing failures. After moving the feature switches to the scope of functional tests as done in #53253, these test suites no longer fail and can be re-enabled.
* Replace a few unnecessary uses of Convert.ToString
* Update src/libraries/System.Private.Xml/src/System/Xml/Schema/ContentValidator.cs
Co-authored-by: Christopher Watford <[email protected]>
Co-authored-by: Christopher Watford <[email protected]>
* Bugfix: System.Xml.Serialization: Compiler.GetTempAssemblyName is not persistent under .NET Core
The implementation of String.GetHashCode() was persistent by default in .NET Framework. allowing to predictably name an XmlSerializers.{HashCode}.dll containing the pre-generated serializers.
In .NET Core / .NET 5, String.GetHashCode() is no longer persistent, so the value of ns.GetHashCode() will change during each run, preventing it from picking up the XmlSerializers dll correctly.
* Remove trailing whitespace
* Use truncated SHA512
* Fixed compilation
* Dispose SHA512 instance
* Fixed compilation
* Update src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compiler.cs
Co-authored-by: Stephen Toub <[email protected]>
* Update src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compiler.cs
Co-authored-by: Stephen Toub <[email protected]>
* Update Compiler.cs
Co-authored-by: Stephen Toub <[email protected]>
* Use more string interpolation
I previously did a pass looking for opportunities. Finding a few more, as well as fixing some misuse of existing methods.
* Update src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
Co-authored-by: halgab <[email protected]>
* Apply suggestions from code review
Co-authored-by: Jan Kotas <[email protected]>
Co-authored-by: halgab <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
* Add DateTimeOffset as a primitive for XmlSerializer.
* Fix DefaultValueAttribute handling for DTO.
* Add tests for DateTimeAttribute and XmlSerializer.
* Missed a 'KnownType' spot.
* Update SGen tests to use current dotnet.exe from build.
* Unbreak runtimeconfig creation for testing.
* Debugging failure to resolve CoreCLR path.
* Test fixup.
* More test cleanup.
* Temporarily disable generator tests.
* Use InitObj instead of constructors for DateTimeOffset and TimeSpan.
* Use a different XmlWriter which will check for invalid characters like null.
* Bring our XmlReader use into the 21st century as well.
* Update src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs
Co-authored-by: Stephen Toub <[email protected]>
* Update src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs
Co-authored-by: Stephen Toub <[email protected]>
* Update src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs
Co-authored-by: Stephen Toub <[email protected]>
* Don't need to specify options that are defaults on XmlWriter.
Co-authored-by: Stephen Toub <[email protected]>
* Preserve necessary type and method
* Change the way of getting the type
* Inline the constants
* Enable NonValidated_ValidAndInvalidValues_DictionaryMembersWork
* Enable TransformStrStrResolver3
It can easily use a static singleton, as the instance is immutable and exists purely to provide a "I don't have line info" / (0,0) value if anyone queries for position.
The array is only used for a subset of validators; no point in paying for this array for every ValidationState instance even if it's not going to be used.
* Remove unnecessary cost from XmlNode.SelectSingleNode
It's currently implemented by delegating to SelectSingleNodes and returning the first one. While the list is lazily-populated, this still entails creating an `XPathNodeList`, creating a `List<XmlNode>`, storing the enumerated into the list, and then returning the element from the list, which is then thrown away. With just a few lines, we can cut through all of that.
* Make XPathScanner and XPathParser into structs
No need for these to be allocated classes. They can just live on the stack where they're created.
* Reduce ScanName overhead
This shows up on the hot path of parsing the xpath expression. We can use a span to avoid bounds checking.
* Avoid bounds check in NextChar
NextChar is used by lots of routines to advance to the next character. We can streamline it to avoid the bounds check when indexing into the string.
* Optimize SkipSpace for there not being any
The typical case is there isn't any whitespace, so inline that fast check. This was showing up as a few percentage of a simple scenario.
* Add unsigned variants for BitConverter bit APIs
Adds DoubleToUInt64Bits, UInt64BitsToDouble, SingleToUInt32Bits,
UInt32BitsToSingle, HalfToUInt16Bits and UInt16BitsToHalf.
Implementations were based on existing signed integer variants.
Convert usages of existing APIs to unsigned variants when appropriate.
Fix#36469
* Revert comment change
Reverted a comment change made in the existing code by mistake.
* Use existing code for implementations
Use the existing signed methods with a cast, less code with the same codegen.
* Cast correction
Corrected the type used in a cast.
ArrayList.ToArray(Type) has to lookup the array type in the type loader structures. It makes it slow and potentially AOT unfriendly since the code required to support the array type may not exist.
Convert most uses of ArrayList.ToArray in libraries to use List<T> if possible, or ArrayList.CopyTo if the conversion to List<T> was not straightforward.
Simplified a few other places that created arrays while I was on it.
WSL1 isn't a supported build or execution environment for dotnet/runtime.
Because of that removing the checks and platform detection for it as
that code path isn't necessary for WSL2 anymore as it contains a fully
featured kernel which behaves just a like a usual Linux distro.
Fixes https://github.com/dotnet/runtime/issues/18258