C++ Logo

sg16

Advanced search

Re: [SG16-Unicode] P1689: Encoding of filenames for interchange

From: Thiago Macieira <thiago_at_[hidden]>
Date: Fri, 06 Sep 2019 07:38:23 -0700
On Friday, 6 September 2019 05:56:28 PDT Niall Douglas wrote:
> > I was very clear in the subject of the email: filenames for interchange. I
> > knew the discussion of handles would come about.
> >
> > You can't store a handle in a file, not in any OS I am familiar with.
>
> Actually, you can, every inode is uniquely identified on a system by
> st_dev + st_ino. What you do is convert those into hex, and hardlink
> your inode into some common directory e.g. /store/inodes/HEX. Your JSON
> file then just lists the unique number identifying the inode, no paths.

If you can mandate what path names must exist, then the original problem
disappears. All that is required is that the tooling involved agree on what
names they must use for this cache directory.

I also don't think your proposal solves the problem, because handles wouldn't
solve the problem either. I'm making an assumption that is not stated in the
paper here, but knowing what Make does, it needs to work with file
replacements as well. That is, if I do a system upgrade and it updates
/usr/include/stdlib.h or if I do a git pull and it updates dependency.cpp,
then those *new* files with the same name will have different inodes. And yet
they are what's referenced in the payload that we're discussing.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

Received on 2019-09-06 16:38:31