Closed andre-alves closed 5 months ago
Similar to @mattrobmattrob's question, maybe we change it up a bit:
let impliedExtension = ext ?? Xcode.impliedExtension(basename: name)
let fileTypeType = calculateFileTypeType(basename: name, extension: impliedExtension)
let fileType = Xcode.pbxProjEscapedFileType(extension: impliedExtension) ?? "file"
Xcode.impliedExtension
would turn BUILD
and Podfile
into bazel
and rb
. calculateFileTypeType
would turn bazel
and bzl
extensions or Podfile
basename into "explicitFileType"
otherwise "implicitFileType"
.
Thoughts?
BUILD.bazel and .bzl files are not being recognized as a text.script.python in Xcode when using the incremental generator.
Replacing lastKnownFileType with explicitFileType for these extensions fixed the issue.