SWI-Prolog / contrib-protobufs

An interface to Google Protocol Buffers (protobuf)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Folder names

mgondan opened this issue · comments

Dear Peter,

(Not urgent at all. Not important either.)

As I wrote you in an email, I am currently trying to build an embedded swipl as an R package. The R build system complains that the folder names are too long. This is the output of R CMD build:

$ R CMD build rolog
    checking for file ‘rolog/DESCRIPTION’ … OK
    preparing ‘rolog’:
    checking DESCRIPTION meta-information … OK
    cleaning src
    checking for LF line-endings in source and make files and shell scripts
    checking for empty or unneeded directories
    building ‘rolog_1.0.tar.gz’

Warnung in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,
storing paths of more than 100 bytes is not portable:

‘rolog/src/swipl-devel/packages/protobufs/bootstrap/protoc_gen_prolog_pb/google/protobuf/compiler/plugin_pb.pl’

Warnung in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,
storing paths of more than 100 bytes is not portable:

‘rolog/src/swipl-devel/packages/protobufs/bootstrap/protoc_gen_prolog_pb/google/protobuf/descriptor_pb.pl’

Thank you for considering it, I know this is a strange request in 2021, and I am seriously wondering which systems they have in mind for portability.

Best wishes,

Matthias

The only thing I can do is shrink the name of the directory protoc_gen_prolog_pb to something smaller. Would this be enough? The rest of the directory path is controlled by other systems (e.g., the protobuf/compiler part is from the protobuf compiler (package libprotobuf-dev on Ubuntu)) and their related naming conventions.

When I looked at the longest directory names, I got this (note that package jpl has even longer names):

$ find swipl-devel/build -type d | xargs -L 1 python3 -c 'import sys; print(len(sys.argv[1]), sys.argv[1])' | grep -v jpl | sort -rn | head -1
86 swipl-devel/build/home/library/protobufs/protoc_gen_prolog_pb/google/protobuf/compiler

(Question: why does your system show ‘rolog/ instead of prolog/?)

(As for why the R build system complains about paths longer than 100 bytes ... perhaps this is a bug in their system, or based on outdated issues? I know that Windows 10 doesn't like paths that are more than ~255 bytes, which roughly corresponds to 100 double-byte characters in UTF8, although this can be worked around at the command line by prefixing with \\?)