Commit Graph
1098 Commits
Author SHA1 Message Date
Jo Shields b5f9c224e7 Linux-bionic (Android libc w/o Android interop) initial implementation (#66147)
Implement support for "Linux Bionic", a RID which builds a Linux runtime against an Android libc but without Android OS functions like JNI, Dalvik, Instrumentation, etc. This configuration has been requested by a team working on an IoT scenario.

* The new RID is linux-bionic-arm64/linux-bionic-x64.
* The build reuses the existing Android build dockerfiles and Helix queues
* Since we don't have JNI, we don't have Android Crypto - instead, use an Android build of OpenSSL. As an errata, it is incumbent upon the end user to supply this in their OS environment (we download one ad-hoc for testing purposes, which was compiled by Google)
* Some tests cannot be completed due to SELinux policies affecting the shell user executing tests via adb shell in the world-writable /data/local/tmp directory. We expect those tests would pass if they pass on Android, in a real-world IoT scenario with a custom OS (rather than recycling Google's OS images intended for phones)

Closes: #66027
2022-05-19 15:27:40 -04:00
Steve Pfister 45887d186c Detect the default locale name during startup on Apple platforms (#68706)
This change adds a function to lookup the current NSLocale and extract the language + country code to load into ICU by default. Previously, we would defer to uloc_getDefault in ICU, which would return a value we would ignore (en_US_POSIX) and result in falling back to invariant mode.

Fixes #68321
2022-05-05 17:13:36 -04:00
Viktor Hofer 24cabc6eb0 Update solution files to include missing deps (#68668) 2022-05-02 20:14:05 +02:00
Eric Erhardt 18be907176 Change Nullable to default to enable in libraries src and ref projects (#68102)
* Change the default Nullable to enabled for src projects

* Set Nullable=enable as the default for ref projects

* Fixup merge conflicts

* Disable nullable on shim projects and EventLog.Messages

* Set Nullable to blank on EventLog.Messages

This way no CodeAnalysis attributes are emitted into the assembly.
2022-04-25 11:15:37 -05:00
de73d82050 [main] Update dependencies from dotnet/linker (#67701)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: vitek-karas <[email protected]>
Co-authored-by: Marek Safar <[email protected]>
2022-04-22 09:32:09 +02:00
Tarek Mahmoud Sayed 490c166d30 Fix IsPrefix and IsSuffix with ignored characters (#67370) 2022-04-01 09:26:33 -07:00
Jose Perez Rodriguez 458524aa75 Updating Unicode files to use 14.0.0 (#66362) 2022-03-10 14:28:35 -08:00
Jan Kotas 17662fc30c Replace TargetFrameworks with TargetFramework where possible (#66198) 2022-03-04 22:21:59 -08:00
Elinor Fung a0635832f1 Rename DllImportGenerator project to LibraryImportGenerator (#66029) 2022-03-03 22:17:23 -08:00
Viktor Hofer 7671b5084a Use TargetFramework singular for tests
Use TargetFramework instead of TargetFrameworks property whenever a
test project targets a single target framework only.
This avoid unnecessary outer builds and evaluations and makes the build
faster.
2022-02-24 12:32:04 +01:00
Viktor Hofer febaf76743 Fix slngen.proj and update solution files (#65711)
* Fix slngen.proj

The SolutionName property is defined by the SDK and hence the condition was always true. Also the star (*) didn't expand when using the ValurOrDefault msbuild function. Fixing this by using a different name `SolutionNameOverride` and avoiding the ValueOrDefault msbuild function.

* Update solution files

Updating the solution files as those changed because of
microsoft/slngen@cb57e28 and apparently the solution files never were
updated.
2022-02-22 17:18:54 +01:00
WraithandVlad Brezae ddb22ef2ac Remove S.R.CS.Unsafe and Intrinsify Unsafe (#64861)
* private assemblies moved from Internal to System Runtime.CompilerServices

* reformat existing unsafe vm intrinsics

* implement Copy, CopyBlock, CopyBlockUnaligned, InitBlock, InitBlockUnaligned, Unbox, Add, Subtract, SubtractByteOffset

* remove System.Runtime.CompilerServices.Unsafe il project and replace with forward only cs project

* change all ilproj references to csproj

* remove nativeaot Unsafe

* add conditional package reference for S.R.CS.Unsafe on netcoreapp 6.0

* regenerate solutions

* mono interp

* [mono][interp] Implement Copy and Unbox intrinsics

* [mono][jit] Implement Copy and Unbox intrinsics

Co-authored-by: Vlad Brezae <[email protected]>
2022-02-19 21:50:14 -08:00
Viktor Hofer 20e8f905d0 Don't use Targets* helper properties in libs (#64500)
* Don't use Targets* helper properties in libs projs

This change makes it possible to migrate 200+ (ref+src) projects to use
TargetFramework instead of TargetFrameworks which avoids the additional
outer build evaluation and invocation which ultimately makes the overall
build faster.

Targets* properties (i.e. TargetsWindows, TargetsAnyOS, TargetsUnix,
etc.) rely on the TargetFramework property which usually are set
inside a project. The TargetFramework property is only
available before a project specifies it if it's explicitly set in a props
file or if the project is cross-targeting and the outer-build dispatches
into the inner-build. During the dispatch, the TargetFramework property
is passed in as a global property.

Until now that behavior wasn't a problem because every libraries project
cross-targeted (by setting the TargetFrameworks property) even though
many only include a single TargetFramework (i.e. NetCoreAppCurrent).

To allow projects to use the TargetFramework property instead of
TargetFrameworks, the Targets* helper properties can't be calculated
anymore early in a props file as the TargetFramework property isn't set
at that time.

In general, the guidance by the SDK/msbuild team is to not read from the
TargetFramework property before the project sets it
(in a property group). That effectively means that the TargetFramework
property shouldn't be used in props files at all.

Therefore these helper properties can't be used anymore for property
conditions and I'm replacing their usage with TargetPlatformIdentifier
comparisons for both properties and items.
In nearly all cases, the Targets* helper properties can be replaced with
TargetPlatformIdentifier checks on items and in the few cases where
TargetsUnix or TargetsLinux marks multiple tfms as compatible, the exact
tfms must be used instead for the TargetPlatformIdentifier comparison.

Whenever a project needs to condition properties on the platform, I'm
first setting the TargetPlatformIdentifier the same way the SDK sets it
so that the SDK later doesn't need to set it again to avoid the
additional expensive msbuild function call.

* Use TargetFramework singular to avoid outer builds

Use TargetFramework instead of TargetFrameworks property whenever a
projects only targets a single target framework. This avoid unnecessary
outer builds and evaluations and makes the build faster.
2022-02-12 13:07:16 +01:00
Tarek Mahmoud SayedandSantiago Fernandez Madero 1f47f0ec41 Fix RegionInfo creation when using LOCALE_CUSTOM_UNSPECIFIED LCID (#64927)
Co-authored-by: Santiago Fernandez Madero <[email protected]>
2022-02-10 08:36:08 -08:00
Stephen Toub 3ae87395f6 Initial roll out of !! (#64720)
* Bump version of C# compiler

This should be reverted when arcade brings in a new enough compiler.

* Fix a few new warnings from updating compiler

* Enable IDE0190 to employ parameter null checking

* Initial roll out of !!

* Fix more compiler warnings from upgrade, plus some test fixes / reverts

* Fix a few more tests

* Disable profiling test
2022-02-08 16:06:59 -05:00
Sven Boemer 26c7d7d7b1 Move one more 20H2 queue to server 2022 (#64919)
* Move one more 20H2 queue to server 2022

Fix one more instance not covered by https://github.com/dotnet/runtime/pull/64827.
This should fix the same failure in runtime-extra-platforms.

* Update IsIcuCompatiblePlatform
2022-02-07 13:13:26 -08:00
Viktor Hofer 64f3bae738 Consume renamed TargetFramework package (#64670)
* Consume renamed TargetFramework package

* Rename CoreLibs generator parent dir

Projects under src/libraries/ which are located under a "gen" directory
are automatically treated as source generator projects. Because the
CoreLib generator was placed under a different directory "generators",
it was treated as a RuntimeAssembly which gets binplaced into the
runtime path. The runtime tests then take the assemblies from there and
copy them into their CORE_ROOT directory.

Renaming the CoreLib source generators parent directory fixes that so
that it is treated as source generator and it brings consistency into
src/libraries.
2022-02-03 15:32:50 +01:00
Tarek Mahmoud Sayed b7d8f5ecfa Fix Failing Globalization Test on OSX (#63971) 2022-01-18 18:39:37 -08:00
Tarek Mahmoud Sayedandkasperk81 e210a60c78 Fix Creating Cultures with Sort Names (#63386)
Co-authored-by: kasperk81 <[email protected]>
2022-01-07 10:36:11 -08:00
Tarek Mahmoud Sayed 7a8ed77abc Fix some typo in test (#62257) 2021-12-01 23:07:36 -05:00
Tarek Mahmoud Sayed 5a3070cb57 Fix calling NLS with Cultures has alternative sort names (#61992) 2021-11-24 10:35:38 -08:00
Viktor Hofer 0964be0ae9 Update slngen and solution files (#60871)
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
2021-10-26 21:23:54 +02:00
Viktor Hofer 36b6247cc7 Update solution files for correct ordering of elements (#58655)
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.
2021-09-04 00:16:15 +02:00
Tarek Mahmoud Sayed 1313a689fd Fix Culture creation regression when using invalid names on Windows (#57754) 2021-08-20 09:28:21 -07:00
Tarek Mahmoud Sayed 91c1250176 Fix the string search behavior when using ICU (#57078) 2021-08-17 13:41:34 -07:00
Tarek Mahmoud Sayed 99d1bf8e59 Fix String.LastIndexOf with string has zero sort weights characters (#56504)
* Fix String.LastIndexOf with string has zero sort weights characters
2021-07-30 18:06:08 -07:00
Tarek Mahmoud Sayed cd1b4cff81 Fix fr-CA culture time formatting and parsing (#56443) 2021-07-28 13:02:39 -07:00
Viktor Hofer a6b9a63f35 Update libraries solution and NuGet.config files (#56430)
* Update slngen and invocation

* Update NuGet.config files

* Update solution files with slngen
2021-07-28 18:44:17 +02:00
Tarek Mahmoud Sayed 141bd34eaf Fix Neutral Culture Names (#56321)
* Fix Neutral Culture Names
2021-07-28 09:23:51 -07:00
Tarek Mahmoud Sayed 6192f0c451 Fix Invariant Test Configuration (#56340) 2021-07-27 09:07:43 -04:00
Steve Pfister 4e47e8cfa2 Reenable some Android Globalization tests (#56147)
Android ICU seems to have slight behavioral differences with Turkish and Slovak cultures. This change skips the data items that do have difficulty.

Additionally, there are a few other tests that were failing because the test data should have been the same as what we use on desktop. Adjusted accordingly.

Fixes #36672
2021-07-23 10:04:06 -04:00
Tarek Mahmoud Sayed 1d065b6b70 Fix string comparison with ordinal casing with Surrogates (#55771)
* Fix string comparison with ordinal casing with Surrogates

* Address the feedback
2021-07-16 09:26:44 -07:00
c7dedccd96 Use more string interpolation (#55738)
* 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]>
2021-07-16 06:38:51 -04:00
Tarek Mahmoud Sayed 62fa1f838e Fix Unicode BiDi Category (#55790) 2021-07-15 21:01:18 -07:00
Tarek Mahmoud Sayed 1b14c945a9 Support Invariant Mode Case Mapping (#55520)
* Support InvariantMode Case Mapping
2021-07-14 23:05:03 -07:00
Stephen Toub dfd618dc64 Use interpolated strings in more places 2021-07-13 10:11:51 -04:00
naminodarie 971d204a54 Avoid conflicts between default [semi-]voiced sound mark rules and custom rules (#55116) 2021-07-06 12:58:00 -07:00
Tarek Mahmoud SayedandEric Erhardt 04dac7b0fe Allow restricting cultures creation with any arbitrary names in Globalization Invariant Mode (#54247)
Co-authored-by: Eric Erhardt <[email protected]>
2021-07-01 11:55:05 -07:00
Tarek Mahmoud Sayed c3fc26389b Fix Culture Native and Display Names (#53468)
* Fix Culture Native and Display Names

* fix mono break

* Address the feedback

* Address more feedback

* Use ThreadCultureChange in the tests

* Exclude the test on  mobile platfoms
2021-06-02 17:33:01 -07:00
Mitchell HwangandMitchell Hwang 913fdbe2f4 [Android][libraries] Skip failing Android tests with ActiveIssues and proj level skips (#50800)
* [Android][libraries] Update test suites skipped

* [Android][libraries] Add System.Globalization.Tests ActiveIssues 36672

* [Android][libraries] Add System.IO.Compression.Tests ActiveIssues 36845

* [Android][libraries] Add System.Text.RegularExpressions ActiveIssues 36848

* [Android][libraries] Add System.Diagnostics.DiagnosticSource.Switches.Tests ActiveIssues 37073

* [Android][libraries] Add System.Net.Requests.Tests ActiveIssues 37087

* [Android][libraries] Add System.Runtime.Tests test proj skip 37088

* [Android][libraries] Add System.Runtime.Numerics.Tests ActiveIssues 37093

* [Android][libraries] Add System.Security.Cryptography.Pkcs.Tests test proj skip 37094

* [Android][libraries] Add System.Console.Tests Active Issues 37465

* [Android][libraries] Consolidate System.Runtime.Extensions.Tests ActiveIssues into 49868

* [Android][libraries] Add System.Threading.Tasks.Parallel.Tests ActiveIssue 50566

* [Android][libraries] Add System.Net.NetworkInformation.Functional.Tests ActiveIssues 50567

* [Android][libraries] Add System.Net.Sockets.Tests ActiveIssues 50568

* [Android][libraries] Add System.Diagnostics.Debug.Tests ActiveIssues 50570

* [Android][libraries] Add Microsoft.VisualBasic.Core.Tests ActiveIssues 50572

* [Android][libraries] Add System.Text.Encoding.Tests ActiveIssues 50573

* [Android][libraries] Add System.Net.Ping.Functional.Tests ActiveIssues 50574

* [Android][libraries] Add Microsoft.Extensions.Logging.Console.Tests ActiveIssues 50575

* [Android][libraries] Add System.Collections.Concurrent.Tests ActiveIssues 50576

* [Android][libraries] Add System.Threading.Thread.Tests ActiveIssues 50577

* [Android][libraries] Rename System.Collections.Immutable.Tests ActiveIssues 50579

* [Android][libraries] Rename System.Security.Cryptography.Csp.Tests ActiveIssues 50580

* [Android][libraries] Remove test level skips that are now test specific skips

* [Android][libraries] Remove closed ActiveIssues

* [Android][libraries] Add more crashing test suites to be skipped

* [Android][libraries] Add Microsoft.Extensions.Configuration.Functional.Tests ActiveIssue 50866

* [Android][libraries] Add Microsoft.Extensions.Configuration.Ini.Tests ActiveIssue 50867

* [Android][libraries] Add Microsoft.Extensions.Configuration.Json.Tests ActiveIssue 50868

* [Android][libraries] Add Microsoft.Extensions.Configuration.Xml.Tests ActiveIssue 50870

* [Android][libraries] Add Microsoft.Extensions.DependencyInjection.Tests test proj skip

* [Android][libraries] Add Microsoft.Extensions.DependencyModel.Tests ActiveIssue 50872

* [Android][libraries] Add Microsoft.Extensions.Http.Tests ActiveIssue 50873

* [Android][libraries] Add Microsoft.Extensions.Logging.EventSource.Tests test proj skip

* [Android][libraries] Add Microsoft.Extensions.Logging.Tests ActiveIssues 50875

* [Android][libraries] Add Microsoft.Extensions.Options.Tests ActiveIssues 50877

* [Android][libraries] Add Microsoft.Extensions.Primitives.Tests ActiveIssues 50878

* [Android][libraries] Add System.CodeDom.Tests ActiveIssues 50879

* [Android][libraries] Add System.Collections.Immutable.Tests ActiveIssues 50579

* [Android][libraries] Add System.Collections.NonGeneric.Tests ActiveIssues 37069

* [Android][libraries] Add System.Collections.Tests test proj skip

* [Android][libraries] Add System.ComponentModel.Primitives.Tests ActiveIssues 50881

* [Android][libraries] Add System.ComponentModel.Annotations.Tests ActiveIssues 50882

* [Android][libraries] Add System.ComponentModel.TypeConverter.Tests test proj skip

* [Android][libraries] Add System.Composition.Hosting.Tests ActiveIssues 50917

* [Android][libraries] Add System.Composition.Runtime.Tests ActiveIssues 50918

* [Android][libraries] Add System.Composition.Tests ActiveIssues 50919

* [Android][libraries] Add System.Data.Common.Tests test proj skip

* [Android][libraries] Add System.Diagnostics.DiagnosticSource.Tests ActiveIssue 50924

* [Android][libraries] Add System.Diganostics.TextWriterTraceListener.Tests ActiveIssue 50925

* [Android][libraries] Add System.Diagnostics.Tracing.Tests test proj skip

* [Android][libraries] Add System.IO.Pipelines.Tests ActiveIssue 50927

* [Android][libraries] Add System.Linq.Expressions.Tests ActiveIssue 37474

* [Android][libraries] Add System.Net.NameResolution.Functional.Tests ActiveIssue 50928

* [Android][libraries] Add System.Net.Primitives.Functional.Tests ActiveIssue 50571

* [Android][libraries] Add System.Net.Requests.Tests ActiveIssue 37087

* [Android][libraries] Add System.ObjectModel.Tests ActiveIssue 50933

* [Android][libraries] Add System.Resources.Extensions.Tests ActiveIssue 50934

* [Android][libraries] Add System.Resources.ResourceManager.Tests ActiveIssue 50935

* [Android][libraries] Add System.Runtime.Serialization.Primitives.Tests ActiveIssue 50936

* [Android][libraries] Add System.Security.Cryptography.X509Certificates.Tests ActiveIssue 50937

* [Android][libraries] Add System.Text.Json.Tests test proj skip

* [Android][libraries] Add System.Text.RegularExpressions.Tests ActiveIssues 50942

* [Android][libraries] Add System.Threading.Channels.Tests ActiveIssues 50943

* [Android][libraries] Add System.Xml.Linq.xNodeBuilder.Tests ActiveIssues 50944

* [Android][libraries] Add System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests test proj skip

* [Android][libraries] Add System.Xml.XmlSchemaSet.Tests test proj skip

* [Android][libraries] Add System.Xml.Xsl.XslCompiledTransformApi.Tests test proj skip

* [Android][libraries] Add System.Xml.Xsl.XslTransformApi.Tests test proj skip

* [Android][libraries] Add System.Net.Sockets ActiveIssue EventSource 50568

* [Android][libraries] Add System.Net.Mail.Functional.Tests ActiveIssue  50999

* [Android][libraries] Clean up Android test architecture specific skips

* [Android][libraries] Add more test suite skips

* [Android][libraries] Skip test suites failing with PlatformNotSupportedException related failures

* [Android][libraries] Add more suites that have execution compromised

* [Android] Add new Microsoft.Extensions.Configuration.FileExtensions.Tests active issue

* [Android] Add new Microsoft.Extensions.Configuration.Ini.Tests active issue

* [Android] Add new Microsoft.Extensions.Configuration.Json.Tests active issue

* [Android] Add new Microsoft.Extensions.Configuration.Xml.Tests active issue

* [Android] Add new Microsoft.Extensions.Http.Tests active issue

* [Android] Fix System.Text.Json.Tests project path skip

Co-authored-by: Mitchell Hwang <[email protected]>
2021-05-10 11:16:38 -04:00
Tammy QiuandLarry Ewing 128c757a3a [wasm] Throw exception if culture data does not exist in icu (#47301)
* Add check for culture data in ICU
Add PredefinedOnly GlobalizationMode
Modified tests if Culture Data not found
* Add test for predefined culture env var
* change assembly test data to pl-PL to avoid culturenotfound exception

Co-authored-by: Larry Ewing <[email protected]>
2021-03-10 17:59:22 -05:00
Steve Pfister 7767d461af Enable ICU on iOS (#48606) 2021-03-09 12:17:52 -05:00
Kenneth Pouncey c72b54243a [browser][tests][outerloop] Standup OuterLoop tests on CI (#45949)
* [browser][tests][outerloop] Standup OuterLoop tests on CI

* System.Collections.NonGeneric.Tests passing

* System.Console.Tests passing

* System.Diagnostics.DiagnosticSource.Tests passing

* System.Globalization.Tests passing

- See active issue https://github.com/dotnet/runtime/issues/45951

* System.IO.FileSystem.Tests passing after deactivating test cannot wait on monitors on this runtime.

* System.IO.FileSystem.Tests passing - See active issue: https://github.com/dotnet/runtime/issues/45954

* Remove fat fingered code.

* Threads not supported on Browser

* Browser does not support monitor

* Browser does not support monitor

* Browser does not support wait on monitors

* Browser does not support wait on monitors

* Add ActiveIssue for DataFlow tests TestNullTarget_CompletionNoCaching

* Add ActiveIssue for DataFlow tests

* Add ActiveIssue for DataFlow tests

* Add threading support conditional

* Change all Cannot wait on monitors on this runtime Browser platform checks to

[ConditionalXXXX(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]

As was suggested in comments

* Address review comment for monitors not supported

* Address review comments

* Add threading supported condition.

```
fail: [FAIL] System.Text.Json.Serialization.Tests.EnumConverterTests.VeryLargeAmountOfEnumsToSerialize
[08:10:56] info: System.PlatformNotSupportedException : Cannot wait on monitors on this runtime.
```
2021-01-20 14:45:27 +01:00
Adeel Mujahid 805e288baf Share ICU culture init for unix/win with validation (#46660) 2021-01-08 09:50:00 -08:00
Adeel Mujahid 81d58ab6d0 Handle '/' in locale name in PAL (#46601) 2021-01-05 16:29:56 -08:00
Ben Adams 5ac16c4e53 Further optimize storage of icu locale data (#45643) 2021-01-04 11:28:27 -08:00
Jan Kotas 10381a2cdc Find&Replace coreclr/src -> coreclr (#45761) 2020-12-08 10:40:17 -08:00
Tarek Mahmoud Sayed 62f55e1408 Fix Full Width Chars Casing (#45079) 2020-11-24 13:51:46 -08:00
Tarek Mahmoud Sayed 496bc88f05 Fix ListSeparator with ICU (#44732) 2020-11-18 19:20:17 -08:00
Tarek Mahmoud Sayed 67a0b6969d Fix the culture parent chain for zh-Han[s|t]-* (#44737) 2020-11-17 11:08:18 -08:00