-
Notifications
You must be signed in to change notification settings - Fork 240
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
Differences between Windows exe (ok) and linux gem (ko) on 5.3.2 #465
Comments
This seems to be the same strange problem (#445) that I discovered some time ago in ExtJS. I wasn't able to pin it down back then, and now it has disappeared from this place in ExtJS. It seems to be the kind of problem that crops up when things happen in certain order. Like the files are probably loaded in different order on Win v/s Linux. You can try turning off multiprocessing to see if this makes difference You can also try limiting the scope of the problem. Like have JSDuck only parse AbstractFieldsWrapper.js and as little other files as possible. PS. Is the bug stable? Do you get it consistently on every run? |
yes the bug is stable |
No differences with --processes=0 I am doing some tests about the "fires"At the begining I had the warning 4 times : 1 on AbstractFieldsWrapper.js and 3 on GeoCode.js
I am doing some tests about the "override itself" bugBuilding AbstractFieldsWrapper.js with its parent AbstractField.js and Extjs is fine. And after a few test, building all my doc without a single file is fine... so I think this file (that inherit from AbstractFieldsWrapper.js) is reponsible for this bug. So I built AbstractField.js, AbstractFieldsWrapper.js and ChangePassword.js and the bug is back. ChangePassword is extending AbstractFieldsWrapper.js and redefining the setValue method that has the bug. For the moment I had no doc at all on ChangePassword#setValue. If I add @inheritdoc on it, everything is fine. Question 1: is @inheritdoc mandatory ? or is this a bug ? Question 2: the generated doc with @inheritdoc alone is different from nodoc at all (since the doc silently ignore the override)... is this a feature ? from my point of view, I would like that no doc, is the same as |
I open another ticket to talk about the "override itself" issue (#468) So we can now focus on the initial issue here, why do I have ununderstandable warning on linux and its ok on windows. |
I'm pretty sure it's all part of the same issue. JSDuck mistakenly detects that a method is overriding itself, and continuing from that broken state, all kinds of other problems can pop up. So I'm closing down the other issues. Regarding The detection of overrides is somewhat related to inheritdoc implementation - they work in sequence, affecting each other a bit. So these are definitely related, plus the whole inheritdoc logic is somewhat convulated, being a good growing field for bugs. The implementation of I tried building docs with the three files of yours: You haven't mentioned which version of Ruby are you running. This could help. If you can run different Ruby versions by yourself, you could check if the problem comes up in all of them. |
The bug of detection of override is the same under linux and windows : To reproduce, you can get the 3 files here http://people.anyware-services.com/~raphael/jsduck/ Note that adding manually /*@inheritdoc/ removes this problem By the way, currently, when I override a method with no doc, and with a single /** @inheritdoc */ : the doc is not the same on this method... I didn't get if you say that it is a bug or you don't think its true? |
I think you can get the Ruby version by doing:
This should show the RubyGems generated file and the first line should tell you the version of Ruby. |
Success. By including Ext JS sources in addition to these three files, I managed to reproduce the overrides bug. I've also managed to reduce it further down to just I'll try to digg further. |
OK. I think I've got this problem down now. I have reduced it to: /** */
Ext.define('Base', {
/** */
foo: 1
});
/** */
Ext.define('Child', {
extend:'Base',
foo: 2
});
/** */
Ext.define('GrandChild', {
extend: 'Child',
foo: 3
});
/** */
Ext.define('GrandGrandChild', {
extend: 'GrandChild',
foo: 4
}); Which results in Child, GrandChild and GrandGrandChild all having a property foo, that declares:
So, it looks like they all end up referencing the same object that lists the overridden items - so a copy operation is missing from somewhere. |
Overrides shouldn't be inherited, but the code in InheritMembers happened to inherit them along with all the other things, causing auto-detected members to share the same overrides array, resulting in bogus lists of overridden members. This fix should take care of bug #465.
I think I got this down now. Pushed out jsduck-5.3.3 (gem release only) for you to try out and see if this fixed this problem and possibly others. |
We are using ruby-1.9.3 With jsduck-5.3.3 the override itself problem is solved. |
Busted! First, thank you for the above fix. How to reproduce ? you will find here http://people.anyware-services.com/~raphael/jsduck/ 3 classes. |
Unable to reproduce. I included these three classes, but got no warnings about
Could you be more exact. What's exactly the difference? |
We did big changes on this class yesterday, the bug is still there but now on checkChange (instead of setValue) Under windows it says it fires : change, dirtychange and validitychange Here is our command line |
So, we did an ultimate code restructuration and the bug has now disapear. I propose to close the ticket for the moment. I will open another if it happens again in the future. |
OK then. I only see |
Yes as I do under windows. Thank you. |
@nene Will you be publishing a windows binary of 5.3.3? |
I've released 5.3.4 instead. |
Great, thanks. I'll keep an eye on sourceforge for it. |
Check the releases page instead: https://github.com/senchalabs/jsduck/releases All windows binary are now added in there. |
Oh, awesome! I didn't even notice because 5.3.3 didn't have one. You might want to consider adding a note on the sourceforge page of this unless you will run them in parallel. |
I've added a note to the Sourceforge page, and will be removing the downloads from there some time soon. |
I have an issue very strange, on windows I have no warnings when building, but under linux I have strange warnings.
See that class here http://releases.ametys.org/api/3.7_LTE-dev/js/#!/api/Ametys.form.AbstractFieldsWrapper-method-setValue
In my code, the event 'autosize' only exists on the component boxselect http://releases.ametys.org/api/3.7_LTE-dev/js/#!/api/Ext.ux.form.field.BoxSelect that is currently miss-writen for the doc (and excluded from my warnings)
This event also exists in extjs TextField and TextareaField
My questions are
The text was updated successfully, but these errors were encountered: