Skip to content

Fix Unsafe Build Flags error#876

Open
timi2506 wants to merge 2 commits intotwostraws:mainfrom
timi2506:main
Open

Fix Unsafe Build Flags error#876
timi2506 wants to merge 2 commits intotwostraws:mainfrom
timi2506:main

Conversation

@timi2506
Copy link
Copy Markdown

@timi2506 timi2506 commented Apr 5, 2026

fix "error: 'ignite': the target 'Markdown' in product 'Markdown' contains unsafe build flags" by changing swift-markdown version to use version 0.7.1 which doesn't have the unsafe build flags

@timi2506 timi2506 marked this pull request as draft April 5, 2026 10:17
@timi2506
Copy link
Copy Markdown
Author

timi2506 commented Apr 5, 2026

also added a fix for the issues:

[3/125] Compiling InternalCollectionsUtilities Span+Extras.swift
/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:23:39: error: missing argument for parameter '_mutableSpan' in call
21 |     precondition(maxLength >= 0, "Cannot have a prefix of negative length")
22 |     let cut = Swift.min(maxLength, count)
23 |     guard cut > 0 else { return .init() }
   |                                       `- error: missing argument for parameter '_mutableSpan' in call
24 |     let result = self.extracting(first: cut)
25 |     self = self.extracting(droppingFirst: cut)

Swift.Span.init:2:8: note: 'init(_mutableSpan:)' declared here
1 | generic struct Span {
2 | public init(_mutableSpan mutableSpan: borrowing MutableSpan<Element>)}
  |        `- note: 'init(_mutableSpan:)' declared here
3 | 

/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:24:23: error: value of type 'Span<Element>' has no member 'extracting'
22 |     let cut = Swift.min(maxLength, count)
23 |     guard cut > 0 else { return .init() }
24 |     let result = self.extracting(first: cut)
   |                       `- error: value of type 'Span<Element>' has no member 'extracting'
25 |     self = self.extracting(droppingFirst: cut)
26 |     return result

/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:25:17: error: value of type 'Span<Element>' has no member 'extracting'
23 |     guard cut > 0 else { return .init() }
24 |     let result = self.extracting(first: cut)
25 |     self = self.extracting(droppingFirst: cut)
   |                 `- error: value of type 'Span<Element>' has no member 'extracting'
26 |     return result
27 |   }

/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:34:39: error: missing argument for parameter '_mutableSpan' in call
32 |     precondition(maxLength >= 0, "Cannot have a suffix of negative length")
33 |     let cut = Swift.min(maxLength, count)
34 |     guard cut > 0 else { return .init() }
   |                                       `- error: missing argument for parameter '_mutableSpan' in call
35 |     let result = self.extracting(last: cut)
36 |     self = self.extracting(droppingLast: cut)

Swift.Span.init:2:8: note: 'init(_mutableSpan:)' declared here
1 | generic struct Span {
2 | public init(_mutableSpan mutableSpan: borrowing MutableSpan<Element>)}
  |        `- note: 'init(_mutableSpan:)' declared here
3 | 

/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:35:23: error: value of type 'Span<Element>' has no member 'extracting'
33 |     let cut = Swift.min(maxLength, count)
34 |     guard cut > 0 else { return .init() }
35 |     let result = self.extracting(last: cut)
   |                       `- error: value of type 'Span<Element>' has no member 'extracting'
36 |     self = self.extracting(droppingLast: cut)
37 |     return result

/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:36:17: error: value of type 'Span<Element>' has no member 'extracting'
34 |     guard cut > 0 else { return .init() }
35 |     let result = self.extracting(last: cut)
36 |     self = self.extracting(droppingLast: cut)
   |                 `- error: value of type 'Span<Element>' has no member 'extracting'
