Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosifne committed Mar 14, 2024
2 parents 86c6af4 + 3b65162 commit 8704b61
Show file tree
Hide file tree
Showing 13 changed files with 412 additions and 336 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/src/src/Assets/TestProjects/Razor*/ @dotnet/razor-compiler

# Area-Wasm
/src/WasmSdk @lewing @radical @pavelsavara @maraf
/src/WasmSdk @lewing @akoeplinger @pavelsavara @maraf

# Area-Format
/src/Cli/dotnet/commands/dotnet-format @sharwell @arkalyanms
Expand Down
37 changes: 34 additions & 3 deletions eng/Publishing.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<SdkAssetManifestFileName>$(OS)-$(PlatformName)-SdkAssets.xml</SdkAssetManifestFileName>
<SdkAssetsManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(SdkAssetManifestFileName)</SdkAssetsManifestFilePath>

<TempWorkingDirectory>$(ArtifactsDir)\..\AssetsTmpDir\$([System.Guid]::NewGuid())</TempWorkingDirectory>
<TempWorkingDirectory>$(ArtifactsDir)\AssetsTmpDir\$([System.Guid]::NewGuid())</TempWorkingDirectory>
</PropertyGroup>

<!-- Pulled from arcade's publish.proj see https://github.com/dotnet/arcade/issues/5790 for
Expand Down Expand Up @@ -78,7 +78,7 @@
<ItemsToPushToBlobFeed Include="@(FSharpPackagesToPush)" />
</ItemGroup>
</Target>

<!-- We use a separate target to publish this to blob storage so that we can push this to
a relative path inside the blob storage. -->
<Target Name="PublishToolsetAssets" DependsOnTargets="ReadToolsetVersion" BeforeTargets="Publish">
Expand All @@ -98,11 +98,15 @@
<IsStableBuild>false</IsStableBuild>
<IsStableBuild Condition="'$(DotNetFinalVersionKind)' == 'release'">true</IsStableBuild>
</PropertyGroup>


<MakeDir Directories="$(TempWorkingDirectory)"/>

<!--
Delete PushToAzureDevOpsArtifacts task and remove condition from PushToBuildStorage task
after this repo picks up arcade with the following change: https://github.com/dotnet/arcade/pull/14559
-->
<PushToAzureDevOpsArtifacts
Condition="'$(DotNetBuildOrchestrator)' != 'true'"
AzureDevOpsCollectionUri="$(SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)"
AzureDevOpsProject="$(SYSTEM_TEAMPROJECT)"
AzureDevOpsBuildId="$(BUILD_BUILDID)"
Expand All @@ -123,6 +127,33 @@
PublishingVersion="3"
IsStableBuild="$(IsStableBuild)" />

<PushToBuildStorage
Condition="'$(DotNetBuildOrchestrator)' == 'true'"
AzureDevOpsCollectionUri="$(SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)"
AzureDevOpsProject="$(SYSTEM_TEAMPROJECT)"
AzureDevOpsBuildId="$(BUILD_BUILDID)"
ItemsToPush="@(ToolsetAssetsToPushToBlobFeed)"
ItemsToSign="@(ItemsToSignPostBuild)"
CertificatesSignInfo="@(CertificatesSignInfo)"
StrongNameSignInfo="@(StrongNameSignInfo)"
FileSignInfo="@(FileSignInfo)"
FileExtensionSignInfo="@(FileExtensionSignInfo)"
ManifestBuildData="@(ManifestBuildData)"
ManifestRepoUri="$(BUILD_REPOSITORY_NAME)"
ManifestBranch="$(BUILD_SOURCEBRANCH)"
ManifestBuildId="$(BUILD_BUILDNUMBER)"
ManifestCommit="$(BUILD_SOURCEVERSION)"
PublishFlatContainer="true"
AssetManifestPath="$(SdkAssetsManifestFilePath)"
AssetsTemporaryDirectory="$(TempWorkingDirectory)"
PublishingVersion="3"
IsStableBuild="$(IsStableBuild)"
PushToLocalStorage="$(PushToLocalStorage)"
AssetsLocalStorageDir="$(SourceBuiltAssetsDir)"
ShippingPackagesLocalStorageDir="$(SourceBuiltShippingPackagesDir)"
NonShippingPackagesLocalStorageDir="$(SourceBuiltNonShippingPackagesDir)"
AssetManifestsLocalStorageDir="$(SourceBuiltAssetManifestsDir)" />

