Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError when C++20 Concepts are present #1

Closed
jake-arkinstall opened this issue Apr 14, 2022 · 9 comments
Closed

AssertionError when C++20 Concepts are present #1

jake-arkinstall opened this issue Apr 14, 2022 · 9 comments

Comments

@jake-arkinstall
Copy link

MCSS, specifically the mcss fork that Poxy uses (the issues tab isn't present on the fork), compares each fundamental element type against a list (doxygen.py, line 3222) including struct, enum, etc. As concept isn't present, the chain of comparisons ends up at the else condition, which simply asserts False and crashes the entire documentation generation process.

I would appreciate concept generation being added, but I'm also happy for the else condition to simply ignore unknown element types (generating a warning instead of asserting False).

@marzer
Copy link
Owner

marzer commented Apr 14, 2022

Ooooh, exciting, a concepts-related bug! Thanks for the report. I'll have a look into it and try to come up with a workaround over the weekend.

@mosra
Copy link

mosra commented Apr 14, 2022

If it's rainy enough over the weekend, I could look into adding concepts support into m.css. Was one of my TODO items for Doxygen 1.9 support, apart from everything else in mosra/m.css#215.

No promises though :P

@marzer marzer closed this as completed in d63576a Apr 16, 2022
@marzer
Copy link
Owner

marzer commented Apr 16, 2022

@jake-arkinstall I've added a workaround for this in 0.5.5. Now if a C++20 concept is found during the XML preprocess it will be removed and a warning emitted:

Warning: C++20 concepts are not currently supported! No documentation will be generated for 'toml::is_pair'. Surround your concepts in a '@cond poxy_supports_concepts' block to suppress this warning until poxy is updated to support them.

If you do as the warning says and stick your concepts inside an appropriately labeled @cond block it should 'just work' whenever m.css supports concepts and I update poxy accordingly.

@jake-arkinstall
Copy link
Author

Astounding turnaround.

Hit me up if you set up github sponsors in future. Same to @mosra.

@marzer
Copy link
Owner

marzer commented Apr 17, 2022

@jake-arkinstall Oh, hey, I'm flattered! But honestly I don't think I'd ever bother with the whole sponsorship thing. My job pays me well enough to live a comfortable life, and the open-source bits+pieces I do on the side are pretty firmly in the realm of "bit of fun on the weekends", so they don't really need incentivizing.

Having said that, if you want to throw 5 bucks into a charity of your choice in my name, I won't try to stop you :)

@marzer
Copy link
Owner

marzer commented May 1, 2022

@mosra would you like an additional maintainer for m.css, at least for the doxygen part? I'd be willing to put my hand up for that, if so. Adding concepts seems like it would be fun, and I'm not yet too burned out on doxygen's (mis)behaviour 😅

@marzer
Copy link
Owner

marzer commented Sep 10, 2022

@wroyca since you're using modules it occurs to me that it's also very likely you'll be creating/using C++20's concept too - this issue is one you might want to be aware of

@wroyca
Copy link
Contributor

wroyca commented Sep 10, 2022

@wroyca since you're using modules it occurs to me that it's also very likely you'll be creating/using C++20's concept too - this issue is one you might want to be aware of

Thanks for the heads up! Concept aside, there is also the issue of doxygen not recognizing the new import, export, module keywords and thus incorrectly treating exports as variables. But then again, I knew what I was getting into with modules, so I don't mind :)

@marzer
Copy link
Owner

marzer commented Oct 3, 2022

@jake-arkinstall as of v0.9.0 support for C++20 concepts has been implemented 🎉

You'll need to add 'concepts' to your navbar option for the index link to show up, but search and auto-links will work out-of-the-box.

Note that it's an evolving story as they're not even merged into m.css yet (I have a PR for that), so the way they're presented or organized might change a bit over the coming versions. Happy to hear any feedback.

Some snippets:
image
image
image

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

No branches or pull requests

4 participants