Giter VIP home page Giter VIP logo

Comments (5)

speedyleion avatar speedyleion commented on August 31, 2024 1

Thanks for the detailed description.

This might have changed with the recent sphinx 3 migration. Where I work we mainly use anonymous enums and it seems like full namespacing would make those difficult to reference.

I'll have to do some investigating, but for now I agree this should be improved

For named enums you should be able to work around this by prefixing the name with ~. See https://www.sphinx-doc.org/en/3.x/usage/restructuredtext/roles.html#cross-referencing-syntax for more info.

from sphinx-c-autodoc.

speedyleion avatar speedyleion commented on August 31, 2024

@polwel ,
I don't suppose you can provide the versions of your sphinx environment.

I tried reproducing. Anonymous, named, and typedefed enums are all linking locally with just the enumerator name. The URL shows the full c.enum.enumerator

my setup for reference.

Packages:

Sphinx==3.2.1
sphinx-c-autodoc==0.3.0
sphinx-rtd-theme==0.5.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4

The current extensions on are:

sphinx.ext.imgmath
sphinx.ext.viewcode
sphinx.ext.autosectionlabel
sphinx.ext.graphviz
sphinx_c_autodoc

Windows box, python 3.7.4, defaulting to c domain.

The current thing I might try is not defaulting to c domain. I did try the role with and without domain, as well as using returns like you had.

from sphinx-c-autodoc.

polwel avatar polwel commented on August 31, 2024

Thanks a lot for looking into this. I have created a full minimal example that shows the issue for me. I've also included a freeze.txt that shows my python environment. I am using Python 3.8.5, AMD64 on Windows. Installed as an anaconda environment.

docs_enum_test.zip

from sphinx-c-autodoc.

polwel avatar polwel commented on August 31, 2024

Uhh... I did make clean, rebuilt, and now it is working...

EDIT: I think I might have originally mistyped :c:enum: instead of :enumerator: before, and when it wouldn't link, I just assumed the enum name was required for referencing. (Which worked, but for the wrong reason.)

Anyway, I apologize for taking your time. Many thanks for the great help, and this awesome library 👍

from sphinx-c-autodoc.

speedyleion avatar speedyleion commented on August 31, 2024

Ok so you think you found the problem, that's good. Prior to your edit I was thinking perhaps an incremental issue.

I do appreciate you taking the time to report, and if you think enum vs enumerator might belong in the, currently non existent, faq or similar let me know.

from sphinx-c-autodoc.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.