Skip to content

Conversation

nagilson
Copy link
Member

@nagilson nagilson commented Apr 15, 2025

Resolves #347

  • Adds 'dotnet-bootstrapper' as a project, and a test project.
  • Utilizes the properties we'd expect to see from it in the final product.
  • The name is still TBD, but don't block the PR on this.
  • Contains a very simple E2E test to make sure the bootstrapper exits with code 0.
  • Follows the existing repo conventions.
  • Build and tests are already added, because the pipeline simply scans the folders (pretty nice.)
  • The readme.md can be updated later.
  • The build and tests can be separated/isolated later, and there is an issue for that.
  • Sorry as I didn't see [Bootstrapper] Add new project #377 already existed. I think that wasn't finished though, and MSBuildBinLogQuery can be removed in a different PR.

nagilson added 10 commits April 15, 2025 14:53
I'm not sure why we have logic to check if it's not a PR run or an internal run if the pipeline is for PRs only. Maybe this won't work, and I don't understand the system that well, but it seems like it may have been copy pasted and a result of de-merging two pipelines into separate ones. There is also a large amount of yaml which is duplicated and can be simplified/shared.
@nagilson nagilson marked this pull request as ready for review April 16, 2025 22:08
@nagilson
Copy link
Member Author

I will be away but you are good to merge it if it is approved.

@nagilson nagilson requested a review from a team April 16, 2025 22:21
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this supposed to be 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.

Yeah, its an empty file for when we add strings to this project

Copy link
Member

Choose a reason for hiding this comment

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

Is this supposed to be here?

No, you shouldn't commit a .Designer file. It is generated on-build. You only need the .resx file.

@nagilson nagilson merged commit f94350e into main Apr 16, 2025
8 checks passed
Comment on lines +7 to +14
<TargetFramework>net8.0</TargetFramework>
<RunAOTCompilation>true</RunAOTCompilation>
<PublishTrimmed>true</PublishTrimmed>
<IsPackable>false</IsPackable>
<PublishSingleFile>true</PublishSingleFile>
<PublishAot>true</PublishAot>
<WasmStripILAfterAOT>true</WasmStripILAfterAOT>
<RollForward>LatestMajor</RollForward>
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 review which of these properties should be set. I don't think RollForward applies to a self-contained app, and I don't think WasmStripILAfterAOT applies to non-WASM projects. Some of the other AOT / publish properties may be redundant, I think the main one you need to specify is PublishAOT.

Comment on lines +16 to +18
private readonly static string artifactsDirectory = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..", "..", "artifacts"));
private readonly static string executablePath = Path.Combine(artifactsDirectory, "bin", "dotnet-bootstrapper", TestUtilities.GetConfiguration(), TestUtilities.GetTargetFramework(), TestUtilities.GetRuntimeIdentifier(),
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet-bootstrapper.exe" : "dotnet-bootstrapper");
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be good to be a bit more resilient to changes in the folder layout. Probably a good strategy is to find the repo root by looking for a .git folder and then use a relative path from there.

See TestContext.GetRepoRoot in dotnet/sdk for a sample of how to do that. There's also a bunch more code in there for finding different folders, we probably don't need most of that complexity for this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bootstrapper] Create the Project and Build in Pipeline
4 participants