-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Visit github issue with forge without cloning entire repo #55
Comments
It looks like consult-gh-forge--issue-view would need modified somehow. |
@ParetoOptimalDev Can you please elaborate? Currently, |
When I tried using it on the nixpkgs repo it hung, but maybe it just took longer than I expected for the bare repo. Will check again. |
@ParetoOptimalDev Can you please share the name of the repo and the issue number you were trying to load? Sometimes if there are a lot of comments and posts under an issue it can take some time to load it, which has nothing to do with This 917 comments, and the browser only loads about 50 of them! I can still open this in consult-gh using forge but it takes several seconds to load. If you do this often, then you need to increase the value of There are of course ways to improve the behavior to load a limited number of entries, but if you are using forge to view the issues, that has to happen in forge (which probably does not make sense since forge uses local database anyway) and not in |
I just replicated using this issue: I got to it by using I did notice that when using Edit: Here is a debug trace using debug on quit during the "hang":
|
Nevermind, I have an issue with forge. Perhaps my version of forge isn't updated for emacs 29:
|
It also has a similar hang even after fully cloning the repo, but really leaning towards this being a forge or forge on emacs 29 issue. |
@ParetoOptimalDev Yes, I just tested with that same issue (NixOS/nixpkgs#253198) and it works just fine. Here is a screenshot for reference: I am also on Emacs >29. There must be something with your forge setup that is causing this.I am closing this issue for now. |
I just verified using
The value of A fix that would likely work for me is: (defun consult-gh-forge--add-topic (url topic)
"Add a repository to the forge database and only
pull individual topics when the user invokes `forge-pull-topic'. see forge documentation for `forge-add-repository'."
(cl-letf (((symbol-function #'magit-toplevel)
(lambda () (consult-gh--make-tempdir (string-join (cdr (forge--split-url url)) "/")))
))
(let ((created (consult-gh-forge--add-repository url))
(repo (forge-get-repository url)))
(while (not repo)
(sit-for 0.0001)
- (setq repo (forge-get-repository url)))
+ (setq repo (forge-get-repository url nil nil)))
(consult-gh-forge--pull-topic url topic)
created
))) |
After deleting the repo from forge and recreating it I can no longer reproduce this issue. |
This issue was resolved by doing |
Nevermind... I know the problem! It only does a sparse clone the first time. The next time you call |
This is supported as per magit/forge#102, but it's not quite straight-forward or provided in a single function. It doesn't seem too difficult to add though given consult-gh will have the info to correctly call both
forge-add-repostiory
and if it supports it, providing the topic id from the consult-gh search.The text was updated successfully, but these errors were encountered: