Skip to content

Commit

Permalink
Fix the compilation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pepicrft committed Dec 3, 2023
1 parent 403f2d2 commit 5c1814d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
13 changes: 11 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
// swift-tools-version: 5.9
// swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Path",
platforms: [
.macOS(.v10_15)
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
Expand All @@ -16,7 +19,13 @@ let package = Package(
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "Path"
name: "Path",
cxxSettings: [
.define("_CRT_SECURE_NO_WARNINGS", .when(platforms: [.windows])),
],
linkerSettings: [
.linkedLibrary("Pathcch", .when(platforms: [.windows])),
]
),
.testTarget(
name: "PathTests",
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Ftuist%2FPath%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/tuist/Path)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Ftuist%2FPath%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/tuist/Path)
[![Netlify Status](https://api.netlify.com/api/v1/badges/69daef71-b1cf-4d37-96ad-216cb953e668/deploy-status)](https://app.netlify.com/sites/Path/deploys)
[![Path](https://github.com/tuist/Path/actions/workflows/Path.yml/badge.svg)](https://github.com/tuist/Path/actions/workflows/Path.yml)


Expand Down
8 changes: 1 addition & 7 deletions Sources/Path/Path.swift
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ extension Path {
// in fact, it might well be best to return a custom iterator so we
// don't have to allocate everything up-front. It would be backed by
// the path string and just return a slice at a time.
let components = string.components(separatedBy: "/").filter { !$0.isEmpty }
let components = string.split(separator: "/").map(String.init).filter { !$0.isEmpty }

if string.hasPrefix("/") {
return ["/"] + components
Expand Down Expand Up @@ -989,12 +989,6 @@ extension AbsolutePath {
}
}

extension PathValidationError: CustomNSError {
public var errorUserInfo: [String: Any] {
[NSLocalizedDescriptionKey: description]
}
}

// FIXME: We should consider whether to merge the two `normalize()` functions.
// The argument for doing so is that some of the code is repeated; the argument
// against doing so is that some of the details are different, and since any
Expand Down

0 comments on commit 5c1814d

Please sign in to comment.