bugGNU Octave - Bugs: bug #57487, javaaddpath should prepend to...

 
 

bug #57487: javaaddpath should prepend to existing path unless given "-end" argument

Submitter:  John W. Eaton <jwe>
Submitted:  Fri 27 Dec 2019 03:09:13 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 27 Dec 2019 07:05:45 PM UTC, comment #5: 

Oh, I was thinking that the tests did create temp directories, but now I see that you are just using the home directory and the system temp directory.  That's probably good enough.

I hope I'm just tired today and it's not dementia setting in.

John W. Eaton <jwe>
Group administrator
Fri 27 Dec 2019 06:50:29 PM UTC, comment #4: 

You're right that the safest way to guarantee that the BIST tests don't fail would be to create two temporary directories within tempdir() and use those names.  What we have is probably good enough though, and I thought I might just wait and see if we get anyone complaining.

Rik <rik5>
Group administrator
Fri 27 Dec 2019 06:40:45 PM UTC, comment #3: 

Rik: Thanks for the additional features and tests.  I wasn't sure how to test - it didn't occur to me to use create directories specifically for the test or to use tmpdir (!?).

John W. Eaton <jwe>
Group administrator
Fri 27 Dec 2019 06:15:06 PM UTC, comment #2: 

The changeset works.  I exetended javaaddpath to accept a cell array of strings which is also necessary for Matlab compatibility (https://hg.savannah.gnu.org/hgweb/octave/rev/76373f5113db).  I added BIST tests as well since every m-file should have them.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Fri 27 Dec 2019 03:27:20 PM UTC, comment #1: 
John W. Eaton <jwe>
Group administrator
Fri 27 Dec 2019 03:09:13 PM UTC, original submission:  

In Matlab, javaaddpath adds elements to the beginning of the existing dynamic classpath by default and appends them if the final argument to javaaddpath is "-end".

Octave's javaaddpath function always appends and doesn't recognize "-end" as special.

In Matlab, it appears that only one directory agument is accepted and "-end" must be the final argument.

I propose that we accept "-end" only as the last argument to javaaddpath, but as an extension to Matlab, continue to accept multiple directory arguments and will push a changeset when I have a bug number.

John W. Eaton <jwe>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-27 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2019-12-27 jwe StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code