Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul build and project systems and drop Mac/POSIX code #1744

Merged
merged 35 commits into from
Jun 29, 2021

Conversation

mjcheetham
Copy link
Member

@mjcheetham mjcheetham commented Jun 28, 2021

This PR simplifies and modernises the build system significantly. Move to the new MSBuild project file format for all .NET projects and avoid mixing ecosystems between dotnet/msbuild, nuget/dotnet and packages.config/ProjectReference (where possible).

All .NET projects target .NET Framework 4.6.1, and we drop all .NET Standard and .NET Core targets.

Native code uses the Windows SDK 10.0.16299 and the VS2019 toolset.

We also drop more/most of the macOS and POSIX code to aid in simplifying the build - VFS for Git on Mac and Linux were abandoned for various reasons.

Functional tests only run against the currently installed VFS for Git (on %PATH%) and the option to run against the just-built/dev version has been removed (it was not used in practice).

Add a GitHub Actions workflow for CI and PR builds. (Also added a YAML-based Azure DevOps pipeline for release builds, but this is not used.. yet).

Notes:

  • The PR is best reviewed commit-by-commit, but note that each commit does NOT build standalone, and the entire series must be taken as a whole to ensure a successful build.

  • The majority of the new build design comes from Scalar and GCM Core, so there's some similarities in here to those systems. For example, the GVFS.MSBuild files come pretty much verbatim from the Scalar.MSBuild project in Scalar.

Move the GitHooksLoader under the GVFS directory and migrate the project
file to v142 toolset (VS2019) and WinSDK10.0.16299. Also migrate project
to use new MSBuild properties for the VSF for Git project.
Drop the older custom targets and props files for the new ones.
Replace the GVFS.Build directory and pre-build code with targets and
tasks that are better integrated with the rest of the build.
Migrate the native VC++ projects to use the new build variables, package
restore, and WinSDK to 10.0.16299.
Also drop the .Windows specific project.. it's all Windows now.
Also combine the GVFS.UnitTests and .Windows projects in to one project
(it's all Windows now).
Replace the 'sign files' project with a 'payload' project and script
(that gathers binaries for signing).
Migrate the Windows installer project to the new build system, and also
use wildcard inclusion of files in the Inno setup.
Simplify solution configurations (we only build on Windows x64 now) and
remove solution-level project build order.. we now rely on MSBuild and
"real" project-to-project dependencies.
GVFS.sln Outdated Show resolved Hide resolved
GVFS.sln Outdated Show resolved Hide resolved
@jeffhostetler
Copy link

Very Nice!

Copy link

@jeffhostetler jeffhostetler left a comment

Choose a reason for hiding this comment

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

Very nice! I like how all of the project files get so much shorter and manageable.
(My eyes did glaze over on a few of the commits, so consider this an informed rubber stamp.)

Copy link
Contributor

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

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

I mostly have nits that can be ignored or handled later.

Here is my short list of follow-ups that will be unblocked by this PR:

  1. Update to latest microsoft/git release (and fix compatibility bugs in microsoft/git based on that update).
  2. Remove the custom upgrader and have gvfs upgrade shell out to winget.
  3. Update the release flow to match the new setup.

including taking version numbers 2.X.Y from upstream and updating .W if we have any
hotfixes to microsoft/git.
-->
<GitPackageVersion>2.20210322.1</GitPackageVersion>
Copy link
Contributor

Choose a reason for hiding this comment

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

Making a mental note to update our internal docs to point to this line.

GVFS/GVFS/CommandLine/GVFSVerb.cs Show resolved Hide resolved
scripts/Build.bat Show resolved Hide resolved
.github/workflows/build.yaml Outdated Show resolved Hide resolved
.azure-pipelines/release.yml Show resolved Hide resolved
@mjcheetham mjcheetham merged commit bd54739 into microsoft:master Jun 29, 2021
@mjcheetham mjcheetham deleted the newbuild branch June 29, 2021 14:43
derrickstolee added a commit that referenced this pull request Jul 15, 2021
Major Updates
----------------

* Comes with `microsoft/git` v2.32.0.vfs.0.4.
* This release will be available via `winget`.
* The `gvfs upgrade` verb is deprecated. Any future updates will be taken via `winget`.
* This version of Git has an upgrade mechanism that can advance independently of VFS for Git. Run `git update-microsoft-git` to update your Git version.
* The build system has been updated to use a more recent version of .NET.
* All macOS and POSIX code has been removed to simplify the build system.
* A FastFetch bug around deleting files has been fixed.
* A prefetch bug around downloading a small number of files has been fixed.

Special thanks to contributors @ldennington, @tyrielv, @50Wliu, and @SteveBenz.

Pull Requests
---------------

* #1738: Bumping version of update-winget action
* #1747: UpgradeVerb: write deprecation notice
* #1745: do not exit early if no blobs found for a period when prefetching
* #1740: Skip launching UI if running unattended
* #1737: Update Git to v2.32.0
* #1746: Delete custom upgrader
* #1741: Fix winget tag specification
* #1744: Overhaul build and project systems and drop Mac/POSIX code
* #1736: Update Git to v2.31.1.vfs.0.3
* #1735: Bumping winget action version
* #1734: Adding winget workflow
* #1733: Update Git to include 2.31.1
* #1730: Fix an issue with FastFetch when deleting files
* #1732: Use one NuGet feed
* #1726: Config: commitGraph.generationVersion=1
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.

3 participants