FlineDev / BartyCrouch

Localization/I18n: Incrementally update/translate your Strings files from .swift, .h, .m(m), .storyboard or .xib files.
MIT License
1.37k stars 121 forks source link

error: the target 'SwiftSyntax' in product 'SwiftSyntax' contains unsafe build flags #249

Closed philviso-reverb closed 2 years ago

philviso-reverb commented 2 years ago

Our app has a bootstrap script we run to set up new development environments. The script installs homebrew, mint, and then builds bartycrouch through mint. Recently this script started failing to build bartycrouch. Something changed with how SwiftSyntax includes unsafe flags in its Package.swift file, and it seems like it's including them in cases where it didn't used to. When I pin the SwiftSyntax version to exact version "0.50500.0" instead of from version, the build works again. Not sure what the best longterm fix is here though.

Here's a commit of what I mean (it's being changed from revision because I tried that as well - also worked). I can put up a PR for this if needed.

https://github.com/philviso-reverb/BartyCrouch/commit/a2ecc766ba981ed0fff3f1f591bd39a08b1a7207

Expected Behavior

bartycrouch builds successfully

Actual Behavior

bartycrouch build fails with this error...

'SwiftSyntax' 
error: the target 'SwiftSyntax' in product 'SwiftSyntax' contains unsafe build flags

More information about that error:

https://forums.swift.org/t/question-about-contains-unsafe-build-flags-in-spm/47677

Steps to Reproduce the Problem

  1. Install mint
  2. Create a Mintfile with these contents
Flinesoft/BartyCrouch@4.9.0
nicklockwood/SwiftFormat@0.48.18
realm/SwiftLint@0.45.0

(Not sure if that other stuff matters, but figured I'd throw it in here just in case it does)

  1. run mint bootstrap

Specifications

Jeehut commented 2 years ago

@philviso-reverb Thank you for reporting this. This issue does not lie with BartyCrouch itself but rather the SwiftSyntax library of Apple. I am eagerly waiting for the issue to be resolved to make a new release with a fix. See my comment here: https://github.com/Flinesoft/BartyCrouch/issues/201#issuecomment-1069019241

philviso-reverb commented 2 years ago

@Jeehut Thanks for the update!

FlineDevPublic commented 2 years ago

@philviso-reverb I just released version 4.10.0 with a fix. Should be live once https://github.com/Homebrew/homebrew-core/pull/97188 is merged. 🎉


This comment was written during my regular Open Source live stream on Twitch. Follow me there to support my work!

philviso-reverb commented 2 years ago

@FlineDevPublic Thanks! (Sorry for the late reply, I totally missed your comment)