<Copy
SourceFiles="$(SdkAssetsManifestFilePath)"
DestinationFolder="$(TempWorkingDirectory)\$(SdkAssetManifestFileName)" />
Expand Down
340 changes: 170 additions & 170 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

106 changes: 53 additions & 53 deletions eng/Versions.props

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions eng/common/native/init-compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if [ -z "$CLR_CC" ]; then
# Set default versions
if [ -z "$majorVersion" ]; then
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
if [ "$compiler" = "clang" ]; then versions="17 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5"
if [ "$compiler" = "clang" ]; then versions="18 17 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5"
elif [ "$compiler" = "gcc" ]; then versions="13 12 11 10 9 8 7 6 5 4.9"; fi

for version in $versions; do
Expand Down Expand Up @@ -125,8 +125,8 @@ if [ -z "$CC" ]; then
exit 1
fi

# Only lld version >= 9 can be considered stable. lld doesn't support s390x.
if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && [ "$build_arch" != "s390x" ]; then
# Only lld version >= 9 can be considered stable. lld supports s390x starting from 18.0.
if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && ([ "$build_arch" != "s390x" ] || [ "$majorVersion" -ge 18 ]); then
if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
LDFLAGS="-fuse-ld=lld"
fi
Expand Down
18 changes: 11 additions & 7 deletions eng/common/templates-official/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,11 @@ jobs:
continueOnError: true
condition: always()
- ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}:
- publish: artifacts/log
artifact: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }}
displayName: Publish logs
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: 'artifacts/log'
artifactName: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }}
displayName: 'Publish logs'
continueOnError: true
condition: always()

Expand Down Expand Up @@ -253,7 +255,9 @@ jobs:
IgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}

- ${{ if eq(parameters.enableBuildRetry, 'true') }}:
- publish: $(Build.SourcesDirectory)\eng\common\BuildConfiguration
artifact: BuildConfiguration
displayName: Publish build retry configuration
continueOnError: true
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.SourcesDirectory)\eng\common\BuildConfiguration'
artifactName: 'BuildConfiguration'
displayName: 'Publish build retry configuration'
continueOnError: true
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24159.1",
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24159.1",
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24162.2",
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24162.2",
"Microsoft.Build.NoTargets": "3.7.0"
}
}
8 changes: 6 additions & 2 deletions src/BuiltInTools/dotnet-watch/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ dotnet watch test
var runCommand = new CliCommand("run") { Hidden = true };
var testCommand = new CliCommand("test") { Hidden = true };
var buildCommand = new CliCommand("build") { Hidden = true };
var rootCommand = new CliRootCommand(Description);
var rootCommand = new CliRootCommand(Description)
{
Directives = { new EnvironmentVariablesDirective() }
};

void AddSymbols(CliCommand command)
{
Expand Down Expand Up @@ -237,7 +240,8 @@ .. parseResult.GetValue(remainingCommandArgs)
errorCode = new CliConfiguration(rootCommand)
{
Output = output ?? Console.Out,
Error = error ?? Console.Error
Error = error ?? Console.Error,

}.Invoke(args);

return options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ private static CliCommand ConstructCommand()
{
parseResult.ShowHelp();
}
// Only return 1 or 0
return exitCode == 0 ? 0 : 1;
});

return searchCommand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

<PropertyGroup>
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
<OutputType>Library</OutputType>
<Description>SDK for building and publishing applications containing static web assets.</Description>
<RootNamespace>Microsoft.NET.Sdk.StaticWebAssets</RootNamespace>

<EnableDefaultItems>false</EnableDefaultItems>
<GenerateDependencyFile>false</GenerateDependencyFile>
<IncludeBuildOutput>false</IncludeBuildOutput>

Expand All @@ -28,35 +30,26 @@
<NoDefaultExcludes>true</NoDefaultExcludes>
</PropertyGroup>

