You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is expected that absolute header-unit names convert to relative CMI names, to keep all CMIs within the CMI repository. This means that steps must be taken to distinguish the CMIs for /here from ./here, and this can be achieved by replacing the leading ./ directory with ,/, which is visually similar but does not have the self-reference semantics of dot. Likewise, header-unit names containing .. directories, can be remapped to ,,. (When symlinks are involved bob/dob/.. might not be bob, of course.) C++ header-unit semantics are such that there is no need to resolve multiple ways of spelling a particular header-unit to a unique CMI file.
Just want to mention the alternative approach that we use in build2: instead of trying to sanitize the path we hash it and then use the abbreviated hash as the BMI file name. More specifically (comment from the code):
// What should we use as a file/target name? On one hand we want it
// unique enough so that <stdio.h> and <custom/stdio.h> don't end up
// with the same BMI. On the other, we need the same headers resolving
// to the same target, regardless of how they were imported. So it feels
// like the name should be the absolute and normalized (actualized on
// case-insensitive filesystems) header path. We could try to come up
// with something by sanitizing certain characters, etc. But then the
// names will be very long and ugly, they will run into path length
// limits, etc. So instead we will use the file name plus an abbreviated
// hash of the whole path, something like stdio-211321fe6de7.
The text was updated successfully, but these errors were encountered:
From the
README
:Just want to mention the alternative approach that we use in
build2
: instead of trying to sanitize the path we hash it and then use the abbreviated hash as the BMI file name. More specifically (comment from the code):The text was updated successfully, but these errors were encountered: