Hello there,
as already reported some long time ago, the NetRexx Compiler (or the proper file-list class used in the NetRexx Compiler) does select both files: myfile.nrx myfile.nrx~ for compilation, when nrc *.nrx is used. Now, as a matter of fact, some widely used Editors as JEdit us the suffix '~' for BACKUP files. Could this behaviour be changed (in the current Compiler) to SKIP those BACKUP files, as this leads to duplicate classes, and then to no compilation at all. This is extremely disannoying when you are using nrc *.nrx as I do when compiling all programs of a subdirectory. I do overcome this by a small utility CLEAN at the minute, but when time allows, that should be changed when possible... Problem is: First compilation is ok (when directory is clean). Then I do Edit a single program by JEdit (which does make it's backup), and the succeeding compilation is not executed at all (akthough a success message is displayed!) Thomas. -- Thomas Schneider (www.thsitc.com) _______________________________________________ Ibm-netrexx mailing list [hidden email]
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
On 4/7/2011 3:16 PM, Thomas Schneider wrote:
> Could this behaviour be changed (in the current Compiler) to SKIP > those BACKUP files, > as this leads to duplicate classes, and then to no compilation at all. > Since the source for the NetRexx compiler is not (yet) open, there's no way to modify it. So, no: it can't be changed. A workaround would be to filter the file list presented to the compiler ... simply wrap the "nrc" command with code that excludes non-exact matches. Tom. _______________________________________________ Ibm-netrexx mailing list [hidden email] |
I see this in Windows and am a jEdit user. I wonder if it is a Windows phenomenon. Does this happen in other OSes?
George On Thu, Apr 7, 2011 at 4:54 PM, Tom Maynard <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by ThSITC
On Thu, Apr 7, 2011 at 5:16 PM, Thomas Schneider
<[hidden email]> wrote: > This is extremely disannoying when you are using > > nrc *.nrx > > as I do when compiling all programs of a subdirectory. Work-around. Create "nrc2.cmd" (or nrc2.sh) that does: @echo off REM --first move all backup files to a separate dir-- mkdir backups move *.nrx~ backup REM ---now call nrc with the parameters passed to this script nrc %1 %2 %3 %4 %5 %6 %7 %8 %9 That´s it. All your backup files are automagically moved to the backups subdir, and nrc is called with the same parameters that you used to invoke nrc2.cmd I´ll let you do the translation to a bash script. :-P FC _______________________________________________ Ibm-netrexx mailing list [hidden email] |
On Thu, Apr 7, 2011 at 10:53 PM, Fernando Cassia <[hidden email]> wrote:
> mkdir backups > move *.nrx~ backup Heh, instant bug, as to be expected. Sorry, I mean "backups" on both of the above lines. :) mkdir does not check if the directory exists, but checking is overkill, if the dir does not exist it will create it, if it does, the mkdir operation will fail, but the script will move on, so why bother?. :-P Remember the KISS principle: "Keep it simple, st*pid!". :) FC _______________________________________________ Ibm-netrexx mailing list [hidden email] |
On 4/7/2011 8:56 PM, Fernando Cassia wrote:
> > mkdir does not check if the directory exists, but checking is > overkill, if the dir does not exist it will create it, if it does, the > mkdir operation will fail, but the script will move on, so why > bother?. :-P > Perhaps because the MOVE will fail when it finds a duplicate file already in BACKUPS? _______________________________________________ Ibm-netrexx mailing list [hidden email] |
On Thu, Apr 7, 2011 at 11:21 PM, Tom Maynard <[hidden email]> wrote:
> Perhaps because the MOVE will fail when it finds a duplicate file already in > BACKUPS? move /y *.nrx~ backups (overwrite files, do not show Overwrite? prompt) FC _______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by Tom Maynard
This seems to be working under Windows 7:
rem move conflicting jEdit backup files to directory #jEdit# move /Y *.nrx~ #jEdit# >nul 2>&1 move /Y *.nrx# #jEdit# >nul 2>&1 rem Invoke the NetRexx translator java -Xmx192M -cp %classpath% COM.ibm.netrexx.process.NetRexxC %netrexx_options% %1.nrx rem restore jEdit backup files move #jEdit#\*.* . >nul 2>&1 On Thu, Apr 7, 2011 at 10:21 PM, Tom Maynard <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
Well, You most definitely want to check the RC from ‘mkdir’, as it’s possible ‘mkdir’ could fail for reasons other than a directory already existing (i.e, such as
insufficient permissions, or the fact that another non-directory (file, link) exists of the same name. In these conditions, a failure really is a failure. P From: [hidden email] [mailto:[hidden email]]
On Behalf Of George Hovey This seems to be working under Windows 7:
George On Thu, Apr 7, 2011 at 10:21 PM, Tom Maynard <[hidden email]> wrote: On 4/7/2011 8:56 PM, Fernando Cassia wrote:
Perhaps because the MOVE will fail when it finds a duplicate file already in BACKUPS?
The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please resend this communication to the sender and delete the original message or any copy of it from your computer system. Thank You. **************************************************************************** _______________________________________________ Ibm-netrexx mailing list [hidden email] |
On Fri, Apr 8, 2011 at 12:47 AM, Rupp Peter - prupp
<[hidden email]> wrote: > Well, > > You most definitely want to check the RC from ‘mkdir’, as it’s possible > ‘mkdir’ could fail for reasons other than a directory already existing In theory, yes. In practice, what are the odds?. Remember what we´re doing here, moving backup files out of the way so that the netrexx compiler doesn´t end up compiling backups. In fact, I´d just erase *.nrx~ before calling the netrexx compiler, but I assume sometimes one would like to preserve backups, hence the mkdir and move operations :). Anyway, I just wanted to present the "wrap the exe with a script and do some preprocessing before passing back parameters to the executable" idea as a solution for Thomas´ problem. I´ve used such approach since the MS-DOS (actually DR-DOS) days... to simplify things and not having to remember odd switches for DOS programs, just taking one or two arguments (usually the file names involved) and passing the right parameters/switches to the exe... FC _______________________________________________ Ibm-netrexx mailing list [hidden email] |
This discussion seems a bit convoluted if we are trying to solve the
problem I think Thomas is concerned about. Since he is using jEdit which I also use for my code editing, let me point out that jEdit Global Options includes a "Saving and Backup" option screen which allows you to alter the directory where backup files are saved as well as change the backup name format or even eliminate the backups entirely. Of course I also recommend the solution I use for this problem: Use ANT to compile your projects since it automatically recognizes and bypasses backup files with common name formats such as those produced by jEdit. KK On 4/7/2011 9:32 PM, Fernando Cassia wrote: > On Fri, Apr 8, 2011 at 12:47 AM, Rupp Peter - prupp > <[hidden email]> wrote: >> Well, >> >> You most definitely want to check the RC from ‘mkdir’, as it’s possible >> ‘mkdir’ could fail for reasons other than a directory already existing > > In theory, yes. In practice, what are the odds?. > > Remember what we´re doing here, moving backup files out of the way so > that the netrexx compiler doesn´t end up compiling backups. > > In fact, I´d just erase *.nrx~ before calling the netrexx compiler, > but I assume sometimes one would like to preserve backups, hence the > mkdir and move operations :). > > Anyway, I just wanted to present the "wrap the exe with a script and > do some preprocessing before passing back parameters to the > executable" idea as a solution for Thomas´ problem. > > I´ve used such approach since the MS-DOS (actually DR-DOS) days... to > simplify things and not having to remember odd switches for DOS > programs, just taking one or two arguments (usually the file names > involved) and passing the right parameters/switches to the exe... > > FC > > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > > > Ibm-netrexx mailing list [hidden email] |
Thanks a LOT, Kermit, for this hint... :-)
Didn't know that, I'm sorry :-( I'll try this the upcoming Monday... Have a nice weekend, all of you, Issue closed from my side... Thomas. ======================================================================================= Am 08.04.2011 11:09, schrieb Kermit Kiser: > This discussion seems a bit convoluted if we are trying to solve the > problem I think Thomas is concerned about. Since he is using jEdit > which I also use for my code editing, let me point out that jEdit > Global Options includes a "Saving and Backup" option screen which > allows you to alter the directory where backup files are saved as well > as change the backup name format or even eliminate the backups > entirely. Of course I also recommend the solution I use for this > problem: Use ANT to compile your projects since it automatically > recognizes and bypasses backup files with common name formats such as > those produced by jEdit. > > KK > > On 4/7/2011 9:32 PM, Fernando Cassia wrote: >> On Fri, Apr 8, 2011 at 12:47 AM, Rupp Peter - prupp >> <[hidden email]> wrote: >>> Well, >>> >>> You most definitely want to check the RC from ‘mkdir’, as it’s possible >>> ‘mkdir’ could fail for reasons other than a directory already existing >> >> In theory, yes. In practice, what are the odds?. >> >> Remember what we´re doing here, moving backup files out of the way so >> that the netrexx compiler doesn´t end up compiling backups. >> >> In fact, I´d just erase *.nrx~ before calling the netrexx compiler, >> but I assume sometimes one would like to preserve backups, hence the >> mkdir and move operations :). >> >> Anyway, I just wanted to present the "wrap the exe with a script and >> do some preprocessing before passing back parameters to the >> executable" idea as a solution for Thomas´ problem. >> >> I´ve used such approach since the MS-DOS (actually DR-DOS) days... to >> simplify things and not having to remember odd switches for DOS >> programs, just taking one or two arguments (usually the file names >> involved) and passing the right parameters/switches to the exe... >> >> FC >> >> _______________________________________________ >> Ibm-netrexx mailing list >> [hidden email] >> >> >> > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > > -- Thomas Schneider (www.thsitc.com) _______________________________________________ Ibm-netrexx mailing list [hidden email]
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
In reply to this post by Kermit Kiser
Hello Kermit (and all)
Just found this in my *open issue List*. You wouldn't *trust me* , *but* *I handle an OPEN ISSUE List*, since decades (sorry) for my projects (any and all projects of mine) -) Hence, what shall we do on this issue? Thomas. ============================================================================================. Am 08.04.2011 11:09, schrieb Kermit Kiser: > This discussion seems a bit convoluted if we are trying to solve the > problem I think Thomas is concerned about. Since he is using jEdit > which I also use for my code editing, let me point out that jEdit > Global Options includes a "Saving and Backup" option screen which > allows you to alter the directory where backup files are saved as well > as change the backup name format or even eliminate the backups > entirely. Of course I also recommend the solution I use for this > problem: Use ANT to compile your projects since it automatically > recognizes and bypasses backup files with common name formats such as > those produced by jEdit. > > KK > > On 4/7/2011 9:32 PM, Fernando Cassia wrote: >> On Fri, Apr 8, 2011 at 12:47 AM, Rupp Peter - prupp >> <[hidden email]> wrote: >>> Well, >>> >>> You most definitely want to check the RC from ‘mkdir’, as it’s possible >>> ‘mkdir’ could fail for reasons other than a directory already existing >> >> In theory, yes. In practice, what are the odds?. >> >> Remember what we´re doing here, moving backup files out of the way so >> that the netrexx compiler doesn´t end up compiling backups. >> >> In fact, I´d just erase *.nrx~ before calling the netrexx compiler, >> but I assume sometimes one would like to preserve backups, hence the >> mkdir and move operations :). >> >> Anyway, I just wanted to present the "wrap the exe with a script and >> do some preprocessing before passing back parameters to the >> executable" idea as a solution for Thomas´ problem. >> >> I´ve used such approach since the MS-DOS (actually DR-DOS) days... to >> simplify things and not having to remember odd switches for DOS >> programs, just taking one or two arguments (usually the file names >> involved) and passing the right parameters/switches to the exe... >> >> FC >> >> _______________________________________________ >> Ibm-netrexx mailing list >> [hidden email] >> >> >> > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > > -- Thomas Schneider (www.thsitc.com) _______________________________________________ Ibm-netrexx mailing list [hidden email]
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
Free forum by Nabble | Edit this page |