I’ve migrated to v2 on Saturday. The migration itself went well, but then I had issues with org-roam-db-sync hanging after processing some percentage of the files (always 7%) (despite org-roam-migrate-wizard processing all the files alright the first time). After spending a lot of time on this, here’s where I am right now:
Run doom sync. Run emacs.
Then it’s hanging seemingly forever. Or maybe just for a long time, I’ve seen it finish initialization after 20 minutes yesterday (but then, same issue with org-roam-db-sync). Right now it’s probably been at least 45 minutes. I know I’m not on native-comp but feels a bit lengthy.
However, if I follow the instructions here, i.e. don’t use Doom Emacs, everything works well. I can even run org-roam-db-sync on my entire collection without an issue.
But thanks for reminding me of that flag. I’ll try it soon, in case it works this way, but if it does I would still be puzzled by the current behavior.
If you use the package! to get the program files from GitHub like you do, I guess it does not pull all the dependencies – I can be wrong so I suggest that you ensure that it has pulled all the dependencies.
If you don’t set it to use GitHub, then it should switch to using MELPA, which should also pull all the dependencies together – again, sorry I don’t use doom so please validate what I am saying here on your end.
The key thing that you should make sure is that all the packages required to run Org-roam have been correctly installed.
See this part of README in Org-roam repository on GitHub:
package! does not do anything to configure the library. I think this is clearly documented in doom’s documentation. Use something like use-package!. I think if you look at this forum, or doom’s Discord, you will see a sample configuration by someone else.
One common mistake I have seen is related to (setq org-roam-v2-ack t). It needs to be set before org-roam is loaded (e.g. by require), so it needs to be set in the :init part of use-package!.
If this confuses you, I suggest you stick with the +roam2 flag – it should take care of org-roam-v2-ack and other things for you – but you still need to fix the package! part for installation. Installation and configuration are two different things.
I’m sorry, I mistyped my first post with (package! org-roam) in .doom.d/config.el, I was already using (use-package! org-roam). I’ve edited the initial post.
So I also tried the exact recipe given in the README:
(previously I wasn’t using :files, as I was simply keeping my old v1 config and hadn’t looked at the new instructions).
But it didn’t change anything (same issue after running doom sync -u)
(org +roam2) in .doom.d/init.el works fine.
I think you’re right, it’s probably an issue of missing dependencies. Especially since, now that I think about it, my initial issue got worse as I was trying to isolate it (by removing the rest of my config). I assumed that the package! macro pulled dependencies somehow, but I don’t find this (or the contrary) documented anywhere. Maybe that wasn’t a safe assumption. I’m not going to investigate further though.
Thanks for your help! I’ll be using the +roam2 flag for the time being.