Group Abstract Group Abstract

Message Boards Message Boards

7
|
11.2K Views
|
16 Replies
|
18 Total Likes
View groups...
Share
Share this post:

Cannot generate paclet documentation due to crash Mathematica 13.0

POSTED BY: Martijn Froeling
16 Replies
POSTED BY: Sjoerd Smit
POSTED BY: Connor Gray

Thanks! I will give the HTML build another try!

Yes, I'm on Windows:
Edition Windows 10 Enterprise
Version 21H2
OS build 19044.1466
Windows Feature Experience Pack 120.2212.3920.0

POSTED BY: Martijn Froeling
POSTED BY: Martijn Froeling
Posted 3 years ago

Hi Martijn,

I'm glad to see that the build experience has improved for you. There were a number of FrontEnd issue addressed in v13.1; it seems likely that one or more of them may have contributed to the crashes you experienced. The DeleteFile operations are unknown to me, but the Pick[..] messages are an issue I've run into before that occurs when the grid options in one of the 'Usage' sections at the top of a symbol reference page are not formed correctly. I don't have a correct example available off-hand, but you might try re-creating the notebook that is generating those messages; it's likely whatever is wrong was simply an accidentally deleted part of the typesetting of the usage message.

It's on my list to improve that error message in the future.

POSTED BY: Updating Name

I'll give that a try. I indeed remember there was an issue with the formatting of multi-line usage messages using the documentation palette. I'll see if that has changed in the new release and let you know if it will work.

Tnx!

POSTED BY: Martijn Froeling

I have rebuild de documentation pages using the palet, which now solves the errors and the issue I had before using that. This indeed removed the error I had before but now new weird things happen.

enter image description here

The errors keep coming and are not suppressed by the frontend (4 per page so over 2500), and they did break the frontend twice, but not every time. With Quiet@ it seems more stable.

If the build completes the pages that come out of it doesn't seem to be formatted correctly. Left is the page generated by the documentation palet, right is the page that comes from using PacletDocumentationBuild[paclet, buildDir].

enter image description here

The HTML build I haven't been able to complete now but will give it another try later.

I did commit the new doc pages to my git if you want to see what's going on.

POSTED BY: Martijn Froeling

After doing some comparison i noticed that for the old and new generated and template Guide and Function pages indeed the header of the documents has changed. The Meta information is now at the bottom but at the top of the pages the "New Modified etc." line is indeed missing.

enter image description here

enter image description here

POSTED BY: Martijn Froeling

Hi Martijn, I'm sorry you've run into this issue. A fix for this is now available in the form of PacletTools v0.0.12, which was released on Monday as an automatic paclet update.

You can check if v0.0.12 has already been installed automatically using PacletObject["PacletTools"]["Version"]. If the installed version is less than v0.0.12, then you can trigger the update mechanism using PacletInstall["PacletTools"].

v0.0.12 contains fixes for the GetNotebookHistoryData bug shown above, and an issue with building the new authoring notebook format. EDIT: To be clear, the build issue with the new authoring notebook is exactly the issue shown in your screenshot of AnisoFilterTensor — that is also fixed in PacletTools v0.0.12.

Please let me know if you run into further issues. I appreciate your patience.

POSTED BY: Connor Gray

Awesome! will give it a try!

Tnx for the swift update. Will let you know how things work out.

POSTED BY: Martijn Froeling

Everything seems to work as intended! It also seems a bit quicker, building 700 pages in ~10 min where it used to be almost 20.

Thanks for all the help

enter image description here

POSTED BY: Martijn Froeling

Hi Conner,

Today I tried to also rebuild my HTML documentation after the successful completion of the normal documentation build. However the issue that was there with the errors related to the new layout of the template files that was fixed for the normal documentation is still there for the HTML build.

enter image description here

POSTED BY: Martijn Froeling

Hi Martijn, I'm the primary developer of the PacletTools package. I'm sorry to hear that you've been having trouble with PacletDocumentationBuild. As you mentioned, it's still quite new and experimental, so there are some aspects of the UX that are not yet as polished as they could be — the lack of incremental rebuilds being a big one.

Incremental rebuilds are coming to PacletDocumentationBuild, likely for 13.1. However, for now, I'll describe a workaround that should mitigate both the slow builds and the crash.

