         fileSystem: TSCBasic.FileSystem
     ) throws -> PackageDependency {
         // cleans up variants of path based location
-        var location = try fixDependencyLocation(fileSystem: fileSystem, packageKind: packageKind, dependencyLocation: location)
+        var location = try sanitizeDependencyLocation(fileSystem: fileSystem, packageKind: packageKind, dependencyLocation: location)
         // location mapping (aka mirrors) if any
         location = identityResolver.mappedLocation(for: location)
         // a package in a git location, may be a remote URL or on disk

            }
            return AbsolutePath(location).pathString
        } else if parseScheme(dependencyLocation) == nil {
            // If the dependency URL is not remote, try to "fix" it.
            // If the URL has no scheme, we treat it as a path (either absolute or relative to the base URL).
            return AbsolutePath(dependencyLocation, relativeTo: packagePath).pathString
        }

        return dependencyLocation
    }

    private static func parsePlatforms(_ package: JSON) throws -> [PlatformDescription] {

        }
    }

    private static func sanitizeDependencyLocation(fileSystem: TSCBasic.FileSystem, packageKind: PackageReference.Kind, dependencyLocation: String) throws -> String {
        if dependencyLocation.hasPrefix("~/") {
            // If the dependency URL starts with '~/', try to expand it.
            return fileSystem.homeDirectory.appending(RelativePath(String(dependencyLocation.dropFirst(2)))).pathString
