beamable / BeamableProduct

The beamable product suite including com.beamable, com.beamable.server, microservice base image, portal, the installer, and build scripts
Other
5 stars 0 forks source link

USAM - remove signpost files (assembly defs) #3365

Open cdhanna opened 5 months ago

cdhanna commented 5 months ago

after we have removed the beamo-local-manifest.json file from the CLI, the CLI will be able to tell Unity where all the USAM projects are. That gives us 90% of what the signpost files were doing in the first place.

The remaining issue is that the signpost files contained an assembly definition data point for each USAM. Instead, we should shift the sole responsibility for those assembly references into the USAM csproj file, using the existing ProjectReference node,

<!-- Reference an assembly definition, "myreference", using the file path helper property -->
<ProjectReference Include="$(UnityAssemblyDefintions)/myreference.csproj" BeamProjectType="UnityAsm"/>

<!-- Reference an assembly definition, "myreference2", using a fully qualified path -->
<ProjectReference Include="Library/asdflkj/Beamable/myreference2.csproj" BeamProjectType="UnityAsm"/>

Of note,

  1. the $(UnityAssemblyDefintions) property should be provided by the Directory.Build.Props file, and point to the location where Unity generates csproj files from assembly definitions. This means we'll need to modify the beam project generate-props command.
  2. the BeamProjectType attribute is a custom addition to the csproj spec, and it is our hint that the ProjectReference is an assembly definition reference.

Then, when Unity uses the CLI to scan for the local manifest, a new section should be included that has project specific sections,

{
 "beamoId": "tuna",
 "unity": {
    "assemblyReferences": [
"Library/asdflkj/Beamable/myreference.csproj",
"Library/asdflkj/Beamable/myreference2.csproj"
]
  }
}

it is important that if the $(UnityAssemblyDefintions) property is used in the definition of a reference, it should be fully evaluated in the response from the CLI. Unity will then take that list, identify the assemblies that map to myreference and myreference2, and generate the corresponding csproj files.

cdhanna commented 5 months ago

how will we read the XML? XML parsing, or MSBUILD?

cdhanna commented 5 months ago

Also, we need the assembly definition UX as a UI step in the Microservice Manager window, as per this ticket, https://github.com/beamable/BeamableProduct/issues/3173