37 |     return result
38 |   }
[4/125] Compiling InternalCollectionsUtilities RandomAccessCollection+Offsets.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/132] Emitting module InternalCollectionsUtilities
/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:23:39: error: missing argument for parameter '_mutableSpan' in call
21 |     precondition(maxLength >= 0, "Cannot have a prefix of negative length")
22 |     let cut = Swift.min(maxLength, count)
23 |     guard cut > 0 else { return .init() }
   |                                       `- error: missing argument for parameter '_mutableSpan' in call
24 |     let result = self.extracting(first: cut)
25 |     self = self.extracting(droppingFirst: cut)

Swift.Span.init:2:8: note: 'init(_mutableSpan:)' declared here
1 | generic struct Span {
2 | public init(_mutableSpan mutableSpan: borrowing MutableSpan<Element>)}
  |        `- note: 'init(_mutableSpan:)' declared here
3 | 

/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:24:23: error: value of type 'Span<Element>' has no member 'extracting'
22 |     let cut = Swift.min(maxLength, count)
23 |     guard cut > 0 else { return .init() }
24 |     let result = self.extracting(first: cut)
   |                       `- error: value of type 'Span<Element>' has no member 'extracting'
25 |     self = self.extracting(droppingFirst: cut)
26 |     return result

/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:25:17: error: value of type 'Span<Element>' has no member 'extracting'
23 |     guard cut > 0 else { return .init() }
24 |     let result = self.extracting(first: cut)
25 |     self = self.extracting(droppingFirst: cut)
   |                 `- error: value of type 'Span<Element>' has no member 'extracting'
26 |     return result
27 |   }

/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:34:39: error: missing argument for parameter '_mutableSpan' in call
32 |     precondition(maxLength >= 0, "Cannot have a suffix of negative length")
33 |     let cut = Swift.min(maxLength, count)
34 |     guard cut > 0 else { return .init() }
   |                                       `- error: missing argument for parameter '_mutableSpan' in call
35 |     let result = self.extracting(last: cut)
36 |     self = self.extracting(droppingLast: cut)

Swift.Span.init:2:8: note: 'init(_mutableSpan:)' declared here
1 | generic struct Span {
2 | public init(_mutableSpan mutableSpan: borrowing MutableSpan<Element>)}
  |        `- note: 'init(_mutableSpan:)' declared here
3 | 

/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:35:23: error: value of type 'Span<Element>' has no member 'extracting'
33 |     let cut = Swift.min(maxLength, count)
34 |     guard cut > 0 else { return .init() }
35 |     let result = self.extracting(last: cut)
   |                       `- error: value of type 'Span<Element>' has no member 'extracting'
36 |     self = self.extracting(droppingLast: cut)
37 |     return result

/Users/timi2506/Desktop/Xcode Projects/timi2506/.build/checkouts/swift-collections/Sources/InternalCollectionsUtilities/Span+Extras.swift:36:17: error: value of type 'Span<Element>' has no member 'extracting'
34 |     guard cut > 0 else { return .init() }
35 |     let result = self.extracting(last: cut)
36 |     self = self.extracting(droppingLast: cut)
   |                 `- error: value of type 'Span<Element>' has no member 'extracting'
37 |     return result
38 |   }

by changing the version of swift-collections to be EXACTLY 1.1.4

@timi2506 timi2506 marked this pull request as ready for review April 5, 2026 10:20
@MrSkwiggs
Copy link
Copy Markdown
Collaborator

Thanks for the submission @timi2506 🙏
Upgrading the min version of Swift Markdown should be fine, but I do not believe setting Swift Collections to a fixed 1.14 version is the right move here. Could you:

  1. Explain why/when that issue causes problems for you
  2. What else you've tried

Then based on that we could potentially find a better solution.

With that said, that would change the scope of this PR, so I simply recommend leaving out the Swift Collection fix for now so we can resolve the immediate issue at hand

@timi2506
Copy link
Copy Markdown
Author

timi2506 commented Apr 6, 2026

Hi!
i changed Swift-Collections to the fixed version because the current Version was causing issues and the fixed version provided was the minimum version required by Ignite and when i changed it to use that it worked

@twostraws
Copy link
Copy Markdown
Owner

@timi2506 Is this a Swift version problem, perhaps?

@timi2506
Copy link
Copy Markdown
Author

timi2506 commented Apr 7, 2026

Yea, it could be, I'm using swift 6.2 from the latest Xcode beta

@twostraws
Copy link
Copy Markdown
Owner

I see. Given that Swift 6.3 is the latest stable version, do you think you could check there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants