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

nullref in GitRepoMetadataProvider.FindMergeBase #1230

Closed
SimonCropp opened this issue Jun 7, 2017 · 10 comments · Fixed by #1237
Closed

nullref in GitRepoMetadataProvider.FindMergeBase #1230

SimonCropp opened this issue Jun 7, 2017 · 10 comments · Fixed by #1237

Comments

@SimonCropp
Copy link
Contributor

SimonCropp commented Jun 7, 2017

this is with current the current master as at 30f413a

Still trying to grok why. but here is the debug state to start with. seems Repository.ObjectDatabase.FindMergeBase returned null

image

and here is the trace

Severity	Code	Description	Project	File	Line	Suppression State
Warning		WARN [06/08/17 8:03:16:07] Could not determine assembly version: System.NullReferenceException: Object reference not set to an instance of an object.
   at GitVersion.GitRepoMetadataProvider.FindMergeBase(Branch branch, Branch otherBranch)
   at GitVersion.GitRepoMetadataProvider.<>c__DisplayClass13_0.<GetMergeCommitsForBranch>b__0(Branch otherBranch)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at GitVersion.GitRepoMetadataProvider.GetMergeCommitsForBranch(Branch branch)
   at GitVersion.GitRepoMetadataProvider.FindCommitBranchWasBranchedFrom(Branch branch, Branch[] excludedBranches)
   at GitVersion.BranchConfigurationCalculator.InheritBranchConfiguration(GitVersionContext context, Branch targetBranch, BranchConfig branchConfiguration, IList`1 excludedInheritBranches)
   at GitVersion.BranchConfigurationCalculator.GetBranchConfiguration(GitVersionContext context, Branch targetBranch, IList`1 excludedInheritBranches)
   at GitVersion.GitVersionContext.CalculateEffectiveConfiguration()
   at GitVersion.GitVersionContext..ctor(IRepository repository, Branch currentBranch, Config configuration, Boolean onlyEvaluateTrackedBranches, String commitId)
   at GitVersion.ExecuteCore.<>c__DisplayClass6_0.<ExecuteInternal>b__0(IRepository repo)
   at GitVersion.GitPreparer.WithRepository[TResult](Func`2 action)
   at GitVersion.ExecuteCore.ExecuteInternal(String targetBranch, String commitId, GitPreparer gitPreparer, IBuildServer buildServer, Config overrideConfig)
   at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig, Boolean noCache)
   at GitVersion.ExecuteCore.TryGetVersion(String directory, VersionVariables& versionVariables, Boolean noFetch, Authentication authentication)	NServiceBus.Log4Net		1	

@SimonCropp
Copy link
Contributor Author

SimonCropp commented Jun 7, 2017

so seems adding

if (mergeBase != null)
{
     Logger.WriteDebug("New Merge base " + mergeBase.Sha);
}

and letting the loop fall out, results in the correct version number.

do u want a PR for that?

@asbjornu
Copy link
Member

asbjornu commented Jun 8, 2017

@SimonCropp: Yes, that would be nice. A warning that no merge base was found should also probably be written, no?

@SimonCropp
Copy link
Contributor Author

@JakeGinnivan polite request for a release ;)

@SimonCropp
Copy link
Contributor Author

@asbjornu @gep13 @pascalberger can we get a release of this?

Also as an aside any eta on the next stable release?

@tpluscode
Copy link

Has this been released? I've been seeing this too.

Also, weirdly, I get this locally but not on AppVeyor 🤔

@asbjornu
Copy link
Member

Yes, as a99f256 shows, this should be in v4.0.0-beta.13.

@bording
Copy link
Contributor

bording commented May 23, 2018

@asbjornu The latest release on nuget.org is 4.0.0-beta0012. Beta 13 was never released.

@asbjornu
Copy link
Member

@bording: Aha. We need to get a move on #1338. Any help with making the release process 99% automated is highly appreciated.

@bording
Copy link
Contributor

bording commented May 23, 2018

@asbjornu Is the mean time, would it be possible to manually release a new package? In fact, I'd like to see a beta 14 released that incorporates the latest changes. Beta 13 was tagged before a lot of important changes.

@asbjornu
Copy link
Member

@bording: I would love to, I just don't understand how. If I did, I would have made many releases already.

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 a pull request may close this issue.

4 participants