Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dotnet/corefx into OwnedM…
Browse files Browse the repository at this point in the history
…emoryOffset
  • Loading branch information
ahsonkhan committed Jan 11, 2018
2 parents 47679e4 + 65edbe5 commit f0451fc
Show file tree
Hide file tree
Showing 1,139 changed files with 122,795 additions and 17,958 deletions.
2 changes: 1 addition & 1 deletion BuildToolsVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0-prerelease-02304-01
2.1.0-prerelease-02411-03
36 changes: 25 additions & 11 deletions Documentation/architecture/globalization-invariant-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,32 @@ When running on Linux, ICU is used to get the time zone display name. In invaria

## Enabling the invariant mode

Applications can enable the invariant mode by setting the config switch System.Globalization.Invariant to true, in the `runtimeconfig.json` file, as you can see in the following example:

```json
{
"runtimeOptions": {
"configProperties": {
"System.Globalization.Invariant": true
},
Applications can enable the invariant mode by either of the following:

1. in project file:

```xml
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
</ItemGroup>
```

2. in `runtimeconfig.json` file:

```json
{
"runtimeOptions": {
"configProperties": {
"System.Globalization.Invariant": true
}
}
}
}
```

```

3. setting environment variable value `DOTNET_SYSTEM_GLOBALIZATION_INVARIANT` to `true` or `1`.

Note: value set in project file or `runtimeconfig.json` has higher priority than the environment variable.

## APP behavior with and without the invariant config switch

- If the invariant config switch is not set or it is set false
Expand Down
16 changes: 16 additions & 0 deletions Documentation/coding-guidelines/project-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,22 @@ All supported targets with unique windows/unix build for netcoreapp:
<PropertyGroup>
```

### Placeholder build configurations
Placeholder build configurations can be added to the `<BuildConfigurations>` property to indicate the build system that the specific project is inbox in that framework and that build configuration needs to be ignored.

Placeholder build configurations start with _ prefix.

Example:
When we have a project that has a `netstandard` build configuration that means that this project is compatible with any build configuration. So if we do a vertical build for `netfx` this project will be built as part of the vertical because `netfx` is compatible with `netstandard`. This means that in the runtime and testhost binaries the netstandard implementation will be included, and we will test against those assets instead of testing against the framework inbox asset. In order to tell the build system to not include this project as part of the `netfx` vertical we need to add a placeholder configuration:
```
<PropertyGroup>
<BuildConfigurations>
netstandard;
_netfx;
</BuildConfigurations>
</PropertyGroup>
```

## Options for building

A full or individual project build is centered around BuildConfiguration and will be setup in one of the following ways:
Expand Down
11 changes: 10 additions & 1 deletion Documentation/debugging/unix-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@ CoreFX can be debugged on unix using both lldb and visual studio code
## Using lldb and SOS

- Run the test using msbuild at least once with `/t:BuildAndTest`.
- Install version 3.9 of lldb and launch lldb with dotnet as the process and arguments matching the arguments used when running the test through msbuild.
- [Install version 3.9 of lldb](https://github.com/dotnet/coreclr/blob/master/Documentation/building/debugging-instructions.md#debugging-core-dumps-with-lldb) and launch lldb with dotnet as the process and arguments matching the arguments used when running the test through msbuild.
- Load the sos plugin using `plugin load libsosplugin.so`.
- Type `soshelp` to get help. You can now use all sos commands like `bpmd`.

You may need to supply a path to load SOS. It can be found next to libcoreclr.so. For example:
```
(lldb) plugin load libsosplugin.so
error: no such file
(lldb) image list libcoreclr.so
[ 0] ..... /home/dan/dotnet/shared/Microsoft.NETCoreApp/2.0.4/libcoreclr.so
(lldb) plugin load /home/dan/dotnet/shared/Microsoft.NETCoreApp/2.0.4/libcoreclr.so
```

## Debugging core dumps with lldb

It is also possible to debug .NET Core crash dumps using lldb and SOS. In order to do this, you need all of the following:
Expand Down
12 changes: 11 additions & 1 deletion Documentation/project-docs/benchmarking.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ Follow the instructions described here https://github.com/dotnet/corefx/blob/mas
Whenever you want to benchmark an application simultaneously with one or multiple different .NET Core run time framework versions, you want to create a manual BenchmarkDotNet configuration file. Add the desired amount of Jobs and `NetCoreAppSettings` to specify the `targetFrameworkMoniker`, `runtimeFrameworkVersion` and `customDotNetCliPath`:

```csharp
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Environments;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Toolchains.CsProj;
using BenchmarkDotNet.Toolchains.DotNetCli;

public class MainConfig : ManualConfig
{
public MainConfig()
Expand All @@ -83,7 +93,7 @@ public class MainConfig : ManualConfig
targetFrameworkMoniker: "netcoreapp2.1",
runtimeFrameworkVersion: "2.1.0-preview1-25919-02", // <-- Adjust version here
customDotNetCliPath: @"C:\dotnet-nightly\dotnet.exe", // <-- Adjust path here
name: "Core 2.1.0-preview")));
name: "Core 2.1.0-preview"))));

// Job #2 which could be in-process (see Alternative #2)
// ...
Expand Down
12 changes: 6 additions & 6 deletions Documentation/project-docs/dogfooding.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# How to get up and running on .NET Core 2.0
# How to get up and running on .NET Core

This document provides the steps necessary to consume a nightly build of
.NET Core 2.0 runtime and SDK.
.NET Core runtime and SDK.

Please note that these steps are likely to change as we're simplifying
this experience. Make sure to consult this document often.

## Install prerequisites

1. Acquire the latest nightly .NET Core SDK 2.0 by downloading the zip or tarball listed in https://github.com/dotnet/cli/blob/master/README.md#installers-and-binaries (for example, https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.zip ) into a new folder.
1. Acquire the latest nightly .NET Core SDK by downloading the zip or tarball listed in https://github.com/dotnet/cli/blob/master/README.md#installers-and-binaries (for example, https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.zip ) into a new folder.

2. By default, the dotnet CLI will use the globally installed SDK if it matches the major/minor version you request and has a higher revision. To force it to use the locally installed SDK, you must set an environment variable `DOTNET_MULTILEVEL_LOOKUP=0` in your shell. You can use `dotnet --info` to verify what version of the Shared Framework it is using.

Expand Down Expand Up @@ -68,7 +68,7 @@ Rinse and repeat!
## Advanced Scenario - Using a nightly build of Microsoft.NETCore.App

When using the above instructions, your application will run against the same
.NET Core 2.0 runtime that comes with the SDK. That works fine to get up and
.NET Core runtime that comes with the SDK. That works fine to get up and
running quickly. However, there are times when you need to use a nightly build
of Microsoft.NETCore.App which hasn't made its way into the SDK yet. To enable
this, there are two options you can take.
Expand Down Expand Up @@ -110,14 +110,14 @@ make it self-contained
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RuntimeFrameworkVersion>2.1.0-preview1-25825-07</RuntimeFrameworkVersion> <!-- modify build in this line -->
<RuntimeIdentifier>win7-x64</RuntimeIdentifier> <!-- make self-contained -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <!-- make self-contained -->
</PropertyGroup>
```

```
$ dotnet restore
$ dotnet publish
$ bin\Debug\netcoreapp2.1\win7-x64\publish\App.exe
$ bin\Debug\netcoreapp2.1\win-x64\publish\App.exe
```

## More Advanced Scenario - Using your local CoreFx build
Expand Down
4 changes: 2 additions & 2 deletions Documentation/project-docs/issue-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ Areas are tracked by labels area-&#42; (e.g. area-System.Collections). Each area
| [System.Net.Security](https://github.com/dotnet/corefx/labels/area-System.Net.Security) | [@davidsh](https://github.com/davidsh), [@Priya91](https://github.com/Priya91), [@wfurt](https://github.com/wfurt) | |
| [System.Net.Sockets](https://github.com/dotnet/corefx/labels/area-System.Net.Sockets) | [@davidsh](https://github.com/davidsh), [@Priya91](https://github.com/Priya91), [@wfurt](https://github.com/wfurt) | |
| [System.Numerics](https://github.com/dotnet/corefx/labels/area-System.Numerics) | [@eerhardt](https://github.com/eerhardt), [@ViktorHofer](https://github.com/ViktorHofer) | |
| [System.Reflection](https://github.com/dotnet/corefx/labels/area-System.Reflection) | [@dnlharvey](https://github.com/dnlharvey), [@AtsushiKan](https://github.com/AtsushiKan) | |
| [System.Reflection.Emit](https://github.com/dotnet/corefx/labels/area-System.Reflection.Emit) | [@dnlharvey](https://github.com/dnlharvey), [@AtsushiKan](https://github.com/AtsushiKan) | |
| [System.Reflection](https://github.com/dotnet/corefx/labels/area-System.Reflection) | [@AtsushiKan](https://github.com/AtsushiKan) | |
| [System.Reflection.Emit](https://github.com/dotnet/corefx/labels/area-System.Reflection.Emit) | [@AtsushiKan](https://github.com/AtsushiKan) | |
| [System.Reflection.Metadata](https://github.com/dotnet/corefx/labels/area-System.Reflection.Metadata) | [@tmat](https://github.com/tmat), [@nguerrera](https://github.com/nguerrera) | |
| [System.Resources](https://github.com/dotnet/corefx/labels/area-System.Resources) | **[@krwq](https://github.com/krwq)**, [@tarekgh](https://github.com/tarekgh) | |
| [System.Runtime](https://github.com/dotnet/corefx/labels/area-System.Runtime) | **[@joperezr](https://github.com/joperezr)**, [@AlexGhiondea](https://github.com/AlexGhiondea) | Included:<ul><li>System.Runtime.Serialization.Formatters</li><li>System.Runtime.InteropServices.RuntimeInfo</li><li>System.Array</li></ul>Excluded:<ul><li>Path -> System.IO</li><li>StopWatch -> System.Diagnostics</li><li>Uri -> System.Net</li><li>WebUtility -> System.Net</li></ul> |
Expand Down
83 changes: 83 additions & 0 deletions THIRD-PARTY-NOTICES.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,86 @@ descriptions are © 1997-2005 Sean Eron Anderson. The code and descriptions are
distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY and
without even the implied warranty of merchantability or fitness for a particular
purpose.

License notice for Brotli
--------------------------------------

Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

compress_fragment.c:
Copyright (c) 2011, Google Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

decode_fuzzer.c:
Copyright (c) 2015 The Chromium Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."

3 changes: 3 additions & 0 deletions buildpipeline/DotNet-CoreFx-Trusted-Linux-Crossbuild.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@
},
"PB_PackageVersionPropsUrl": {
"value": ""
},
"PB_AssetRootUrl": {
"value": ""
}
},
"demands": [
Expand Down
3 changes: 3 additions & 0 deletions buildpipeline/DotNet-CoreFx-Trusted-Linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@
},
"PB_PackageVersionPropsUrl": {
"value": ""
},
"PB_AssetRootUrl": {
"value": ""
}
},
"demands": [
Expand Down
3 changes: 3 additions & 0 deletions buildpipeline/DotNet-CoreFx-Trusted-OSX.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@
},
"PACKAGEVERSIONPROPSURL": {
"value": "$(PB_PackageVersionPropsUrl)"
},
"PB_AssetRootUrl": {
"value": ""
}
},
"demands": [
Expand Down
3 changes: 3 additions & 0 deletions buildpipeline/DotNet-CoreFx-Trusted-Windows-NoTest.json
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@
},
"PACKAGEVERSIONPROPSURL": {
"value": "$(PB_PackageVersionPropsUrl)"
},
"PB_AssetRootUrl": {
"value": ""
}
},
"demands": [
Expand Down
3 changes: 3 additions & 0 deletions buildpipeline/DotNet-CoreFx-Trusted-Windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,9 @@
},
"PACKAGEVERSIONPROPSURL": {
"value": "$(PB_PackageVersionPropsUrl)"
},
"PB_AssetRootUrl": {
"value": ""
}
},
"demands": [
Expand Down
10 changes: 8 additions & 2 deletions buildpipeline/DotNet-Trusted-Publish.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
},
"inputs": {
"filename": "msbuild",
"arguments": "src\\publish.proj /t:PublishToAzureBlobFeed /p:AccountKey=$(PB_PublishBlobFeedKey) /p:ExpectedFeedUrl=$(PB_PublishBlobFeedUrl) /p:ConfigurationGroup=$(PB_ConfigurationGroup)",
"arguments": "src\\publish.proj /t:PublishToAzureBlobFeed $(FeedPublishArguments)",
"workingFolder": "$(Pipeline.SourcesDirectory)",
"failOnStandardError": "false"
}
Expand Down Expand Up @@ -258,7 +258,7 @@
},
"inputs": {
"filename": "msbuild",
"arguments": "src\\publish.proj /t:PublishSymbolsToAzureBlobFeed /p:AccountKey=$(PB_PublishBlobFeedKey) /p:ExpectedFeedUrl=$(PB_PublishBlobFeedUrl) /p:ConfigurationGroup=$(PB_ConfigurationGroup) /p:PublishSymbols=\"true\" ",
"arguments": "src\\publish.proj /t:PublishSymbolsToAzureBlobFeed /p:PublishSymbols=\"true\" $(FeedPublishArguments)",
"workingFolder": "$(Pipeline.SourcesDirectory)",
"failOnStandardError": "false"
}
Expand Down Expand Up @@ -494,6 +494,9 @@
"value": "master",
"allowOverride": true
},
"FeedPublishArguments": {
"value": "$(PB_BuildOutputManifestArguments) /p:AccountKey=$(PB_PublishBlobFeedKey) /p:ExpectedFeedUrl=$(PB_PublishBlobFeedUrl) /p:ConfigurationGroup=$(PB_ConfigurationGroup)"
},
"PB_AzureContainerPackageGlob": {
"value": "*.nupkg",
"allowOverride": true
Expand Down Expand Up @@ -523,6 +526,9 @@
},
"PB_PublishType": {
"value": ""
},
"PB_BuildOutputManifestArguments": {
"value": "/p:ManifestBuildId=$(OfficialBuildId) /p:ManifestBranch=$(SourceBranch) /p:ManifestCommit=$(SourceVersion)"
}
},
"retentionRules": [
Expand Down
39 changes: 39 additions & 0 deletions buildpipeline/alpine.3.6.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@Library('dotnet-ci') _

// Incoming parameters. Access with "params.<param name>".
// Note that the parameters will be set as env variables so we cannot use names that conflict
// with the engineering system parameter names.
// CGroup - Build configuration.
// TestOuter - If true, runs outerloop, if false runs just innerloop

simpleDockerNode('microsoft/dotnet-buildtools-prereqs:alpine-3.6-3148f11-20171119021156') {
stage ('Checkout source') {
checkoutRepo()
}

stage ('Initialize tools') {
// Init tools
sh './init-tools.sh'
}
stage ('Generate version assets') {
// Generate the version assets. Do we need to even do this for non-official builds?
sh "./build-managed.sh -runtimeos=alpine.3.6 -- /t:GenerateVersionSourceFile /p:GenerateVersionSourceFile=true /p:PortableBuild=false"
}
stage ('Sync') {
sh "./sync.sh -p -runtimeos=alpine.3.6 -- /p:ArchGroup=x64 /p:PortableBuild=false"
}
stage ('Build Product') {
sh "./build.sh -buildArch=x64 -runtimeos=alpine.3.6 -${params.CGroup} -- /p:PortableBuild=false"
}
stage ('Build Tests') {
def additionalArgs = ''
if (params.TestOuter) {
additionalArgs = '-Outerloop'
}
sh "./build-tests.sh -buildArch=x64 -${params.CGroup} -SkipTests ${additionalArgs} -- /p:ArchiveTests=true /p:EnableDumpling=true /p:PortableBuild=false"
}

// TODO: Add submission for Helix testing once we have queue for Alpine Linux working
}

// TODO: Add "Execute tests" stage once we have queue for Alpine Linux working
Loading

0 comments on commit f0451fc

Please sign in to comment.