<PropertyGroup>
<Description>SDK for building and publishing applications containing static web assets.</Description>
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.NET.Sdk.StaticWebAssets</RootNamespace>
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" Condition="'$(TargetFramework)'=='net472'" />
<PackageReference Include="System.Text.Json" Condition="'$(TargetFramework)'=='net472'" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" />
<PackageReference Include="Microsoft.Css.Parser" />
</ItemGroup>

<ItemGroup>
<Compile Include="**\*.cs" />
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>

<ItemGroup>
<AdditionalContent Include="$(StaticWebAssetsSdkRoot)Targets\**\*.*">
<Pack>true</Pack>
<PackagePath>targets</PackagePath>
</AdditionalContent>
<AdditionalContent Include="$(StaticWebAssetsSdkRoot)Sdk\**\*.*">
<Pack>true</Pack>
<PackagePath>Sdk</PackagePath>
</AdditionalContent>
<!-- Only include these files in the outer build to avoid double writes. -->
<ItemGroup Condition="'$(IsCrossTargetingBuild)' == 'true'">
<AdditionalContent Include="$(StaticWebAssetsSdkRoot)Targets\**\*.*"
Pack="true"
PackagePath="targets" />
<AdditionalContent Include="$(StaticWebAssetsSdkRoot)Sdk\**\*.*"
Pack="true"
PackagePath="Sdk" />
</ItemGroup>

<ItemDefinitionGroup>
Expand All @@ -66,46 +59,63 @@
</PackageReference>
</ItemDefinitionGroup>

<Target Name="CopyFileSystemGlobbing" BeforeTargets="PrepareAdditionalFilesToLayout" AfterTargets="ResolveReferences" Condition="'$(TargetFramework)' == '$(SdkTargetFramework)'">
<Target Name="CopyFileSystemGlobbing"
BeforeTargets="PrepareAdditionalFilesToLayout"
AfterTargets="ResolveReferences"
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<ItemGroup>
<_FileSystemGlobbing Include="@(ReferencePath)" Condition="'%(ReferencePath.NuGetPackageId)' == 'Microsoft.Extensions.FileSystemGlobbing'" />
<_FileSystemGlobbingContent Include="@(_FileSystemGlobbing)" TargetPath="tasks\$(SdkTargetFramework)\%(_FileSystemGlobbing.Filename)%(_FileSystemGlobbing.Extension)" />
<AdditionalContent Include="@(_FileSystemGlobbing)" PackagePath="tasks\$(SdkTargetFramework)" />
<_FileSystemGlobbingContent Include="@(_FileSystemGlobbing)" TargetPath="tasks\$(TargetFramework)\%(_FileSystemGlobbing.Filename)%(_FileSystemGlobbing.Extension)" />
<AdditionalContent Include="@(_FileSystemGlobbing)" PackagePath="tasks\$(TargetFramework)" />
</ItemGroup>

<Copy SourceFiles="@(_FileSystemGlobbingContent)" DestinationFiles="@(_FileSystemGlobbingContent->'$(PackageLayoutOutputPath)%(TargetPath)')">
<Copy SourceFiles="@(_FileSystemGlobbingContent)"
DestinationFiles="@(_FileSystemGlobbingContent->'$(PackageLayoutOutputPath)%(TargetPath)')"
SkipUnchangedFiles="true">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>

<Target Name="CopyCssParser" BeforeTargets="PrepareAdditionalFilesToLayout" AfterTargets="ResolveReferences" Condition="'$(TargetFramework)' == '$(SdkTargetFramework)'">
<Target Name="CopyCssParser"
BeforeTargets="PrepareAdditionalFilesToLayout"
AfterTargets="ResolveReferences"
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<ItemGroup>
<_CssParser Include="@(ReferencePath)" Condition="'%(ReferencePath.NuGetPackageId)' == 'Microsoft.Css.Parser'" />
<_CssParserContent Include="@(_CssParser)" TargetPath="tasks\$(SdkTargetFramework)\%(_CssParser.Filename)%(_CssParser.Extension)" />
<AdditionalContent Include="@(_CssParser)" PackagePath="tasks\$(SdkTargetFramework)" />
<_CssParser Include="@(ReferencePath->WithMetadataValue('NuGetPackageId', 'Microsoft.Css.Parser'))" />
<_CssParserContent Include="@(_CssParser)" TargetPath="tasks\$(TargetFramework)\%(_CssParser.Filename)%(_CssParser.Extension)" />
<AdditionalContent Include="@(_CssParser)" PackagePath="tasks\$(TargetFramework)" />
</ItemGroup>

