Is there a way to send r-code to task when selectively compi

Posted by jquerijero on 09-Sep-2015 13:46

Using the Selective Compile in Roundtable (desktop version), is it possible to send the related r-codes to the Task folder when the selected program is still in the Task folder. The r-code for the program goes to the Task folder but the rest of the the r-codes to Central. It messes up Central when this happens.

All Replies

Posted by Jeff Ledbetter on 09-Sep-2015 14:35

You can do that for dependent Objects. For example, if your Task-share Object is an include file, you can choose the 'Task R-Code' toggle on the Selective Compile UI which will put r-code for all Objects that reference that include into your Task folder.

Posted by jquerijero on 11-Sep-2015 12:36

The flag seems to work for Include files. Is this feature not available for a modified .p and .cls programs which trigger a recompile of programs that use it? This is specially helpful when modifying .cls programs.

Posted by Jeff Ledbetter on 11-Sep-2015 13:11

Hi.

Yes, include file references only. However, I can definitely enter a CR for your request.

I can see how this would be beneficial for classes/subclass relationships but not so much for RUN references since there is no compiled dependency for program runs.

Posted by jquerijero on 14-Sep-2015 10:33

It looks like for .p and .w that references a CLS file, Progress does a run-time verification. I get an out-of-date error when running a .p or .w that refers to a modified CLS file. Not sure exactly what changes to the CLS file trigger it.

Posted by Jeff Ledbetter on 14-Sep-2015 10:46

I'm not familiar with an "out of date" error.

The Roundtable selective compiler will recompile all subclasses when the parent class is changed.

Posted by TheMadDBA on 14-Sep-2015 10:49

Changes to method signatures or public/protected status will cause those errors. Also changes to inherited classes and probably a few other things as well.

There are also a few issues depending on your exact OE version that may or may not have been fixed in newer versions.

To be safe any code that references the changed class should be recompiled to make sure it is still valid.

Posted by Jeff Ledbetter on 14-Sep-2015 10:59

Hi.

"To be safe any code that references the changed class should be recompiled to make sure it is still valid."

Should extend to any reference or just a parent class?

I've always considered a NEW statement like a RUN in the fact that it does not create explicit dependency. However, I suppose if the class CONSTRUCTOR changes that would cause such a need...

From what I understand, the OE compiler will automatically recompile all SUPER classes when a subclass is changed (per the OO Programming Guide) but not the other way.

Posted by jquerijero on 14-Sep-2015 11:36

Maybe I just got lucky, but I think the Selective Compile is already picking up the correct/related programs when compiling a class. I verified the generated r-code with the Where Used listing and they seemed to match.

Posted by TheMadDBA on 14-Sep-2015 12:10

It should be any reference to the class, especially for classes used in procedural code.

It isn't just the NEW, but any references to the actual methods that is usually the problem. If you change the signature of the method (adding a new parameter, removing, etc) then the .p or .w code may no longer compile. Same goes if you change the method or property from public to private/protected.

If RTB is already doing a recompile for all references then you are probably running into a different issue where your session doesn't know that the code has been recompiled. Some versions seem to be better at detecting the change and some still seem to want to fail the first time.

As long as the recompile happens it will not matter for deployment but it can be a pain during development using a shared session.

Posted by jquerijero on 14-Sep-2015 12:25

The original post is regarding the location of the compiled r-code. Unlike compiling include file which allows you to send the generated r-code to your Task folder using the Task flag in Selective Compile window, there is no way to control the r-code location when compiling CLS file. You end up with r-codes in Task (the currently selected class) and Central (related or dependent programs).  

Posted by Jeff Ledbetter on 14-Sep-2015 13:26

Hi. It wasn't luck; we do pick those up those references and compile them. :)

Posted by Jeff Ledbetter on 14-Sep-2015 13:27

Hi. I will enter a CR for this on our side. I think we can provide a work-around using our event-hooks and modifying the compilation record upon creation. I will post to this thread if it works out.

This thread is closed