Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

builddocsearchdb throws an error when building custom toolbox documentation #144

Open
po09i opened this issue Jun 19, 2020 · 2 comments
Open

Comments

@po09i
Copy link
Member

po09i commented Jun 19, 2020

builddocsearchdb throws an error the first time the custom toolbox documentation is built if you are on the same folder as info.xml. Current way to fix it is restarting matlab and launching the doc again or rmPath/addPath by going to another folder first.

To reproduce :
open Matlab

startup
FileList = genToolboxHelp('PATH_TO_SHIMMING_TOOLBOX', 'shimming-toolbox', {'doc', 'docs'}, false, true)

Quitting matlab and rerunning the commands above fixes the issue.

Then to reproduce, delete these files

doc/helptoc.xml

and run the commands again.

@po09i
Copy link
Member Author

po09i commented Jun 22, 2020

More investigation concluded that the paths need to be updated in a specific way :
The following code does not work when ran the normal way using the above procedure however, it does work if adding a breakpoint on the addpath line and continuing the execution. (This also means that doing the each lines manually works)

%% 6) Create a searchable toolbox help database
% Can be used to search for keywords in your published .m-files
fprintf('**********Searchable database generation: **********\n')
if createDB
    cd ..
    rmpath(genpath('shimming-toolbox'))
    addpath(genpath('shimming-toolbox'))
    cd shimming-toolbox
    builddocsearchdb(pathHelpTOC);
end

It seems like Matlab needs to stop running so that it can register that the paths have updated. Using rehash does not work. Any Ideas?

@jcohenadad
Copy link
Member

hum, that's annoying. However, following on a previous discussion (shimming-toolbox/shimming-toolbox#133 (comment)), maybe we can put this issue on hold for now?

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

No branches or pull requests

2 participants