Skip to content

Something went wrong when checking out illinker/cecil #1230

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

Closed
tmds opened this issue Sep 17, 2019 · 5 comments
Closed

Something went wrong when checking out illinker/cecil #1230

tmds opened this issue Sep 17, 2019 · 5 comments
Assignees

Comments

@tmds
Copy link
Member

tmds commented Sep 17, 2019

The sha exists in mono/linker, so may be an issue in Darc or LibGit2Sharp.

  fail: Microsoft.DotNet.Darc.Operations.Operation[0]
        Something failed while cloning.
  System.Exception: Something went wrong when checking out 1127689f262d52ea8ff68ef03d706fa62b3b40a1 in /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1
   ---> System.InvalidOperationException: Sequence contains no matching element
     at System.Linq.ThrowHelper.ThrowNoMatchException()
     at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
     at Microsoft.DotNet.DarcLib.LocalGitClient.CleanRepoAndSubmodules(Repository repo, ILogger log) in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/DarcLib/LocalGitClient.cs:line 427
     at Microsoft.DotNet.DarcLib.LocalGitClient.Checkout(String repoDir, String commit, Boolean force) in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/DarcLib/LocalGitClient.cs:line 308
     --- End of inner exception stack trace ---
     at Microsoft.DotNet.DarcLib.LocalGitClient.Checkout(String repoDir, String commit, Boolean force) in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/DarcLib/LocalGitClient.cs:line 347
     at Microsoft.DotNet.DarcLib.Local.Checkout(String commit, Boolean force) in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/DarcLib/Actions/Local.cs:line 144
     at Microsoft.DotNet.Darc.Operations.CloneOperation.HandleRepoAtSpecificHash(String repoPath, String commit, String masterRepoGitDirPath, ILogger log) in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/Darc/Operations/CloneOperation.cs:line 218
     at Microsoft.DotNet.Darc.Operations.CloneOperation.ExecuteAsync() in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/Darc/Operations/CloneOperation.cs:line 106
@tmds
Copy link
Member Author

tmds commented Sep 17, 2019

More logging:

  dbug: Microsoft.DotNet.Darc.Operations.Operation[0]
        Trying safe checkout of /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1/ at 1127689f262d52ea8ff68ef03d706fa62b3b40a1
  dbug: Microsoft.DotNet.Darc.Operations.Operation[0]
        Beginning clean of /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1/ and 1 submodules
  dbug: Microsoft.DotNet.Darc.Operations.Operation[0]
        Deleted 0 untracked files
  dbug: Microsoft.DotNet.Darc.Operations.Operation[0]
        Submodule cecil in /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1/external/cecil does not appear to be initialized (no file at /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1/external/cecil/.git), attempting to initialize now.
  dbug: Microsoft.DotNet.Darc.Operations.Operation[0]
        Submodule cecil in /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1/external/cecil is already initialized, trying to adopt from super-repo /home/tmds/repos/source-build/.git/modules/src/linker.git/
  dbug: Microsoft.DotNet.Darc.Operations.Operation[0]
        Writing .gitdir redirect /home/tmds/repos/source-build/.git/modules/src/linker.git/modules/external/cecil to /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1/external/cecil/.git
  dbug: Microsoft.DotNet.Darc.Operations.Operation[0]
        Beginning clean of submodule cecil in /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1/external/cecil
  dbug: Microsoft.DotNet.Darc.Operations.Operation[0]
        /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1/external/cecil old worktree is /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1/external/cecil, setting to /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1/external/cecil
  dbug: Microsoft.DotNet.Darc.Operations.Operation[0]
        Resetting cecil to cb6c1ca9aaef869841bfc3e2e7407b81b979b875
  fail: Microsoft.DotNet.Darc.Operations.Operation[0]
        Something failed while cloning.
  System.Exception: Something went wrong when checking out 1127689f262d52ea8ff68ef03d706fa62b3b40a1 in /home/tmds/repos/source-build/bin/src/linker.1127689f262d52ea8ff68ef03d706fa62b3b40a1
   ---> System.InvalidOperationException: Sequence contains no matching element
     at System.Linq.ThrowHelper.ThrowNoMatchException()
     at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
     at Microsoft.DotNet.DarcLib.LocalGitClient.CleanRepoAndSubmodules(Repository repo, ILogger log) in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/DarcLib/LocalGitClient.cs:line 427
     at Microsoft.DotNet.DarcLib.LocalGitClient.Checkout(String repoDir, String commit, Boolean force) in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/DarcLib/LocalGitClient.cs:line 308
     --- End of inner exception stack trace ---
     at Microsoft.DotNet.DarcLib.LocalGitClient.Checkout(String repoDir, String commit, Boolean force) in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/DarcLib/LocalGitClient.cs:line 347
     at Microsoft.DotNet.DarcLib.Local.Checkout(String commit, Boolean force) in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/DarcLib/Actions/Local.cs:line 144
     at Microsoft.DotNet.Darc.Operations.CloneOperation.HandleRepoAtSpecificHash(String repoPath, String commit, String masterRepoGitDirPath, ILogger log) in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/Darc/Operations/CloneOperation.cs:line 218
     at Microsoft.DotNet.Darc.Operations.CloneOperation.ExecuteAsync() in /home/tmds/repos/source-build/tools-local/arcade-services/src/Microsoft.DotNet.Darc/src/Darc/Operations/CloneOperation.cs:line 106

-> the issue seems to occur when handling the external/cecil submodule

@tmds
Copy link
Member Author

tmds commented Sep 17, 2019

the issue seems to occur when handling the external/cecil submodule

It looks like this is using /source-build/.git/modules/src/linker.git/modules/external/cecil, which is at an older version:

commit a6c8f5e1070d25c38cbfaa415d6f6853e5236687 (HEAD, origin/master, master)
Merge: b6000d6 fcf446f
Author: Marek Safar <[email protected]>
Date:   Thu May 23 13:36:10 2019 +0200

    Merge remote-tracking branch 'upstream/master'

and doesn't have the commit being checked out:

$ git show cb6c1ca9aaef869841bfc3e2e7407b81b979b875
fatal: bad object cb6c1ca9aaef869841bfc3e2e7407b81b979b875

@tmds tmds changed the title Something went wrong when checking out Something went wrong when checking out illinker/cecil Sep 17, 2019
@tmds
Copy link
Member Author

tmds commented Sep 17, 2019

I removed my source-build folder, and started from a fresh clone, and now it works.

@dseefeld
Copy link
Contributor

@crummel to follow up with darc to either eliminate or upgrade libgit2sharp

@tmds
Copy link
Member Author

tmds commented Sep 19, 2019

@crummel I'll close this. Was there some way to update the modules without doing a fresh clone?

@tmds tmds closed this as completed Sep 19, 2019
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

No branches or pull requests

3 participants