Lines Matching +full:cache +full:- +full:dependency +full:- +full:path
9 // http://www.apache.org/licenses/LICENSE-2.0
31 Sample dependency files. Notable features we have to deal with:
53 /// Read file names from the dependency file to the right of ':'
55 /// <param name="protoDepDir">Relative path to the dependency cache, e. g. "out"</param>
56 /// <param name="proto">Relative path to the proto item, e. g. "foo/file.proto"</param>
60 /// array if the dependency file does not exist or cannot be parsed.
76 // Start at the only line separating dependency outputs from inputs. in ReadDependencyInputs()
77 int ix = skip ? FindLineSeparator(line) : -1; in ReadDependencyInputs()
84 $"Skipping unparsable dependency file {depFilename}.\nLine with error: '{line}'"); in ReadDependencyInputs()
100 /// Read file names from the dependency file to the left of ':'
102 /// <param name="depFilename">Path to dependency file written by protoc</param>
105 /// Array of the protoc-generated outputs from the given dependency file
111 /// file causes an error-level message to be logged.
129 log.LogError("Unable to parse generated dependency file {0}.\n" + in ReadDependencyOutputs()
142 /// Construct relative dependency file name from directory hash and file name
144 /// <param name="protoDepDir">Relative path to the dependency cache, e. g. "out"</param>
145 /// <param name="proto">Relative path to the proto item, e. g. "foo/file.proto"</param>
147 /// Full relative path to the dependency file, e. g.
156 string filename = Path.GetFileNameWithoutExtension(proto); in GetDepFilenameForProto()
157 return Path.Combine(protoDepDir, $"{dirhash}_{filename}.protodep"); in GetDepFilenameForProto()
163 /// <param name="outputDir">Relative path to the output directory, e. g. "out"</param>
164 /// <param name="proto">Relative path to the proto item, e. g. "foo/file.proto"</param>
166 /// Full relative path to the directory, e. g. "out/deadbeef12345678"
174 return Path.Combine(outputDir, dirhash); in GetOutputDirWithHash()
180 /// <param name="proto">Relative path to the proto item, e. g. "foo/file.proto"</param>
187 /// proto file names directory. The directory path can be arbitrary, for example,
188 /// it can be outside of the project, or an absolute path including a drive letter,
189 /// or a UNC network path. A name constructed from such a path by, for example,
191 /// filesystem's allowed path length, since it will be located under the project
193 /// Instead of creating long and unwieldy names for these proto sources, we cache
194 /// the full path of the name without the filename, as in e. g. "foo/file.proto"
196 /// of the string "foo". This allows the path to be short, unique (up to a hash
201 string dirname = Path.GetDirectoryName(proto); in GetDirectoryHash()
210 // Get a 64-bit hash for a directory string. We treat it as if it were
236 if (beg < end && end == line.Length && line[end - 1] == '\\') end--; in ExtractFilenameFromLine()
237 while (beg < end && char.IsWhiteSpace(line[end - 1])) end--; in ExtractFilenameFromLine()
240 string filename = line.Substring(beg, end - beg); in ExtractFilenameFromLine()
244 return Path.Combine(Path.GetDirectoryName(filename), Path.GetFileName(filename)); in ExtractFilenameFromLine()
252 // Finds the index of the ':' separating dependency clauses in the line,
254 // separating ':', or -1 if no separator found.
260 if (ix <= 0 || ix == line.Length - 1 in FindLineSeparator()
262 || !char.IsLetter(line[ix - 1])) in FindLineSeparator()
266 for (int j = ix - 1; --j >= 0;) in FindLineSeparator()
276 // Read entire dependency file. The 'required' parameter controls error
287 log.LogMessage(MessageImportance.Low, $"Using dependency file {filename}"); in ReadDepFileLines()