File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Sources/SwiftDriver/Utilities Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 12
12
import TSCBasic
13
13
14
14
/// A virtual path.
15
- public enum VirtualPath : Hashable {
15
+ public enum VirtualPath : Hashable , CustomStringConvertible {
16
16
/// A relative path that has not been resolved based on the current working
17
17
/// directory.
18
18
case relative( RelativePath )
@@ -40,9 +40,7 @@ public enum VirtualPath: Hashable {
40
40
}
41
41
42
42
/// The name of the path for presentation purposes.
43
- ///
44
- /// FIXME: Maybe this should be debugDescription or description
45
- public var name : String {
43
+ public var description : String {
46
44
switch self {
47
45
case . relative( let path) :
48
46
return path. pathString
@@ -153,9 +151,9 @@ extension VirtualPath {
153
151
public func replacingExtension( with fileType: FileType ) throws -> VirtualPath {
154
152
let pathString : String
155
153
if let ext = self . extension {
156
- pathString = String ( name . dropLast ( ext. count + 1 ) )
154
+ pathString = String ( description . dropLast ( ext. count + 1 ) )
157
155
} else {
158
- pathString = name
156
+ pathString = description
159
157
}
160
158
161
159
return try VirtualPath ( path: pathString. appendingFileTypeExtension ( fileType) )
You can’t perform that action at this time.
0 commit comments