HaxeFoundation / dox

Haxe documentation generator.
MIT License
145 stars 36 forks source link

abstract method parameters incorrect, 'this' is wrongly inserted for first param, for haxe4 ? #266

Closed nanjizal closed 4 years ago

nanjizal commented 4 years ago

abstract method parameters incorrect ( tried dox 1.1.0, 1.2.0 and git ). dox presents under Methods

inline applyScale (this:DualQ):DualQuaternion

code signature

    public inline
    function applyScale( s: Float ): DualQuaternion {

dox source https://nanjizal.github.io/geom/pages/geom/matrix/DualQuaternion.html#applyScale code source https://github.com/nanjizal/geom/blob/master/src/geom/matrix/DualQuaternion.hx#L119

doc generation used https://github.com/nanjizal/geom/blob/master/generate.hxml https://github.com/nanjizal/geom/blob/master/generateDoc.hxml

This seems to be effecting other abstract classes. For instance. https://nanjizal.github.io/geom/pages/geom/matrix/Matrix3x3.html#getXYhttps://github.com/nanjizal/geom/blob/master/src/geom/matrix/Matrix3x3.hx#L350

This could be related to only haxe4 since I don't see similar errors in much older dox use ( 3 years back ) for instance. https://rawgit.com/nanjizal/triangulationsWebGLtest/master/doc/pages/triangulations/Edges.html#flipEdge

nanjizal commented 4 years ago

If I compare the correctly displaying static method scalar with incorrect applyScale

    <applyScale public="1" get="inline" set="null" line="118" static="1">
        <f a="this:s">
            <c path="geom.structure.DualQ"/>
            <x path="Float"/>
            <x path="geom.matrix.DualQuaternion"/>
        </f>
        <meta><m n=":impl"/></meta>
    </applyScale>
    <scalar public="1" get="inline" set="null" line="131" static="1">
        <f a="s">
            <x path="Float"/>
            <x path="geom.matrix.DualQuaternion"/>
        </f>
        <haxe_doc>* allow scaling a DualQuaternion untested
     * usage:
     * var scaledDualQuaternion = DualQuaternion.scalar( 3 ) * dualQ;
     * source:  *http://roartindon.blogspot.com/2015/04/encoding-uniform-scale-in-quaternions.html</haxe_doc>
nanjizal commented 4 years ago

Long shot... it's not related to the as3 target changes in typecore.ml or filters.ml? https://github.com/HaxeFoundation/haxe/pull/8934/files

nanjizal commented 4 years ago

I have released the library wondering if there are any thoughts on fixes?

Gama11 commented 4 years ago

I just noticed this in Flixel too: http://api.haxeflixel.com/flixel/util/FlxColor.html?

I agree that this is probably a regression, pretty sure I would've noticed this if it was always happening.

nanjizal commented 4 years ago

Is there a mac version of this build I can grab to update doc's for some of my libraries?

Gama11 commented 4 years ago

Not sure what you mean, dox uses Neko, so it works on any OS (or as of 1.4.0 node if available since that's much faster).

nanjizal commented 4 years ago

ah already new dox on haxelib 👍 I was not sure if it was haxe or dox related bug.

Gama11 commented 4 years ago

Ah. It was a dox bug (but it only happened when dox was built with Haxe 4, hence the regression).