issue-#129 command for generating a compile list

Merged to the master branch
luowy
Posts: 234
Joined: Mon Oct 20, 2014 12:52 pm

Re: issue-#129 command for generating a compile list

Post by luowy »

Josef Templ wrote:> AddModule has a problem,the
I must think about this. Could you give me an example of a problem?
Feature-129.zip
(3.88 KiB) Downloaded 204 times
the demo show that incorrect order of Obx2 modulelist(when without Obx1).
though it is rare case,end user will not notice this.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#129 command for generating a compile list

Post by Josef Templ »

Thanks, luowy. This should be fixed now.
The latest commit also contains another fix:
If a file had a name different from the module name inside it, it was listed in the result
under the module name, and only once if there are several of them. Now it is listed under the file name
and no file is lost.
Both are rare cases but it was possible to fix them in the same way, viz. by
introducing another list, fileList, that holds the result as opposed to moduleList,
which holds the modules already analyzed.

The other code cleanups are also done.

See a total diff at http://redmine.blackboxframework.org/pr ... c73e8746c7.

I now have the feeling that we are approaching a nice and stable version.

- Josef
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#129 command for generating a compile list

Post by Josef Templ »

luowy wrote:the demo show that incorrect order of Obx2 modulelist(when without Obx1).
though it is rare case,end user will not notice this.
I looked again into your example and I am no longer convinced that it shows an error.
To be sure I tested it with both the old and the new compilation order.
Result: Both orders can be successfully compiled.

Is there any other aspect where it would make a difference in which order Obx2 is compiled?
If it is not, it would be better to stay with the old version because it prunes the import tree considerably.

- Josef
luowy
Posts: 234
Joined: Mon Oct 20, 2014 12:52 pm

Re: issue-#129 command for generating a compile list

Post by luowy »

the compilation order should keep consistency within the whole framework range.
Josef Templ wrote:Both are rare cases but it was possible to fix them in the same way, viz. by
introducing another list, fileList,
a little mess,IMO;
my implemetation has a 'flag' field in Node type, 0:nomal; 1:outside ; -1:error, filter at the output and compare;
Last edited by luowy on Fri Sep 09, 2016 4:03 am, edited 1 time in total.
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#129 command for generating a compile list

Post by DGDanforth »

My computer died.
I am sending this from my Kindle.
I will be off line for several days.
-Doug
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#129 command for generating a compile list

Post by Ivan Denisov »

DGDanforth wrote:My computer died.
I am sending this from my Kindle.
I will be off line for several days.
Doug, you can delegate your role to another member to create voting while you not fix you PC.
Josef, Helmut and I as previous Center chairmans can help you.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#129 command for generating a compile list

Post by Josef Templ »

luowy wrote:the compilation order should keep consistency within the whole framework range.
Josef Templ wrote:Both are rare cases but it was possible to fix them in the same way, viz. by
introducing another list, fileList,
a little mess,IMO;
my implemetation has a 'flag' field in Node type, 0:nomal; 1:outside ; -1:error, filter at the output and compare;
In general, there are more than 1 legal results because we have a "partial order"
defined by the import relationship.
Any order that can be compiled successfully is therefore correct.
The goal, that the result must look like some expected result, cannot be reached in general
and must be given up.

The so-called "MESS" has now been cleaned up, i.e. moduleList has been removed.
Error reporting of missing files has been improved slightly.

total diff: http://redmine.blackboxframework.org/pr ... c73e8746c7.

MakeList now behaves reasonably in case of mismatches between file names and module names.
There is, however, no check for cyclic imports. This would complicate it further but it can be done.
It would mean to add a 'root' parameter to MakeFile().
Let me know if I should add such a check.

- Josef
luowy
Posts: 234
Joined: Mon Oct 20, 2014 12:52 pm

Re: issue-#129 command for generating a compile list

Post by luowy »

After several day's work,I think: Maybe it is better to put this feature on hold.
though it is great work and Josef has professional experience on this aspect,but it maybe introduce some uncertain effect
without being sufficiently used and tested,and currently it not give us a feeling that it is an essential function for daily development work like other procedures of DevCompiler,but a tool for migration tool or building whole framework.

I much like these tools,they save alot of time and greatly reduce trivial work,more such tool more close to out-of-box IDE.
but currently the release of 1.7 is the most important thing for all of us,we canot go beyond too much time limit,
so,I suggest make this tool in a separate module for migration using at first,then improve it after the release of 1.7
with feedbacks from user, judge it until it's statable.

luowy
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#129 command for generating a compile list

Post by Josef Templ »

A check for recursive imports has been added.
This issue is ready for voting, I believe.

To summarize the story behind this issue:
It started with a recommendation of an external tool ypkDevTool for migration purposes (recompile all your code).
I tested it and listed several shortcomings including TRAPs.
So I thought about including such a tool into BB and it turned out to be possible with very little additional code
and after a long discussion we (including Ivan) agreed that it is well placed in DevCompiler.

The results are two new commands MakeList and CompileSubs that are very convenient not only for
migration but for everyday programming as well. It saves you to maintain a compile list that lists all modules in an
appropriate order.

Doug, if you cannot create a voting because of your computer crash, can you delegate this to somebody?

- Josef
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#129 command for generating a compile list

Post by DGDanforth »

Ivan Denisov wrote:
DGDanforth wrote:My computer died.
I am sending this from my Kindle.
I will be off line for several days.
Doug, you can delegate your role to another member to create voting while you not fix you PC.
Josef, Helmut and I as previous Center chairmans can help you.
I designate Josef to be temporary Chair.
Doug
Post Reply