Commit Graph
2187 Commits
Author SHA1 Message Date
Jeff Handley fabace8621 Update area-owners to reflect a few changes (#59975) 2021-10-05 12:35:33 +02:00
Stephen Toub e118d3fc71 Update Microsoft.CodeAnalysis.CSharp.CodeStyle version (#59783) 2021-10-03 10:14:02 -04:00
Jeff Handley ed4f087a59 SYSLIB0036 - Regex.CompileToAssembly is obsolete (#59837) 2021-09-30 19:03:52 -04:00
Aleksey Kliger (λgeek)andAnkit Jain acb00500a0 Build one MonoTargetsTasks assembly for Microsoft.NET.Runtime.MonoTargets.Sdk pack (#59720)
* Build one MonoTargetsTasks assembly for Mono.NET.Runtime.MonoTargets.Sdk pack

   Instead of 3 assemblies for some tiny tasks.

   Building a single assembly also ensures that everything in the pack depends on and bundles identical versions of dependent assemblies.  For example on net472, a single version of System.Text.Json with a single fixed version shared by both the JsonToItemsTaskFactory task factory and the RuntimeConfigParser task.

   Related to https://github.com/dotnet/runtime/issues/59619

* Update testing and wasm to use MonoTargetsTasks.dll

* Move assembly stripper to a separate assembly

   Build it with nullability checking disabled.

   Build the main MonoTargetsTasks assembly with nullability enabled

* Don't include msbuild assemblies in MonoTargets package

* re-enable analyzers for the MonoTargetsTasks assembly

* Include *.dll in the MonoTargetsTasks nupkg

   In particular, pick up all the dependent assemblies for the net472 build

* Update various READMEs

* remove unneeded target

* Switch ILStrip to use the same Parallel.ForEach logic as MonoAOTCompiler

* Remove unneeded NoWarn warnings

* rearrange package references in MonoTargetsTask.csproj for readabilty

* More ItemGroup reformatting

* fix nits

* Use SystemThreadingTasksExtensionsVersion instead of hardcoding

Co-authored-by: Ankit Jain <[email protected]>
2021-09-30 11:13:26 -04:00
Eirik TsarpalisandStephen Toub 91ea67f7a7 Acknowledge community triagers in area-owners.md (#59748)
* Update area-owners.md

* address feedback

* Update docs/area-owners.md

Co-authored-by: Stephen Toub <[email protected]>

* Update area-owners.md

Co-authored-by: Stephen Toub <[email protected]>
2021-09-29 16:17:48 +01:00
Johan Lorensson 802a5b9284 Update MonoVM diagnostics-tracing doc with new features and scenarios. (#58620) 2021-09-28 17:25:32 +02:00
Krzysztof Wicher d698901a80 update area-owners to account for pod change (#59635) 2021-09-27 07:41:32 -06:00
Jason Pugsley dff742a06b FreeBSD12 version cleanup and process and thread enhancements (#59339)
* Set FreeBSD 12 as minimum version

This is a small clean-up to remove reliance on FreeBSD versions
prior to 12 and more specifically 12.2 which is the lowest currently
supported version of FreeBSD. 11.4 becomes unsupported as of
October 2021. See https://www.freebsd.org/releases/

* Add functionality for FreeBSD process and threads

Added support for naming native threads, the process disambiguation
key and detecting if the process is running under a debugger.

Changed references to thr_self to pthread_getthreadid_np already
used elsewhere - it returns the same value.
2021-09-25 22:37:11 -07:00
Jeff Handley ae11fef933 Add a note about rerunning the license/cla check (#59440) 2021-09-24 17:21:21 -04:00
Dan Moseley 6b11f64ec0 Update area owners to include new owners of S.DS.* (#59357)
@jay98014 @grubioe @BRDPM
2021-09-23 21:36:59 -07:00
Jeremy Koritzinsky a526e77b6d Move clang-format download into dotnet/runtime and add docs for setting up auto-formatting in the repository (#59374) 2021-09-23 14:34:00 -07:00
Aleksey Kliger (λgeek) 7e67f8763d [docs] macOS: add note about Xcode command line tools (#59477) 2021-09-23 14:54:23 -04:00
Stephen Toub 00aa6518a6 Add initial regex source generator (#59186)
* Add RegexGeneratorAttribute

Adds the new RegexGenerator attribute that's a signal to the regex
generator to generate code for the specified regex.

* Implement RegexGenerator

Add a source generator for generating C# code for Regex.  This is
primarily a port of RegexCompiler.cs, generating C# code instead of
MSIL.

* Add generator test project

Adds tests dedicated to the mechanics of the source generator, e.g. that
appropriate diagnostics are issued for improper use of RegexGenerator.

* Integrate source generator into many regex tests

Start integrating the source generator into the regex test suite, so
that many existing tests also validate the generated code.

* Address PR feedback

* Improve cachability of source generator

Changing the generator to not collect all regexes together means we don't need to reprocess/regenerate all regexes every time any one of them is changed.

* Use closest matching ctor from GetRegexAsync

To better test the appropriate ctor usage.

* Improve a few of the polyfills

* Address PR feedback

* Fully qualify types and remove unnecessary $s

Also fixed one place where the IL we were generating wasn't as good as the reflection emit code.

* Suppress a couple more warnings

* Fix stray !

* Fix TODO about unrolling multi comparisons

Also clean up generated code in a few places to make it more readable / concise.

* Update resources per PR feedback

* Add more tests, clean up parser code, and allow instance/interface methods

* Fix test suppression on mobile
2021-09-22 13:52:02 -04:00
Andrew Au 0ac7a35873 Update Unloadability documentation (#59383) 2021-09-21 11:33:23 -07:00
Aleksey Kliger (λgeek) 89cea2e659 [docs] Add instructions for debugging native runtime code on Android (#59183) 2021-09-17 09:01:13 -04:00
Andrii Kurdiumov 16a0ab39f1 Fix link (#59200) 2021-09-16 16:54:55 -06:00
Dan Moseley 7681b951da Update area-owners.md (#59131) 2021-09-16 08:29:44 +02:00
Eirik Tsarpalis e500c800ef Fix broken API proposal template link (#59083) 2021-09-14 07:40:21 -07:00
Juan Hoyos 561f89a905 Enhance CrossGen2 to emit PerfMap debug directory entry (#58552)
* Only pass perfmap argument for Linux
* Enhance CrossGen2 to emit PerfMap debug directory entry

This is used to correlate PE's with their corresponding PerfMaps. For example the header in the perfmap could be:
```
FFFFFFFF 00 026D4D21B3EE3D93843FF7A964235822
FFFFFFFE 00 1
FFFFFFFD 00 1
FFFFFFFC 00 3
FFFFFFFB 00 1
```
And the PE will have the corresponding entries in the PE as:
```
PerfMap (Type 21):
        System.Private.CoreLib.ni.r2rmap, Signature = 026d4d21b3ee3d93843ff7a964235822, Version = 1
```

* Emit headers for debug directory entries from the nodes themselves.
* Add PerfMap Debug Directory Entry spec
* Extend perfmap and r2r documentation
2021-09-10 13:19:34 -07:00
Viktor Hofer 331823f404 Simplify .NETFramework tfms (#58558)
* Simplfy .NETFramework tfms

Libraries which target .NET Framework usually have rid agnostic tfms,
i.e. net461. If the library targets netstandard2.0-windows as well,
the .NET Framework tfm must be rid specific, as rid specific
.NET Framework apps would otherwise pick the .NETStandard asset over
the .NETFramework one (based on the RID compatibility rules)

There is yet another reason that requires .NETFramework tfms to be RID
specific, which is when a project P2Ps other projects which are
rid-specific. Without the RID specific .NETFramework tfm, a compatible
.NETStandard asset would be picked instead.

NuGet doesn't support setting a TargetPlatform in the TargetFramework
alias when targeting .NETFramework or .NETStandard. Any such tfms in
dotnet/runtime are currently leveraging a hack that strips the
TargetPlatform / TargetFrameworkSuffix away during restore and packaging
(as NuGet Pack uses the project.assets.json file).

As NuGet will likely never support RID specific .NETFramework tfm
aliases, the distinction between a RID specific and a RID agnostic
.NETFramework tfm is unnecessary.

Remove all "TargetFrameworkSuffixes" / TargetPlatforms / RIDs
(whatever you would like to call them) from .NETFramework tfms and let
the packaging targets handle the cases where a RID specific asset is
required in the package.

Explictly don't set TargetsWindows to true for .NETFramework builds as
the Targets* properties are infered from the platform / suffix and
many projects make the assumption that net461
(without the "-windows" part) doesn't set TargetsWindows=true.

Fixes https://github.com/dotnet/runtime/issues/58495

* Warn on .NETFramework duplicate runtime assets

* Ignore .NEtFramework non Windows and non empty RIDs

Also cleaning up the packaging.targets file and removing
the ExcludeFromPackage option which isn't needed anymore as
target frameworks aren't excluded from packages produced in
dotnet/runtime anymore.
2021-09-10 09:50:11 +02:00
Viktor Hofer 67354a2fb4 Upgrade to net7.0 and remove target frameworks (#58011)
* Remove EOL tfms and upgrade to net7.0

* Make linker tests net7 aware

Make installer tests run on net7.0

Don't attempt to use live apphost

Fix payloads

Regenerate test files

Fix package testing
2021-09-08 22:04:23 +02:00
Jeremy KoritzinskyandAaron Robinson f3c705ef29 Implement support for passing a .env file to corerun to easily set environment variables for stress testing. (#58222)
* Implement support for passing a .env file to corerun to easily set environment variables for stress testing.

* Load the parsed dotenv into the process.

* Implement support for # comments

* Clean up code

* Avoid copy

* PR feedback

* Update docs and bash/batch scripts to support the dotenv files.

* Use what clang recommends to not copy

* Apply suggestions from code review

Co-authored-by: Aaron Robinson <[email protected]>

Co-authored-by: Aaron Robinson <[email protected]>
2021-09-03 02:18:59 +00:00
Aaron Robinson 70f4c48013 Initial document for JIT and GC stress usage (#58147)
* Initial document for JIT and GC stress.
2021-09-01 11:07:45 -07:00
WhiteBlackGoose e7765d9c13 Typo fixed (#58393) 2021-08-30 13:26:23 -06:00
Aleksey Kliger (λgeek) d033e1a902 Don't build ReferenceSystemPrivateCoreLib tests with Mono (#58232)
New tests that extend the System.Private.CoreLib API should add to the ref assemblies in src/libraries and the tests themselves should be library tests.

Updated the workflow doc: the Clr.Native subset is all that is need if we're interested in testing Mono.

Contributes to https://github.com/dotnet/runtime/issues/58266

* [tests] Use RuntimeFlavor to build ReferenceSystemPrivateCoreLib tests

   When building tests that reference System.Private.CoreLib, use the one from the specified RuntimeFlavor (or fall back to coreclr if it's unset - although src/tests/build.sh sets it always)

* Update docs: We only need to build the Clr.Native subset if we're interested in testing Mono.

* flavor the pipelines to build the runtime-specific System.Private.CoreLib for the runtime tests.

* Don't build ReferenceSystemPrivateCoreLib tests with Mono

   We should avoid adding new ReferenceSystemPrivateCoreLib tests
2021-08-30 12:11:42 -04:00
Jimmy Cushnie e3741896f4 Fix small typo in api-review-process.md (#57625) 2021-08-18 09:39:04 +02:00
Mike McLaughlin f81e82df0c Fix crashreport for stack overflow (#57428)
* Fix crashreport for stack overflow

Issue: https://github.com/dotnet/runtime/issues/57032

The stack overflow managed exception wasn't been set/written out.

Changed the "unmanaged_frames" value to "stack_frames" because it includes both native and managed frames.

Aggregated the repeated stack frames adding a "repeated"/repeated_frames value/array for the time of times the sequence was repeated.

Looks like this:

    {
      "repeated" : "0x1542",
      "repeated_frames" : [
       {
        "is_managed" : "true",
        "module_address" : "0x10e402000",
        "stack_pointer" : "0x7000045ce020",
        "native_address" : "0x11b9ee8c9",
        "native_offset" : "0x29",
        "token" : "0x600006f",
        "il_offset" : "0x0",
        "method_name" : "Macson.Client.Diagnostics.CrashyClass.Foo2()",
        "timestamp" : "0xa8561820",
        "sizeofimage" : "0xe000",
        "filename" : "Macson.Client.dll",
        "guid" : "49cd869a682942bc95c0c34ca206c61d"
       },
       {
        "is_managed" : "true",
        "module_address" : "0x10e402000",
        "stack_pointer" : "0x7000045ce040",
        "native_address" : "0x11b9ee879",
        "native_offset" : "0x29",
        "token" : "0x6000070",
        "il_offset" : "0x0",
        "method_name" : "Macson.Client.Diagnostics.CrashyClass.Foo1()",
        ...
       },
      ]
    }

* Update createdump doc

* Fix Windows triage dump flags

* Code review feedback
2021-08-17 13:02:14 -07:00
Vitek Karas 0042240dd8 Add zip tool to the install list for Android tests (#57569)
On default WSL Ubuntu `zip` is not installed, and trying to build Android tests fails with rather cryptic errors.
2021-08-17 08:00:48 -07:00
Viktor Hofer 6c47cf8a2f Rename transport packages to follow convention (#57504)
* Rename transport packages to follow convention

As agreed on in https://github.com/dotnet/windowsdesktop/pull/1936, we
want to follow a common schema when naming our transport packages.

Also updating the docs to reflect the name changes and to also
accomodate for the WindowsDesktop transport package.

* Update src.proj

* Update src.proj
2021-08-16 22:18:08 +02:00
Kevin Jones 35cf750ea5 Obsolete some System.Security.Cryptography.Pkcs APIs
These members have never worked in .NET/.NET Core
2021-08-12 15:13:48 -07:00
Viktor Hofer 21e340dcaf P2P instead of binplacing aspnetcore transport pkg (#57239)
Use ProjectReferences to compose the aspnetcore tranport package.
Avoid binplacing and with that unnecessary copies which overall
simplifies the infrastructure and allows to add additional transport
packages without creating a binplace configuration for each.

This also makes sure that the dependencies are compatible with the
package's tfm.
2021-08-12 20:37:23 +02:00
Anirudh AgnihotryandViktor Hofer 4684a1dbab Automatic calculate the assembly and package version in servicing (#57158)
* automatically update the assembly version

* address feedback

* move IsAspNetCoreApp to packaging.targets

* make assemblyintef pack private, update header and instructions on building the package in servicing

* fixes the allconfig leg

* update the docs

* Update docs/project/library-servicing.md

Co-authored-by: Viktor Hofer <[email protected]>

Co-authored-by: Viktor Hofer <[email protected]>
2021-08-12 10:29:20 -07:00
Tomáš Rylek 3b40c7cfc4 Add support for building just a subset of runtime tests (#57142)
This change adds four new options to the runtime test build command:

1) test <test project path relative to src\tests> - build just that
one test.

2) dir <directory relative to src\tests> - build all tests in the
directory.

3) tree <directory relative to src\tests> - build all tests in the
given subtree.

4) all - use clean rebuild (i.e. don't apply incrementalism)
when building the tests.

Thanks

Tomas
2021-08-12 15:54:17 +02:00
Adam SitnikandSingleAccretion 2ce426a7b3 update Windows ARM build requirements (#57275)
* update Windows ARM build requirements

* Apply suggestions from code review

Co-authored-by: SingleAccretion <[email protected]>
2021-08-12 13:19:48 +02:00
Kevin JonesandJeff Handley c5faf00fd5 Obsolete Rfc2898DeriveBytes.CryptDeriveKey (#57002)
* Obsolete Rfc2898DeriveBytes.CryptDeriveKey

* Apply suggestions from code review

Co-authored-by: Jeff Handley <[email protected]>

Co-authored-by: Jeff Handley <[email protected]>
2021-08-11 21:35:05 -06:00
Fan YangandJuan Hoyos e0ba450d7f [Mono] Update instructions for running runtime tests on Android (#57166)
* Update instructions for running runtime tests on Android

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Juan Hoyos <[email protected]>

Co-authored-by: Juan Hoyos <[email protected]>
2021-08-11 12:13:29 -04:00
Viktor Hofer 22cee85aa0 Clean-up pkgproj leftovers in libs and apply fixes (#56899)
* Clean-up pkgproj leftovers in libs and apply fixes

Remove any pkgproj infrastructure that was only used by src/libraries
(which is the majority). Delete the packageindex *YAY*.
Update the documentation that covered the packageindex and the pkgprojs.

Avoid any incremental builds during packaging by removing
libraries-packages.proj and use src.proj for packaging instead. Make use
of the `GeneratePackageOnBuild` property to build package during the
allconfigurations without requiring a different entry target.

Fix the addition of the DocumentationFile during packaging when
`GeneratePackageOnBuid` is used by hooking onto the
`DocumentationProjectOutputGroup` that NuGet uses and replacing the
generated documentation file with the one that comes via the
intellisense package.
Also introduce a property to choose the generated documentation file
over the one from the intellisense package:
<UseIntellisenseDocumentationFile>false</UseIntellisenseDocumentationFile>

Removing a few leftover PackageDescription properties from the projects'
Directory.Build.props file.

Cleaning up properties in Directory.Build.props & Directory.Build.targets
files.

* Actually run packaging during the allconfigurations build

* Update docs

* make runtime specific pkgs non packable

* io.ports native pkg fixes
2021-08-06 12:01:36 +02:00
Jeff Handley 895c99cc50 Remove old fwlink from Obsolete messages and make message improvements (#56690)
* 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
2021-08-04 14:58:10 -04:00
Sergey AndreenkoandJan Kotas 13a2b6dedf Ecma edit for conv.ovf.<to type>.un. (#56450)
* Add a conv conformance test.

* Fix Ecma description.

* Fix the test.

* Update docs/design/specs/Ecma-335-Augments.md

Co-authored-by: Jan Kotas <[email protected]>

* Disable VN optimizations on arm64 because of the bug.

* add a new chapter.

* fix space

* Fix format.

* exclude the test on mono

Co-authored-by: Jan Kotas <[email protected]>
2021-08-03 17:04:17 -07:00
Jeff Handley 4fa710e22f Mark HandleProcessCorruptedStateExceptionsAttribute as obsolete (#56664) 2021-08-03 19:28:42 -04:00
Chris Ross b8a9eabb16 Update windows-requirements.md (#56476) 2021-08-03 08:48:59 -06:00
iinuwa f0d1a8b390 Fix indentation on Interop directory tree example (#56718) 2021-08-02 13:17:23 -04:00
Jeremy Koritzinsky 3dc99e900b Build C++/CLI tests as .NET Core C++/CLI (#56502)
* Build IJW assemblies against LKG SDK ref pack.

* Allow building against the live ref assemblies by passing `-cmakeargs -DCPP_CLI_LIVE_REF_ASSEMBLIES=1` to the test build script.

* Add test instructions

* Error handling

* Add support for the stdcall-mangled _CorDllMain entrypoint on x86 since MSVC uses it if it exists.

* Write out ref-pack path.
2021-08-02 16:53:48 +00:00
Eric Erhardt 65f04b9f29 Resolve MakeGenericType ILLink warning in DependencyInjection (#55102)
* Resolve MakeGenericType ILLink warning in DependencyInjection

Resolve the ILLink warning in DependencyInjection by adding a runtime check that is behind a new AppContext switch 'Microsoft.Extensions.DependencyInjection.VerifyOpenGenericServiceTrimmability'. The runtime check ensures the trimming annotations on the open generic types are compatible between the service and implementation types. The check is enabled by default when PublishTrimmed=true.

* Make VerifyOpenGenericServiceTrimmability a full feature switch
2021-07-31 08:46:27 -06:00
CW2andJuan Hoyos 0f04d34ac4 Added Visual Studio build tools (#55629) (#56234)
* Added Visual Studio build tools (#55629)

Added description of build tools (CMake, Ninja and Python) installation as Visual Studio Individual Components.
Added emphasis (bold) of Visual Studio installer sections and components (replaces previously used different styles of quotes).

* Removed Python 32-bit VS component

Python 64-bit component is enough for building x86 and x64 target architectures.

Co-authored-by: Juan Hoyos <[email protected]>
2021-07-30 22:54:03 -07:00
Eric Erhardt 577d079a72 Move ILLink.LinkAttributes to shared and support NullabilityInfoContext with trimming nullability attributes (#56475)
* Copy ILLink.LinkAttributes from mono to shared.

* Update ILLink.LinkAttributes that are now shared between mono and coreclr

- Move IntrinsicAttribute to mono only
- Introduce feature switches for NullabilityInfoContext and AggressiveAttributeTrimming
- Minor other cleanup

* Respect the NullabilityInfoContext.IsSupported feature switch in NullabilityInfoContext.

* Document new feature switches

* Add trimming tests for NullabilityInfoContextSupport

* Move NonVersionableAttribute to mono-only

* Fix Linq tests now that the ExtensionAttribute isn't being trimmed all the time on mono WASM
2021-07-30 14:07:01 -05:00
Manish Godse 178a660b58 Change area ownership for R2R (#56557)
* update owners

* Fix whitespace
2021-07-29 09:53:06 -07:00
David Wrighton 5d4d913182 Covariant return updates to ecma augments (#56496)
* Covariant return updates to ecma augments
2021-07-28 17:43:46 -07:00
Dan Moseley 5d03d42eef Update area-owners.md (#56481)
* Update area-owners.md

added area-codeflow so that maestro PR's don't make noise by tagging the infrastructure areas.

* Update area-owners.md
2021-07-28 13:55:10 -06:00
Kunal Pathak b2264cb9cd Lsra heuristic tuning experiment report (#56103)
* lsra tuning experiments

* remove the trailing space

* Review comment
2021-07-21 16:34:07 -07:00