Menu

#1410 ::requires fails to resolve uppercase .REX extension

5.0.0
closed
Erich
None
none
1
2023-01-01
2016-10-24
Erich
No

On Linx an unquoted ::requires without extension will not resolve for an uppercase ".REX" extension, but only for a lowercase ".rex" extension

Discussion

  • Erich

    Erich - 2016-10-24
    • status: open --> accepted
    • Pending work items: code+doc+test --> tests
     
  • Erich

    Erich - 2016-10-24

    Committed code fix with revision [r11182]
    Corrected rexxref with revision [r11183]

     

    Related

    Commit: [r11182]
    Commit: [r11183]

  • LesK

    LesK - 2016-10-24

    What about 'ReX', 'reX' etc., since Linux allows mixed case to be respected?

     
  • Erich

    Erich - 2016-10-24

    What about 'ReX', 'reX' etc., since Linux allows mixed case to be respected?

    On Windows an unquoted, extension-less ::REQUIRES external will resolve e. g. eXTeRNaL.ReX as Windows files systems typically are caseless

    On case-respecting (typically Unix) file systems, ooRexx tries a few guesses to resolve this to an existing file. One of them is, trying to add an extension .rex or an extension .REX (this fix corrects a typo in the code related to this). For full details see rexxref "Locating External Rexx Files".

    If required, a quoted, extension-qualified ::REQUIRES "external.ReX" will always work.

     
  • Bruce

    Bruce - 2016-10-24

    As I said in an earlier email this really isn't an OS issue, it is a filesystem issue. Take AIX and MacOS both are UNIX, but one by default uses a case-insenseitive, case-preserviing files system and the other doesn't. Either one can be set up with a case-sensitive or case-insensitive file system. Linux supports both ZFS and JFS when at the users option and be either case-sensitive or not.

    I would rather have the samples changed, by adding the quotes which would demonstrate writing of portable code, rather than a change to the code that will work sometimes and not others, as Les has pointed out.

    By the way we recently had a discussion about this same subject because a user wrote a program that created a file that later in the program couldn't be found. She/He didn't quote the filename both times. The program worked fine on Windows, but failed on Linux.

    My two cents worth.

    Bruce

     
  • Erich

    Erich - 2016-10-24

    I would rather have the samples changed, by adding the quotes which would demonstrate writing of portable code

    Bruce, the add-quotes-to-sample fix is already committed and is unrelated to this bug report

    rather than a change to the code that will work sometimes and not others

    This bug fix corrects a typo in our code that tries adding specific extensions for extension-less ::requires only. We had this since years, and it's exactly as the docs specify - read rexxref "Locating External Rexx Files" for details.

    If you use quoted, extension-qualified ::requires (as the fixed usetree sample now does), this bug report does not apply

     
  • Bruce

    Bruce - 2016-10-24

    Ok, I admit it, I'm lost. Are we talking about a document change or a code change.

     
  • Erich

    Erich - 2017-01-11
    • status: accepted --> pending
    • Pending work items: tests --> none
     
  • Rony G. Flatscher

    • Status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel