apjanke / octave-testify

New BIST (Built-In Self Test) functions for GNU Octave
GNU General Public License v3.0
4 stars 2 forks source link

Pre-5.0 shims getting loaded in Octave 5.2? #95

Open apjanke opened 4 years ago

apjanke commented 4 years ago
octave:6> pkg install https://github.com/apjanke/octave-testify/releases/download/v0.3.3/testify-0.3.3.tar.gz
warning: function /Users/janke/octave/testify-0.3.3/shims/pre-5.0/isfolder.m shadows a core library function
octave:7> ver
----------------------------------------------------------------------
GNU Octave Version: 5.2.0 (hg id: eb46a9f47164)
GNU Octave License: GNU General Public License
Operating System: Darwin 18.7.0 Darwin Kernel Version 18.7.0: Thu Jan 23 06:52:12 PST 2020; root:xnu-4903.278.25~1/RELEASE_X86_64 x86_64
----------------------------------------------------------------------
mtmiller commented 4 years ago

Only during the install step, pkg builds a cache of all docstrings. Looks like it uses genpath on the entire package directory, so it will find all m files in all subdirectories.

https://github.com/mtmiller/octave/blob/master/scripts/pkg/private/install.m#L815

apjanke commented 4 years ago

Aha. Thanks. I'll look in to that and maybe file an upstream bug report.

mtmiller commented 4 years ago

I support fixing this in pkg (or in pkj :wink:). I think your runtime conditional to set the load path is valid and should be supported, even if other packages currently do this kind of thing at build time.

mtmiller commented 4 years ago

I reported Octave #57826.