PacletDocumentationBuild is partly a wrapper around our DocumentationBuild` package (which long-time users of the Workbench may recognize). If you use the lower-level DocumentationBuildNotebooks function directly, you can more precisely control which files get built:

Needs["DocumentationBuild`"]

DocumentationBuildNotebooks[
    (* Input directory. *)
    "~/path/to/QMRITools/Documentation",
    (* Output directory. Pick any location you'd prefer *)
    "~/Desktop/QMRIToolsDocumentation",
    (* Predicate function to filter which files to build.
        E.g., build only the CardiacTools and DenoiseTools guides *)
    StringContainsQ[#, "CardiacTools.nb" | "DenoiseTools.nb"] &
 ]

This should allow you to more quickly check changes to the documentation page you are currently working on, while avoiding re-building all the files you don't care about at that moment.

PacletDocumentationBuild[ , , "HTML"] also consistently crashes Mathematica between 400 and 500 function pages build.

The first step in building the HTML documentation is building the notebook documentation, so this likely crashes for the same reason.

I'm attempting to reproduce the crash locally, and I'll let you know what I'm able to find. For now, you may be able to narrow down which file is causing the crash by evaluating:

DocumentationBuildNotebooks[
    "~/path/to/QMRITools/Documentation",
    "~/Desktop/QMRIToolsDocumentation",
    Function[path,
        Print["Building: ", path];
        True
    ]
 ]

and making note of what the last printed file name is (and if it's even the same file every time).


EDIT: I just noticed that the QMRITools repository on GitHub doesn't appear to contain the full ~600 function pages mentioned in the description. Would it be possible for you to commit those to a branch that you could share with me? I've also reached out internally to our DocumentationTools team.

POSTED BY: Connor Gray

Hi Conor,

Awesome! thanks for the feedback, very helpfull. With this, I'm sure I can make it work!

I normally don't commit the function pages since they are automatically generated (either by workbench or the documentation pallette). I'm committing them now to the main branch so you should be able to find them now.

EDIT: additional note. not all pages look pretty since the function that generates them still had some issues and the workaround for that was to much work to fix .

If I find out where and for which file stuff crashes I will let you know.

POSTED BY: Martijn Froeling

Ok with these functions it seems to work. I saw that DocunmentationBuild also exposes DocumentationBuildHTML, so tried it as well.

Needs["DocumentationBuild`"]
dir = "D:\\werk\\workspace\\QMRITools\\QMRITools";

name = Last@FileNameSplit[dir];

guideDir = FileNameJoin[{"Documentation", "English", "Guides"}];
symDir = FileNameJoin[{"Documentation", "English", "ReferencePages", 
    "Symbols"}];

buildDirGuide = FileNameJoin[{"build", name, guideDir}];
buildDirSym = FileNameJoin[{"build", name, symDir}];

docDir = "Documentation";
buildDirHTML = FileNameJoin[{"build", name <> "-html"}];

The documentation notebooks build just fine did it 3 times to be sure.

DocumentationBuildNotebooks[FileNameJoin[{dir, guideDir}], 
  FileNameJoin[{dir, buildDirGuide}]];

DocumentationBuildNotebooks[FileNameJoin[{dir, symDir}], 
  FileNameJoin[{dir, buildDirSym}]];

enter image description here

The HTML build not so much.

DocumentationBuildHTML[FileNameJoin[{dir,docDir}],FileNameJoin[{dir,buildDirHTML}]];

enter image description here enter image description here

The same as I got with the Packet functions the crash is not predictable at a certain file but at random.

For now, this is great since I can rebuild my documentation again and with the upcoming updates, I'm sure the HTML will be there as well.

POSTED BY: Martijn Froeling

Very much agree on the rebuilding of documentation when you only change some code files. PacletBuild should be smart enough to figure out that documentation notebooks don't need rebuilding in that situation. A simple file hash or something like that should take care of it. It should also have an option to wipe the old build and start from scratch (in case you want to be thorough).

Also: PacletTest is basically unusable in it's current form since it only works if you add the extension:

{"Tests", "Root" -> "./Tests", Method -> "Experimental-v1"}

No one is going to figure that out by themselves without expecting the source code.

POSTED BY: Sjoerd Smit
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard