Skip to content
Prev 10032 / 12125 Next

[R-pkg-devel] Wrong mailing list: Could the 100 byte path length limit be lifted?

Compiled code is another source of long names.  Some libraries are produced
by companies with style restrictions that demand LongDescriptiveNames for
functions and classes, and which expect file names to match the name of the
class contained within.  If you've got
Models/SpecificModelFamily/PosteriorSamplers/SpecificTypeOfPosteriorSampler.hpp
it leaves very little room (20 characters) for "C:\Users\..." etc up
front.

I solved my 'tar' problems with 'sed'.  In human readable code I keep the
long names.  In the code that gets submitted to CRAN I pass specific file
names through sed to rename the long files.  I have an install script with
lines like:

hdr="MvStateSpaceRegressionPosteriorSampler.hpp"
new_hdr="MVSSRPS.hpp"
mv "$ibase/$dbase/$hdr" "$ibase/$dbase/$new_hdr"
echo "replacing $dbase/$hdr with $dbase/$new_hdr"
grep -rl "$dbase/$hdr" "$BOOM_DIR/src/Models" | xargs $SED -i
"s|$dbase/$hdr|$dbase/$new_hdr|g"

This renames the files, and uses sed to replace #include references to file
names with the shorter file names.  The SED macro is because on mac 'sed'
is spelled 'gsed'.

I agree the system sucks.  It would be nice if one of the steps in
winbuilder took non-windows compliant TAR files and replaced them with ZIP
files or something similar.  We'd still have the Win32 character limit, but
256 > 100 so the problem wouldn't bite so hard.

On Thu, Dec 14, 2023 at 6:19?AM Vladimir Dergachev <volodya at mindspring.com>
wrote: