enable build System.Private.Interop project#4836
Conversation
|
@shrah , @MichalStrehovsky PTAL |
|
Can you confirm these two projects no longer place their build outputs in the same directory? We had build races in the official build because of that (not the CI build; the build that does signing and produces NuGet packages). I'm still missing the broader context on these though. Are we going to ship NuGet packages of these from this repo? Or why do these project files need to build here? The build is not really set up for this - e.g. right now these libraries are going to be placed in the CoreRT SDK even though they're unused because they don't actually target CoreRT. I'm not opposed to making changes to enable these scenarios, but it might need some broader build changes, not just hacking up OutputPath to something else. |
|
@MichalStrehovsky resolve two projects' build outputs in the same directory issue-- the problem is related to import a project file instead of target file. |
|
Are we going to ship NuGet packages of these from this repo? |
|
why do these project files need to build here?
In future, We will consider Option #2. |
@luqunl There are many ways how to achieve that. E.g. the mono repo already uses the CoreRT repo as a submodule and they pick and choose files they would like to use. What's the intended consumption model here? |
|
@MichalStrehovsky The consumption mode is that customers can just use nuget package generated from CoreRT branch and can submit PR for fixing S.P.Interop issues |
|
OK, so we need official builds and NuGet packaging. This will require some broader thinking on your part. If these projects are just hooked up into whatever build configurations CoreRT repo defines, there will be issues with build matrix. Mono's and CoreCLR's build matrix is different from CoreRT. The way we have the alternate S.P.Interop projects hooked up into build.cmd right now means that you can't produce a e.g. x86 build of the S.P.Interop library without making all of CoreRT compile on x86 first (see #4589 - not even x86 is supported right now in CoreRT). Especially Mono's support matrix is huge and spans architectures and operating systems. |
|
System.Private.Interop for mono only works on Windows. so its matrix for using System.Private.Interop should be similar as CoreRT. |
|
in my mind, x86/amd64/arm build configurations for System.Private.Interop should be enough |
|
@luqunl As we have discussed during our phone call with Mono team, they are not going to consume NuGet packages from CoreRT repo. They are going to build their own binaries from CoreRT sources. I see the Mono build flavor here just as a sanity check that things are not completely broken. |
| <AssemblyName>System.Private.Interop</AssemblyName> | ||
| <TargetName>$(AssemblyName)</TargetName> | ||
| <DefineConstants>$(DefineConstants);ENABLE_MIN_WINRT</DefineConstants> | ||
| <OutputType>Library</OutputType> |
There was a problem hiding this comment.
This is going to drop the binaries under sdk\mono. I would like everything under sdk to be CoreRT runtime/toolchain specific. Could you please drop these files under e.g. interop.
There was a problem hiding this comment.
do you mean interop folder and sdk folder are under same parent folder? like
sdk
interop
|
@jkotas, Azure Service Fabric and VS Debugger team want to consume from Nuget package |
|
Right, they are different from Mono. I would expect we will build one platform-neutral build for them. As @MichalStrehovsky said, it will require some build plumbing to get the build and packaging right. |
|
@jkotas, some of interop code are architecture dependent. so neutral doesn't work for them. |
|
Then you will need to choose between making this platform neutral, e.g. by using |
only enable mini winrt on windows OS and resolve build output folder overlap problem between CoreCLR and Mono
Please enter the commit message for your changes. Lines starting
Change output folder to {root}\interop
|
For build infrastructure plumbing, beside support build neutral assembly, Is there anything else specific for these two projects? |
|
If you do not have platform neutral build, you will pay for it in the packaging and build leg complexity. Up to you where you want to pay the cost... Either way, you may want to have separate build.cmd for the official build of the interop bits so that you do not have to build the whole corert repo just to build the interop bits. |
|
Thanks for your explanation. if these two(neutral/build.cmd) becomes problem, then we can fix them one by one. |
|
@luqunl We prefer to use squash&merge option to merge regular PRs. |
|
Next time, I will follow this. |
verify the fix for build issue