stride icon indicating copy to clipboard operation
stride copied to clipboard

[WIP] Integrate AssemblyProcessor in the main solution

Open Ethereal77 opened this issue 2 years ago • 3 comments
trafficstars

PR Details

This PR is a follow-up of the PR #1694. While that PR aims to make the Stride build process use the most up-to-date AssemblyProcessor (by not bundling stale versions with the repository), this PR integrates the compilation of the AssemblyProcessor in the main Stride solutions.

Description

The goal of this PR is to be able to build the whole Stride solution as easy as possible and in as few steps as possible. Right now, it is necessary for the user to first build the AssemblyProcessor, so it is properly packed, hashed, and copied to the deps directory. Only then can the user build Stride runtime / Game Studio succesfully.

This PR adds the AssemblyProcessor project and tests to the main Stride solution, and makes sure it is compiled prior to Stride.Core, so it's always ready when it is first needed. An added benefit is that now it's easier to modify the AssemblyProcessor.

Related Issue

PR #1694

Types of changes

  • [ ] Docs change / refactoring / dependency upgrade
  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [ ] My change requires a change to the documentation.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.

Ethereal77 avatar Oct 07 '23 18:10 Ethereal77

Oops. I think this PR has also taken the commits from the other one, instead of sitting over it.

Ethereal77 avatar Oct 07 '23 18:10 Ethereal77

Those last 2 commits is all it took on top of your previous PR? That's great!

manio143 avatar Oct 07 '23 18:10 manio143

Well. For now it's only done for the Stride.sln solution. I wanted to ask whether I should do it also for Stride.Runtime.sln? I've already planned to do it, but wanted to know your opinion.

And what about Stride.Android.sln and Stride.iOS.sln? Don't know if I can do it properly because I lack the necessary workloads for loading the projects. I haven't checked yet.

Should I keep the Stride.AssemblyProcessor.sln file now that it is integrated into the main solution?

And finally, right now it is configured as a compilation order dependency for Stride.Core. That means it works only when building through the .sln (either from VS or with MSBuild). It doesn't work if you build the projects directly. Is that ok? Is there some way I can specify the dependency in the projects but without consuming the generated DLL? I'm thinking something along these lines:

<ProjectReference Include="Stride.Core.AssemblyProcessor.csproj">
      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>

But I don't know if that's the best way.

Thoughts?

Ethereal77 avatar Oct 07 '23 19:10 Ethereal77