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

Introduce GlobalSettings.Version #726

Closed
nulltoken opened this issue May 30, 2014 · 10 comments
Closed

Introduce GlobalSettings.Version #726

nulltoken opened this issue May 30, 2014 · 10 comments

Comments

@nulltoken
Copy link
Member

Once #717 is merged, how about introducing GlobalSettings.Version?

This would be a type exposing several properties

  • Version MinorMajorPatch { get; }
  • Features BuiltInFeatures { get; }
  • string LibGit2CommitSha { get; }
  • string LibGit2SharpCommitSha { get; }
  • string CpuArchitecture { get; }

The ToString() method would be overriden to produce what Repository.Version outputs nowadays.

Repository.Version would be deprecated in favor of this new type.

Thoughts?

@carlosmn
Copy link
Member

Is the CPU arch of libgit2(sharp) going to be different than the one you can get from the runtime?

@ethomson
Copy link
Member

On that topic, is the version number that's baked in going to be different from the version stamped into the DLL itself?

@nulltoken
Copy link
Member Author

Is the CPU arch of libgit2(sharp) going to be different than the one you can get from the runtime?

I was thinking x86 or amd64. This would help us figure out which binary version is being used. But you're right, that rather relies on the bitness of the process rather than the CPU arch.

Would you think of a better name?

@nulltoken
Copy link
Member Author

@ethomson: It will be retrieved through

Assembly assembly = typeof(Repository).Assembly;

Version version = assembly.GetName().Version;

@Therzok
Copy link
Member

Therzok commented May 31, 2014

Why do we have CpuArchitecture as a string? Shouldn't we simply do Environment.Is64BitProcess?

http://msdn.microsoft.com/en-us/library/system.environment.is64bitprocess(v=vs.110).aspx

@nulltoken
Copy link
Member Author

@Therzok You're right. That may make no sense to actually expose this property, provided the x86|amd64 is rendered through the ToString() call.

@Therzok
Copy link
Member

Therzok commented Jun 3, 2014

Also, why would the Version return BuiltInFeatures?

@Therzok
Copy link
Member

Therzok commented Jun 3, 2014

BuildInFeatures is already a member of GlobalSettings.

@nulltoken
Copy link
Member Author

GlobalSettings.Features() would be deprecated in favor of GlobalSettings.Version.BuiltInFeatures

@nulltoken
Copy link
Member Author

Fixed in vNext

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

No branches or pull requests

4 participants