pointfreeco / swift-issue-reporting

Report issues in your application and library code as Xcode runtime warnings, breakpoints, assertions, and do so in a testable manner.
https://www.pointfree.co
MIT License
368 stars 60 forks source link

Building on swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-19-a causes a concurrency error #96

Closed xtremekforever closed 1 month ago

xtremekforever commented 1 month ago

Not sure if this is an error in this build of Swift 6.0, but I'm getting errors about stderr not being concurrency safe:

Building for debugging...
/workspaces/MySwiftApp/.build/checkouts/swift-issue-reporting/Sources/IssueReporting/Internal/Warn.swift:9:25: error: reference to var 'stderr' is not concurrency-safe because it involves shared mutable state
  fputs("\(message)\n", stderr)
                        ^
SwiftGlibc.stderr:1:12: note: var declared here
public var stderr: UnsafeMutablePointer<FILE>!
           ^
/workspaces/MySwiftApp/.build/checkouts/swift-issue-reporting/Sources/IssueReporting/Internal/Warn.swift:9:25: error: reference to var 'stderr' is not concurrency-safe because it involves shared mutable state
  fputs("\(message)\n", stderr)
                        ^
SwiftGlibc.stderr:1:12: note: var declared here
public var stderr: UnsafeMutablePointer<FILE>!
           ^
/workspaces/MySwiftApp/.build/checkouts/swift-issue-reporting/Sources/IssueReporting/Internal/Warn.swift:9:25: error: reference to var 'stderr' is not concurrency-safe because it involves shared mutable state
  fputs("\(message)\n", stderr)
                        ^
SwiftGlibc.stderr:1:12: note: var declared here
public var stderr: UnsafeMutablePointer<FILE>!
           ^
/workspaces/MySwiftApp/.build/checkouts/swift-issue-reporting/Sources/IssueReporting/Internal/Warn.swift:9:25: error: reference to var 'stderr' is not concurrency-safe because it involves shared mutable state
  fputs("\(message)\n", stderr)
                        ^
SwiftGlibc.stderr:1:12: note: var declared here
public var stderr: UnsafeMutablePointer<FILE>!
           ^
/workspaces/MySwiftApp/.build/checkouts/swift-issue-reporting/Sources/IssueReporting/Internal/Warn.swift:9:25: error: reference to var 'stderr' is not concurrency-safe because it involves shared mutable state
  fputs("\(message)\n", stderr)
                        ^
SwiftGlibc.stderr:1:12: note: var declared here
public var stderr: UnsafeMutablePointer<FILE>!

My project is on the latest release of swift-issue-reporting:

{
      "identity" : "swift-issue-reporting",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/pointfreeco/swift-issue-reporting",
      "state" : {
        "revision" : "926f43898706eaa127db79ac42138e1ad7e85a3f",
        "version" : "1.2.0"
      }
    },

I'll try to downgrade to the previous release and see if that had the same issue. But, thought I'd let you know. Also, my project is using the latest swift-tools-version:

// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
mbrandonw commented 1 month ago

Hi @xtremekforever, this was fixed in #93 and will be released later today.

xtremekforever commented 1 month ago

Okay sweet! Sorry I did not notice that it had been fixed already- I only checked the closed Issues on this project and did not notice that there was a pull request.