Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Fix casing of files to get closer to ./build.sh -allConfiguration working on linux #35085

Merged
merged 3 commits into from
Feb 7, 2019

Conversation

krwq
Copy link
Member

@krwq krwq commented Feb 4, 2019

Currently ./build.sh -allConfiguration is not working on linux.

This is fixing one class of issues.
There are still some errors I'm seeing locally but not sure how to fix yet (will be digging a bit more):

/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error : Error when creating nuget packed package from /tmp/tmp.A9Djs3tsi9/artifacts/packages/Debug/specs/runtime.linux-x64-aot.Microsoft.Private.CoreFx.NETCoreApp.nuspec. System.IO.DirectoryNotFoundException: Could not find a part of the path '/tmp/tmp.A9Djs3tsi9/artifacts/bin/native/netcoreapp-Linux-Debug-x64-aot'. [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, EnumerationOptions options) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at NuGet.Common.PathResolver.PerformWildcardSearch(String basePath, String searchPath, Boolean includeEmptyDirectories, String& normalizedBasePath) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at NuGet.Packaging.PackageBuilder.ResolveSearchPattern(String basePath, String searchPath, String targetPath, Boolean includeEmptyDirectories) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at NuGet.Packaging.PackageBuilder.AddFiles(String basePath, String source, String destination, String exclude) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at NuGet.Packaging.PackageBuilder.PopulateFiles(String basePath, IEnumerable`1 files) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at Microsoft.DotNet.Build.Tasks.Packaging.NuGetPack.Pack(String nuspecPath, String nupkgPath, Manifest manifest, Boolean packSymbols) in /_/src/Microsoft.DotNet.Build.Tasks.Packaging/src/NuGetPack.cs:line 256 [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error : Error when creating nuget packed package from /tmp/tmp.A9Djs3tsi9/artifacts/packages/Debug/specs/runtime.linux-x64-aot.Microsoft.Private.CoreFx.NETCoreApp.nuspec. System.IO.DirectoryNotFoundException: Could not find a part of the path '/tmp/tmp.A9Djs3tsi9/artifacts/bin/native/netcoreapp-Linux-Debug-x64-aot'. [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, EnumerationOptions options) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at NuGet.Common.PathResolver.PerformWildcardSearch(String basePath, String searchPath, Boolean includeEmptyDirectories, String& normalizedBasePath) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at NuGet.Packaging.PackageBuilder.ResolveSearchPattern(String basePath, String searchPath, String targetPath, Boolean includeEmptyDirectories) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at NuGet.Packaging.PackageBuilder.AddFiles(String basePath, String source, String destination, String exclude) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at NuGet.Packaging.PackageBuilder.PopulateFiles(String basePath, IEnumerable`1 files) [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
/home/krwq/.nuget/packages/microsoft.dotnet.build.tasks.packaging/1.0.0-beta.19081.1/build/Packaging.targets(1255,5): error :    at Microsoft.DotNet.Build.Tasks.Packaging.NuGetPack.Pack(String nuspecPath, String nupkgPath, Manifest manifest, Boolean packSymbols) in /_/src/Microsoft.DotNet.Build.Tasks.Packaging/src/NuGetPack.cs:line 256 [/tmp/tmp.A9Djs3tsi9/pkg/Microsoft.Private.CoreFx.NETCoreApp/Microsoft.Private.CoreFx.NETCoreApp.pkgproj]

Not seeing netcoreapp-Linux-Debug-x64-aot in my bin folder

/tmp/tmp.A9Djs3tsi9/artifacts/bin/native$ ls -la
total 20
drwxr-xr-x   3 krwq krwq  4096 Feb  4 12:05 .
drwxr-xr-x 207 krwq krwq 12288 Feb  4 13:03 ..
drwxr-xr-x   2 krwq krwq  4096 Feb  4 12:55 netcoreapp-Linux-Debug-x64

cc: @dotnet/dnceng

@dagood
Copy link
Member

dagood commented Feb 4, 2019

I was working on this (linux allconfigurations) for source-build! I summarized my latest progress at dotnet/source-build#210 (comment) because I had to stop working on it.

The aot issue happens when you try to build the runtime packages while also trying to build allconfigurations:

Initially I tried to use a single command to build -allconfigurations and the vertical for the current platform within the same build context. That has complications (dotnet/corefx#34332 (review)) so I abandoned it and instead first execute a build command for -allconfigurations, then another build command for the vertical.

/cc @dleeapho @dseefeld @crummel

@krwq
Copy link
Member Author

krwq commented Feb 4, 2019

@dagood hope this is not conflicting with anything. In the issue you mention you got the workaround for the build.. I just need to be able to build packages locally. You mentioned to use -allconfigurations Which verticals do I need to build? (and how?)

@dagood
Copy link
Member

dagood commented Feb 4, 2019

No conflict. It's cool to see someone else trying to do this. 😄

I just need to be able to build packages locally.

Depending on which packages you want to build, you don't need -allconfigurations. Since you're trying to use allconfigurations, I assume you've already done a build and it didn't produce the specific packages you wanted, but I want to point that out to make sure.

Which verticals do I need to build? (and how?)

I think it would take too long for me to go back and try to figure out what the minimum is to do this. It has likely been broken by later corefx commits, too. You can try taking my WIP branch of source-build (https://github.com/dagood/source-build/tree/corefx-all), building it, and checking the state of the src/corefx submodule after patches and the build commands it tells you it used for corefx and corefx-allconfigurations.

@danmoseley danmoseley requested a review from safern February 4, 2019 23:08
@@ -128,7 +128,7 @@
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.DeleteVolumeMountPoint.cs">
<Link>Common\Interop\Windows\Interop.DeleteVolumeMountPoint.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\CoreLib\Interop\Windows\kernel32\Interop.GetLogicalDrives.cs">
<Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.GetLogicalDrives.cs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we instead be consistent and rename this directories to be all lowercase? It is odd to have someones to be lowercase and other uppercase.

@@ -47,11 +47,11 @@
<Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.FormatMessage.cs">
<Link>Common\CoreLib\Interop\Windows\Interop.FormatMessage.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\CoreLib\Interop\Windows\advapi32\Interop.RegCloseKey.cs">
<Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Advapi32\Interop.RegCloseKey.cs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which do we prefer?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer lowercase, and that seem to be the majority of the cases, but I don't know what other people think on this.

cc @jkotas @stephentoub @danmosemsft

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The casing of the filename should match the casing of the class that the file or directory contains.

The interop classes start with upper case: class Kernel32, class Advapi32, ... .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The upper case is much more common, e.g.:

Kernel32 1571 hits over 415 files
kernel32 616 hits over 96 files

Copy link
Member

@stephentoub stephentoub Feb 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the upper case, primariliy for the reason @jkotas mentions. We want the code to use PascalCasing for these types, as otherwise it stands out like a sore thumb, and the file names should match the type names.

<Compile Include="$(CommonPath)\Interop\Windows\User32\Interop.MessageBeep.cs">
<Link>Common\Interop\Windows\User32\Interop.MessageBeep.cs</Link>
<Compile Include="$(CommonPath)\Interop\Windows\user32\Interop.MessageBeep.cs">
<Link>Common\Interop\Windows\user32\Interop.MessageBeep.cs</Link>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make these upper case. If it's not on the file system, we should rename the directory as well.

@krwq krwq force-pushed the build_allconfig_casing branch from 911ff2c to e98c779 Compare February 6, 2019 21:12
@krwq
Copy link
Member Author

krwq commented Feb 6, 2019

I've also normalized slashes to use Windows, please let me know if you find any other directories which need renaming

@krwq
Copy link
Member Author

krwq commented Feb 7, 2019

@safern ping - this PR is super merge conflict prone

Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for fixing it!

@krwq
Copy link
Member Author

krwq commented Feb 7, 2019

Let me know if you got any other massive casing changes, I wrote tiny hacky tool for that so it will go quickly in the future

@krwq krwq merged commit 8c52600 into dotnet:master Feb 7, 2019
jkotas added a commit to dotnet/corert that referenced this pull request Feb 10, 2019
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/coreclr that referenced this pull request Feb 10, 2019
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corefx that referenced this pull request Feb 10, 2019
Match convention introduced by dotnet#35085

Signed-off-by: dotnet-bot <[email protected]>
stephentoub pushed a commit that referenced this pull request Feb 10, 2019
Match convention introduced by #35085

Signed-off-by: dotnet-bot <[email protected]>
jkotas added a commit to dotnet/coreclr that referenced this pull request Feb 10, 2019
Match convention introduced by dotnet/corefx#35085

Signed-off-by: dotnet-bot <[email protected]>
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/mono that referenced this pull request Feb 10, 2019
marek-safar pushed a commit to mono/mono that referenced this pull request Feb 10, 2019
@karelz karelz added this to the 3.0 milestone Mar 18, 2019
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…king on linux (dotnet/corefx#35085)

* Rename directories to use CamelCasing

* Fix CsProj files to match file names and their casing

* fix couple of Compile items which were not in csproj file


Commit migrated from dotnet/corefx@8c52600
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants