Closed foundry-markf closed 3 months ago
Doing a commit and push to the upstream resolves this.
However, the initial impression is "What happaned?" when the recipe doesn't show at all.
Similarly, if the Git server to query is not contactable, you get this error:
Traceback (most recent call last):
File "F:\cruiz\src\cruiz\mainwindow.py", line 458, in _open_recipe
self.load_recipe(pathlib.Path(conan_file_path))
File "F:\cruiz\src\cruiz\mainwindow.py", line 432, in load_recipe
recipe_widget = RecipeWidget(recipe_path, recipe_uuid, wizard.local_cache)
File "F:\cruiz\src\cruiz\recipe\recipewidget.py", line 358, in __init__
self._create_statusbar()
File "F:\cruiz\src\cruiz\recipe\recipewidget.py", line 586, in _create_statusbar
self._refresh_statusbar()
File "F:\cruiz\src\cruiz\recipe\recipewidget.py", line 590, in _refresh_statusbar
head_sha = self._git_repository.head.object.hexsha
File "F:\conan\library_env310\lib\site-packages\git\refs\symbolic.py", line 219, in _get_object
return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
File "F:\conan\library_env310\lib\site-packages\git\objects\base.py", line 94, in new_from_sha
oinfo = repo.odb.info(sha1)
File "F:\conan\library_env310\lib\site-packages\git\db.py", line 40, in info
hexsha, typename, size = self._git.get_object_header(bin_to_hex(binsha))
File "F:\conan\library_env310\lib\site-packages\git\cmd.py", line 1383, in get_object_header
return self.__get_object_header(cmd, ref)
File "F:\conan\library_env310\lib\site-packages\git\cmd.py", line 1370, in __get_object_header
return self._parse_object_header(cmd.stdout.readline())
File "F:\conan\library_env310\lib\site-packages\git\cmd.py", line 1329, in _parse_object_header
raise ValueError("SHA could not be resolved, git returned: %r" % (header_line.strip()))
ValueError: SHA could not be resolved, git returned: b''
The recipe fails to load (silently), but you can see the error on the console
Tested in 1.4.0.a4.dev7