Skip to content

Bug: if one .gd file has a @Chapter and @Section but another doesn't an unhelpful error is raised #279

@fingolfin

Description

@fingolfin

We edited a package to add @Chapter and @Section to one .gd file (before there was only an auto-generated chapter, with auto-generated sections.

This lead to a really unhelpful error:

Generating documentation in Directory("/Users/mhorn/Projekte/GAP/repos/pkg/gap-packages/N\
autyTracesInterface/doc/")
Error, Record Element: '<rec>.Chapter_NautyTracesInterface_automatic_generated_documentation_Sec\
tion_NautyTracesInterface_automatic_generated_documentation_of_methods' must have an assi\
gned value in
  Add( tree!.nodes_by_label.(context), group
 ); at /Users/mhorn/Projekte/GAP/repos/pkg/gap-packages/AutoDoc/gap/DocumentationTree.gi:\
290 called from
DocumentationGroup( tree, GroupName( node ), chapter_info
 ) at /Users/mhorn/Projekte/GAP/repos/pkg/gap-packages/AutoDoc/gap/DocumentationTree.gi:3\
29 called from
Add( tree, man_item
 ); at /Users/mhorn/Projekte/GAP/repos/pkg/gap-packages/AutoDoc/gap/Parser.gi:216 called from
add_man_item(
 ); at /Users/mhorn/Projekte/GAP/repos/pkg/gap-packages/AutoDoc/gap/Parser.gi:344 called from
Scan_for_Declaration_part(
 ) at /Users/mhorn/Projekte/GAP/repos/pkg/gap-packages/AutoDoc/gap/Parser.gi:897 called from
AutoDoc_Parser_ReadFiles( files_to_scan, tree, default_chapter_record
 ); at /Users/mhorn/Projekte/GAP/repos/pkg/gap-packages/AutoDoc/gap/AutoDocMainFunction.g\
i:344 called from
...  at makedoc.g:10
type 'quit;' to quit to outer loop

This doesn't help at all in figuring out what is wrong, and where it is wrong.

  • there should be a helpful error
  • there should aso be an indication which file we are parsing and which line (just as GAPDoc outputs)
  • and in this case, it is not even clear to me why there is an error in the first place, so perhaps we can also make it not-error here. But that's a separate topic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions