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

Enable experimental features through features.scalar=experimental #484

Merged
merged 9 commits into from
Feb 5, 2021

Conversation

derrickstolee
Copy link
Contributor

This expands the GitVersion parser to include an Extra string. This will contain anything after 2.X.Y.vfs.Z.W. For instance, the tag v2.30.0.vfs.0.0.exp contains the builtin FS Monitor feature (see microsoft/git#289).

To enable experimental features, we check the new feature.scalar config setting. This has a few modes:

  1. feature.scalar=false implies we want to disable optional features like FS Monitor.
  2. feature.scalar=true or unset implies we want to use our default values, like using Watchman for FS Monitor.
  3. feature.scalar=experimental means we should use available experimental features like FS Monitor. In the future, this could also include early versions of sparse-index.

After using git config to set the appropriate feature.scalar value locally, users can run scalar run config to re-initialize features according to this recommendation. These instructions will be part of the experimental release documentation when we are closer to making that available.

This is appropriate for full releases, as it will do nothing new if users don't have the experimental Git release as well.

The Git version string looks like this:

	v2.X.Y.vfs.Z.W[.stuff]

Usually ".stuff" only exists if we build Git with a version that isn't
tagged. However, we will create experimental releases that end with
".exp". Use this to indicate whether or not the builtin FS Monitor
feature is available.

Signed-off-by: Derrick Stolee <[email protected]>
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

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

I had only one nit-pick, and a comment about the overall strategy to determine whether the current Git version supports FSMonitor (it might be a bad idea to rely on the .exp tell-tale for determining whether the current Git version supports FSMonitor, a better alternative would be to run git fsmonitor--daemon -h and test for the exit code 129, indicating that the usage was shown, 127 would be "not found").

Scalar.Common/Maintenance/ConfigStep.cs Outdated Show resolved Hide resolved
Scalar.Common/Maintenance/ConfigStep.cs Outdated Show resolved Hide resolved
Scalar.Common/Maintenance/ConfigStep.cs Outdated Show resolved Hide resolved
Scalar.Common/Maintenance/ConfigStep.cs Show resolved Hide resolved
Scalar.Common/Maintenance/ConfigStep.cs Show resolved Hide resolved
Scalar.Common/Maintenance/ConfigStep.cs Outdated Show resolved Hide resolved
Scalar.Common/Git/GitVersion.cs Outdated Show resolved Hide resolved
Copy link
Member

@mjcheetham mjcheetham left a comment

Choose a reason for hiding this comment

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

LGTM minus one micro-optimisation :)

Scalar.Common/Git/GitProcess.cs Outdated Show resolved Hide resolved
derrickstolee and others added 2 commits February 4, 2021 13:10
Co-authored-by: Matthew John Cheetham <[email protected]>
@derrickstolee derrickstolee merged commit f0e862e into microsoft:main Feb 5, 2021
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.

4 participants