Developer Docs Should have Function -> Header Mapping #931

Open
opened 2025-07-26 08:39:31 +00:00 by blitz · 5 comments

Problem

When trying to develop against the C++ API, the only way to find out what header I should include is by grepping through the libraries' headers or guessing from other projects using the API (nix-eval-jobs).

Proposal

For each type/function, the Doxygen developer docs should list which header defines it. A good example is the C++ reference: https://en.cppreference.com/w/cpp/algorithm/for_each.html

Some other ideas to consider:

  • a high-level description of what each of the libraries scope is to give a bit of a mental model of what is in which library
  • a version of the developer docs published on the web

Checklist

## Problem When trying to develop against the C++ API, the only way to find out what header I should include is by grepping through the libraries' headers or guessing from other projects using the API (nix-eval-jobs). ## Proposal For each type/function, the Doxygen developer docs should list which header defines it. A good example is the C++ reference: https://en.cppreference.com/w/cpp/algorithm/for_each.html Some other ideas to consider: - a high-level description of what each of the libraries scope is to give a bit of a mental model of what is in which library - a version of the developer docs published on the web - ## Checklist <!-- make sure this issue is not redundant or obsolete --> - [x] checked [latest Lix manual] or its [source code] - [x] checked [documentation issues] and [recent documentation changes] for possible duplicates [latest Lix manual]: https://docs.lix.systems/manual/lix/nightly [source code]: https://git.lix.systems/lix-project/lix/src/main/doc/manual/src [documentation issues]: https://git.lix.systems/lix-project/lix/issues?labels=151&state=all [recent documentation changes]: https://gerrit.lix.systems/q/p:lix+path:%22%5Edoc/manual/.*%22
Owner

FYI that API is highly unstable and you can use it at your own peril of dealing with the changes; the most effective way is to develop against lix HEAD.

As for the other ideas, I think there might be some bugs for those already but they're unlikely to happen without some help from others.

However, are you suggesting there's a wrong doxygen config setting we can fix to actually show the header names? I'm missing some exact context of what's wrong because I think most of our team doesn't use these at all and just reads the headers directly.

FYI that API is highly unstable and you can use it at your own peril of dealing with the changes; the most effective way is to develop against lix HEAD. As for the other ideas, I think there might be some bugs for those already but they're unlikely to happen without some help from others. However, are you suggesting there's a wrong doxygen config setting we can fix to actually show the header names? I'm missing some exact context of what's wrong because I think most of our team doesn't use these at all and just reads the headers directly.
Owner

@jade yep, the idea is to show which header to include to get access to certain items. I think this is a Doxygen config problem or maybe a Doxygen limitation, we need to look into it.

@jade yep, the idea is to show which header to include to get access to certain items. I think this is a Doxygen config problem or maybe a Doxygen limitation, we need to look into it.
Author

Yes, if there is a setting that shows which header defines a class/function that would be really helpful!

Yes, if there is a setting that shows which header defines a class/function that would be really helpful!
Owner

we could just enable that setting. if you know how to do it, CLs are always welcome!

we could just enable that setting. if you know how to do it, CLs are always welcome!
Owner

@blitz wrote in #931 (comment):

Yes, if there is a setting that shows which header defines a class/function that would be really helpful!

Most likely we'll not go looking for one in the medium term as we don't use the doxygen much but if it's important to you please feel free to look at the doxygen docs; you probably know as much or more than us about how it works and we'll gladly take a patch to simply fix the setting.

@blitz wrote in https://git.lix.systems/lix-project/lix/issues/931#issuecomment-13601: > Yes, if there is a setting that shows which header defines a class/function that would be really helpful! Most likely we'll not go looking for one in the medium term as we don't use the doxygen much but if it's important to you please feel free to look at the doxygen docs; you probably know as much or more than us about how it works and we'll gladly take a patch to simply fix the setting.
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#931
No description provided.