<Copy SourceFiles="@(_CssParserContent)" DestinationFiles="@(_CssParserContent->'$(PackageLayoutOutputPath)%(TargetPath)')">
<Copy SourceFiles="@(_CssParserContent)"
DestinationFiles="@(_CssParserContent->'$(PackageLayoutOutputPath)%(TargetPath)')"
SkipUnchangedFiles="true">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>

<Target Name="PrepareAdditionalFilesToLayout" BeforeTargets="AssignTargetPaths">
<ItemGroup>
<LayoutFile Include="@(AdditionalContent)" Condition="'%(AdditionalContent.PackagePath)' != '' and '%(AdditionalContent.PackagePath)' != 'Icon.png'">
<TargetPath>%(AdditionalContent.PackagePath)\%(AdditionalContent.RecursiveDir)%(AdditionalContent.Filename)%(AdditionalContent.Extension)</TargetPath>
</LayoutFile>
<LayoutFile Include="@(AdditionalContent)"
Condition="'%(AdditionalContent.PackagePath)' != '' and '%(AdditionalContent.PackagePath)' != 'Icon.png'"
TargetPath="%(AdditionalContent.PackagePath)\%(AdditionalContent.RecursiveDir)%(AdditionalContent.Filename)%(AdditionalContent.Extension)" />
</ItemGroup>
</Target>

<Target Name="CopyAdditionalFilesToLayout" DependsOnTargets="PrepareAdditionalFilesToLayout" AfterTargets="Build" Inputs="@(LayoutFile)" Outputs="@(LayoutFile->'$(PackageLayoutOutputPath)%(TargetPath)')">
<Target Name="CopyAdditionalFilesToLayout"
DependsOnTargets="PrepareAdditionalFilesToLayout"
AfterTargets="Build"
Inputs="@(LayoutFile)"
Outputs="@(LayoutFile->'$(PackageLayoutOutputPath)%(TargetPath)')">
<Copy SourceFiles="@(LayoutFile)" DestinationFiles="@(LayoutFile->'$(PackageLayoutOutputPath)%(TargetPath)')">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>

<Target Name="PackLayout" DependsOnTargets="CopyAdditionalFilesToLayout" BeforeTargets="$(GenerateNuspecDependsOn)">
<Target Name="PackLayout"
DependsOnTargets="CopyAdditionalFilesToLayout"
BeforeTargets="$(GenerateNuspecDependsOn)">
<Message Importance="high" Text="Packing assets at $(PackageLayoutOutputPath)" />

<ItemGroup>
<Content Include="$(PackageLayoutOutputPath)**\*" PackagePath="\" />
</ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/WasmSdk/Sdk/Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Copyright (c) .NET Foundation. All rights reserved.
<!-- Disable accelerated builds in Visual Studio as the Wasm SDK needs to post process the outputs from the build and the feature won't work as expected. -->
<AccelerateBuildsInVisualStudio>false</AccelerateBuildsInVisualStudio>

<!-- JS Modules - We disable the manifest generation because we are going to inline the modules in the blazor.boot.json manifest -->
<GenerateJSModuleManifest>false</GenerateJSModuleManifest>

<_WasmSdkImportsMicrosoftNETSdkPublish Condition="'$(UsingMicrosoftNETSdkPublish)' != 'true'">true</_WasmSdkImportsMicrosoftNETSdkPublish>
<_WasmSdkImportsMicrosoftNETSdkStaticWebAssets Condition="'$(UsingMicrosoftNETSdkStaticWebAssets)' != 'true'">true</_WasmSdkImportsMicrosoftNETSdkStaticWebAssets>
</PropertyGroup>
Expand Down
Loading

0 comments on commit 8704b61

Please sign in to comment.