<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Feb 20, 2014, at 4:34 PM, Ben Langmuir <<a href="mailto:blangmuir@apple.com">blangmuir@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>On Feb 20, 2014, at 4:11 PM, Ben Langmuir <<a href="mailto:blangmuir@apple.com">blangmuir@apple.com</a>> wrote:<br><br><blockquote type="cite"><br>On Feb 20, 2014, at 11:22 AM, Argyrios Kyrtzidis <<a href="mailto:kyrtzidis@apple.com">kyrtzidis@apple.com</a>> wrote:<br><br><blockquote type="cite">On Feb 20, 2014, at 10:02 AM, Ben Langmuir <<a href="mailto:blangmuir@apple.com">blangmuir@apple.com</a>> wrote:<br><br><blockquote type="cite"><br><blockquote type="cite">I think it is better to move the YAML VFS description to a new file under 'docs/'. This file format is API, and should be documented.<br></blockquote><br>Can this wait until we have more practical experience with the file format? Things in docs/ tend to have better documentation that what I've written here, and I don't want to put a lot of effort into this until we're sure this is the right format.<br></blockquote><br>+1, we are far from the point of committing to API, this is still in flux.<br><br><blockquote type="cite"><br><blockquote type="cite">Unrelated to this patch, but how do we keep track of the current working directory? Or we don't just yet?<br></blockquote><br>We don't :)  I'll look at whether that is simple to do now, or can wait.  It won't be exercised until we use the VFS outside of FileManager, since FileManager always creates absolute paths I think.<br></blockquote><br>FileManager has FileSystemOptions which has the “-working-directory” option, we should probably take advantage of that.<br><br><blockquote type="cite"><br>================<br>Comment at: lib/Basic/VirtualFileSystem.cpp:260<br>@@ +259,3 @@<br>+/// Possible configuration settings are<br>+///   'case-sensitive': <boolean><br>+///<br>----------------<br>Dmitri Gribenko wrote:<br><blockquote type="cite">Is it optional?  If so, what is the default?<br><br>Please also add a mandatory version field, and refuse to load files with incorrect version.  I hope we will never have to bump the version and evolve the format in a compatible way, but who knows...<br></blockquote>It is optional, which is mentioned above.  I will specify its default value.<br><br>The version is going to make my unit tests ugly, but I see your point.<br></blockquote><br>Do we need something standard at the beginning (something equivalent to a "<?xml version="1.0" encoding="UTF-8”?>”) that we can sniff out to figure out if it is json or binary format ?<br>I would prefer that if we move to binary format, the build system would need no changes at all (e.g. not require that the build system changes the file extension).<br><br></blockquote><br>We could use the YAML version string<br>%YAML 1.2<br></blockquote><br>Actually, if we go this route we should encode our own version number in the same place for compactness.  In YAML, we could use a tag for this<br><br>%TAG ! tag:vfs-yaml-file,version:1234<br><br>Where 1234 is a made up version number for our vfs format.<br></div></blockquote><div><br></div><div>SGTM.</div><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>Ben<br><br><blockquote type="cite"><br>It’s not legal JSON, but I don’t see any reason to be strict about JSON conformance as long as our parser works.<br><br>Ben</blockquote></div></blockquote></div><br></body></html>