Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

GitHub extension stopped reporting progress when cloning from the Start Page #2196

Closed
prasethu opened this issue Jan 23, 2019 · 3 comments
Closed
Labels
Milestone

Comments

@prasethu
Copy link

In all recent versions of the GitHub extension, I've noticed that a clone from the Start Page does not show progress on the status bar of Visual Studio.

On debugging the Clone API call in Team Explorer I found that a null IProgress was being sent and hence progress cannot be reported.

We're planning to add this feature to the Start Window and this lack of progress will cause experience gaps.

@prasethu
Copy link
Author

prasethu commented Jan 23, 2019

@jcansdale / @meaghanlewis looping you in based on the history of this repo 😄 I think @shana worked on the original implementation.

I'm on the VS team and noticed this on the debugger. I think progress is currently broken in the clone api that the GitHub extension calls, so if you could validate that when IProgress passed to the clone API is non-null, that would help a lot.

This is the file where a Code Container Provider is declared: VisualStudio/src/GitHub.StartPage/StartPagePackage.cs

I'm happy to talk more if needed.

//cc: @prnadago

@jcansdale
Copy link
Collaborator

Hi @prasethu,

I disabled this when working on a VS 2019 compatible version before the VS preview was out.

#if TEAMEXPLORER14
await StartClonenOnConnectPageAsync(teamExplorer, cloneUrl, clonePath, recurseSubmodules);
NavigateToHomePage(teamExplorer); // Show progress on Team Explorer - Home
await WaitForCloneOnHomePageAsync(teamExplorer);
#elif TEAMEXPLORER15 || TEAMEXPLORER16
// The ServiceProgressData type is in a Visual Studio 2019 assembly that we don't currently have access to.
// Using reflection to call the CloneAsync in order to avoid conflicts with the Visual Studio 2017 version.
// Progress won't be displayed on the status bar, but it appears prominently on the Team Explorer Home view.
var gitExt = serviceProvider.GetService<IGitActionsExt>();
var cloneAsyncMethod = typeof(IGitActionsExt).GetMethod(nameof(IGitActionsExt.CloneAsync));
Assumes.NotNull(cloneAsyncMethod);
var cloneParameters = new object[] { cloneUrl, clonePath, recurseSubmodules, null, null };
var cloneTask = (Task)cloneAsyncMethod.Invoke(gitExt, cloneParameters);
NavigateToHomePage(teamExplorer); // Show progress on Team Explorer - Home
await cloneTask;
#endif

Now that I've got the VS 2019 assemblies to target, I should be able to reinstate it. 🤞 I'll keep you posted!

@prasethu
Copy link
Author

Thanks @jcansdale ! There's a chance that this experience will ship in the next preview, so if you could make this work and build me a private VSIX I can try it on my side.

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

No branches or pull requests

3 participants