Code Monkey home page Code Monkey logo

Comments (16)

rogerbarton avatar rogerbarton commented on July 19, 2024 1

This is probably from the line:

(NSBone, NSBone) NSBonePair(Vector3 v, Quaternion q) {...}

So the same issue with the tuple short hand type but for the return type of the function.

from sphinx-csharp.

rogerbarton avatar rogerbarton commented on July 19, 2024

The inline keyword is missing from the list of modifiers. I will add this quickly...

from sphinx-csharp.

Feng-Seng avatar Feng-Seng commented on July 19, 2024

HaHa, thank you sooooooo much!!

from sphinx-csharp.

rogerbarton avatar rogerbarton commented on July 19, 2024

It's been added, run pip install git+https://github.com/rogerbarton/sphinx-csharp.git to get the latest version and try it again

from sphinx-csharp.

Feng-Seng avatar Feng-Seng commented on July 19, 2024

Thanks, it's getting better.

But I still got 2 warnings and 1 exception as follows:

----------------------
WARNING: Type signature invalid, got List< string >)
WARNING: Variable signature invalid: NSBone

Exception:
  File "/opt/homebrew/lib/python3.9/site-packages/sphinx_csharp/csharp.py", line 237, in parse_type_signature
    match = CLASS_SIG_RE.match(sig.strip())
AttributeError: 'NoneType' object has no attribute 'strip'
----------------------

Any thoughts about these?

from sphinx-csharp.

rogerbarton avatar rogerbarton commented on July 19, 2024

The first warning seems to be because of the brackets (.. , ...) in the original warning:

WARNING: Method signature invalid: static inline Dictionary< ESkinPart,(List< string >, List< string >)> initAssetMap2 ()

I assume this is syntax for a tuple or something similar. Parsing this as a type has not been implemented. I will have a look at this...

For the second warning, do you know which line this is coming from? maybe search your code for NSBone?

from sphinx-csharp.

rogerbarton avatar rogerbarton commented on July 19, 2024

I guess for now you could write Tuple<List< string >, List< string >> for this one function as a workaround. This might also fix the other warning

from sphinx-csharp.

Feng-Seng avatar Feng-Seng commented on July 19, 2024

For the second warning, I am not sure which line induces this warning since the NSBone has been used in several places in 2 cs files as follows.

First .cs file.

namespace xx.xxxxx
{
    //no-scale-bone
    public struct NSBone
    {
        public NSBone(Vector3 v, Quaternion q)
        {
            localPos = v;
            localRot = q;
        }
        public Vector3 localPos;
        public Quaternion localRot;
    }
    internal class NSPair
    {
        public NSPair(Vector3 v, Quaternion q)
        {
            _original.localPos = v;
            _original.localRot = q;
        }
        public NSBone _original;
        public NSBone _lastSaved;
    }
    public class Data
    {
        .......
        (NSBone, NSBone) NSBonePair(Vector3 v, Quaternion q)
        {
            return (new NSBone(v, q), new NSBone(v, q));
        }

Another .cs file

namespace xx.xxxxx
{
    ......
          public bool GetBindingPose(string name, out NSBone localTransform)
    ......
}

Could those information sufficient for you?

from sphinx-csharp.

Feng-Seng avatar Feng-Seng commented on July 19, 2024

For the first warning, I will try what you said, thanks!!

from sphinx-csharp.

rogerbarton avatar rogerbarton commented on July 19, 2024

I've had a look at implementing the C# 7.0 tuples, but this seems to be quite complicated. So it will not be supported for now.

from sphinx-csharp.

Feng-Seng avatar Feng-Seng commented on July 19, 2024

Hi @rogerbarton ,

That's no problem.
But could you print the file / line causes the warning / error in the warning / error message?
For example, which xml (or CS) file cause this warning / error.

from sphinx-csharp.

Feng-Seng avatar Feng-Seng commented on July 19, 2024

Another question is, do you know why the warning causes the exception? In usual case, only the errors could stop the execution.

Is there any way to get the result, even there are warning message?

from sphinx-csharp.

rogerbarton avatar rogerbarton commented on July 19, 2024

Yes, its because a None is propagated when the regex does not match. I'm currently working on cleaning things up and producing better errors...

from sphinx-csharp.

rogerbarton avatar rogerbarton commented on July 19, 2024

I should have probably checked this earlier, but doxygen does not yet support these C# 7.0 tuples, see doxygen/doxygen#7633. So the input for breathe is garbage.

But could you print the file / line causes the warning / error in the warning / error message?
For example, which xml (or CS) file cause this warning / error.

I have no idea how to get this information, so for now I've just set it to point to the rst file/line.

from sphinx-csharp.

xuhongxu96 avatar xuhongxu96 commented on July 19, 2024

inline is not a keyword in C#. I think breathe should not add it in signature.

breathe-doc/breathe#668

from sphinx-csharp.

rogerbarton avatar rogerbarton commented on July 19, 2024

Thanks @xuhongxu96! Coming from C++ I simply assumed that C# would also have it. I will revert this.

from sphinx-csharp.

Related Issues (8)

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.