Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PropertyListModifier failing in Xcode 15 beta #17

Open
jeff-h opened this issue Jul 15, 2023 · 8 comments
Open

PropertyListModifier failing in Xcode 15 beta #17

jeff-h opened this issue Jul 15, 2023 · 8 comments

Comments

@jeff-h
Copy link

jeff-h commented Jul 15, 2023

Just wondering if anyone else has attempted to build using an Xcode 15 beta. I've tried beta 4 and beta 2 and both fail to build: Command PhaseScriptExecution failed with a nonzero exit code.

As per the docs I have added a build phase to run PropertyListModifier.swift.

image

When building the following error is thrown:

image
The full error:

JIT session error: Symbols not found: [ _$s9CryptoKit6SHA256VMa, _$s9CryptoKit6SHA256VAA12HashFunctionAAMc, _$s9CryptoKit12SHA256DigestVSTAAMc, _$s9CryptoKit6SHA256V8finalizeAA0C6DigestVyF, _$s9CryptoKit6SHA256VACycfC, _$s9CryptoKit12SHA256DigestVMa, _$s9CryptoKit12HashFunctionPAAE6update4datayqd___t10Foundation12DataProtocolRd__lF ]
Failed to materialize symbols: { (main, { _$s20PropertyListModifier13BundleVersionON, _$sSo16NSURLResourceKeyaABs20_SwiftNewtypeWrapperSCWL, _$sS2Ss21_ObjectiveCBridgeable10FoundationWl, _$s20PropertyListModifier13BundleVersionO7versionACSgSS_tcfC, _got.$sSHMp, $sSo13NSFileManagerC10FoundationE10enumerator2at26includingPropertiesForKeys7options12errorHandlerSo21NSDirectoryEnumeratorCSgAC3URLV_SaySo16NSURLResourceKeyaGSgSo0M18EnumerationOptionsVSbAM_s5Error_ptcSgtFfA1, _$sSo16NSURLResourceKeyaMF, _$sSo16NSURLResourceKeyaABSHSCWL, _got.$sSHSQTb, _$sSo16NSURLResourceKeyaABSHSCWl, _$s20PropertyListModifier10TargetTypeOACSYAAWl, _$s20PropertyListModifier10TargetTypeOMa, _$sSo16NSURLResourceKeyaMB, _got.$sSH9hashValueSivgTq, _got.$sSH4hash4intoys6HasherVz_tFTq, _$sSo16NSURLResourceKeyaMf, _$sSayyyKcGSayxGSlsWl, _got.$sSH13_rawHashValue4seedS2i_tFTq, _$sSo16NSURLResourceKeyaABs20_SwiftNewtypeWrapperSCWl, _$sSo16NSURLResourceKeyaML, _$s20PropertyListModifier13BundleVersionOMa, $ss5print_9separator10terminatoryypd_S2StFfA0, _$ss16IndexingIteratorVySayyyKcGGWOh, _$sSo16NSURLResourceKeyaMn, _$s20PropertyListModifier10TargetTypeOSHAAMc, _$syts5Error_pIegrzo_sAA_pIegzo_TR, $ss5print_9separator10terminatoryypd_S2StFfA1, _symbolic _____ 20PropertyListModifier10TargetTypeO, ___swift_memcpy1_1, _got.$sSY8rawValuexSg03RawB0Qz_tcfCTq, _symbolic $sSY, _$s20PropertyListModifier20determineScriptTasksSayyyKcGyKF, _$s20PropertyListModifier11ScriptErrorOMa, _swift_FORCE_LOAD$swiftIOKit$_PropertyListModifier, _got.$s8RawValueSYTl, ___swift_noop_void_return, _got.$sSYMp, _swift_FORCE_LOAD$swiftFoundation$_PropertyListModifier, _$ss16IndexingIteratorVySnySiGGMD, _got.$ss5ErrorP5_codeSivgTq, _$s20PropertyListModifier06updateaB11WithEntries_6atPathySDySSs11AnyHashableVG_10Foundation3URLVtKF, _$sSSSg_AAtWOh, _$sS2sSysWL, _$s20PropertyListModifier06removeaB7Entries7forKeys6atPathySaySSG_10Foundation3URLVtKF, ___swift_memcpy25_8, ___swift_project_boxed_opaque_existential_0, _got.$ss5ErrorP9_userInfoyXlSgvgTq, _symbolic _____ySnySiGG s16IndexingIteratorV, _$s20PropertyListModifier05writeaB06atPath7entries6formaty10Foundation3URLV_So12NSDictionaryCSo010NSPropertyB6FormatVtKF, _got.$ss5ErrorP19_getEmbeddedNSErroryXlSgyFTq, _$sS2iSZsWL, _got.$sSQMp, _$sSSSgWOc, _$s20PropertyListModifier11ScriptErrorOs0E0AAMc, _$sSa12_endMutationyyF, _$sSnySiGMD, $s10Foundation4DataV5write2to7optionsyAA3URLV_So20NSDataWritingOptionsVtKFfA0, _got.$sSQ2eeoiySbx_xtFZTq, _$sSn16_uncheckedBoundsSnyxGx5lower_x5uppert_tcfC, _symbolic SnySiG, $s10Foundation4DataV10contentsOf7optionsAcA3URLVh_So20NSDataReadingOptionsVtKcfcfA0, _$sSnySiGSnyxGSlsSxRzSZ6StrideRpzrlWl, _$sSnySiGSnyxGSlsSxRzSZ6StrideRpzrlWL, _$sSayyyKcGWOh, _$s20PropertyListModifier11ScriptErrorOACs0E0AAWL, _$s20PropertyListModifier10TargetTypeOSQAAMc, _$s20PropertyListModifier11ScriptErrorOACs0E0AAWl, _$s20PropertyListModifier10TargetTypeOACSYAAWL, _$s20PropertyListModifier10TargetTypeOACSQAAWL, _$sSSWOh, _$s20PropertyListModifier04readaB06atPathSo19NSMutableDictionaryC7entries_So010NSPropertyB6FormatV6formatt10Foundation3URLV_tKF, $sSLsE3zzloiySnyxGx_xtFZSbyXEfu, _$sS2Ss21_ObjectiveCBridgeable10FoundationWL, _symbolic SS, _associated conformance 20PropertyListModifier10TargetTypeOSHAASQ, _$sSay10Foundation3URLVGSayxGSlsWL, _$sSo16NSURLResourceKeyaSYSCSY8rawValue03RawD0QzvgTW, _symbolic ______p s5ErrorP, _$ss5Error_pMD, _$sSay10Foundation3URLVGMD, _symbolic SayyyKcG, _symbolic Say_____G 10Foundation3URLV, _$sSo16NSURLResourceKeya8rawValueABSS_tcfC, _$s10Foundation3URLVSgMD, _$s20PropertyListModifier10LabelEntrySS3key_SS5valuetyKF, _$sSayyyKcGMD, _$sSayyyKcGSayxGSlsWL, _$s20PropertyListModifier28SMPrivilegedExecutablesEntrySS3key_SDyS2SG5valuetyKF, _$sSo16NSURLResourceKeya8rawValueSSvg, _symbolic _____Sg 10Foundation3URLV, _got.$s10Foundation3URLVMn, _got.$ss16IndexingIteratorVMn, _$sSo16NSURLResourceKeyaABSYSCWl, _$sSo16NSURLResourceKeyaSYSCSY8rawValuexSg03RawD0Qz_tcfCTW, _$s20PropertyListModifier29organizationalUnitRequirementSSyKF, _$s20PropertyListModifier24SMAuthorizedClientsEntrySS3key_SaySSG5valuetyKF, _$sSo16NSURLResourceKeyaABs35_HasCustomAnyHashableRepresentationSCWl, _symbolic _____ySayyyKcGG s16IndexingIteratorV, _$sS2us17FixedWidthIntegersWL, _$sSo16NSURLResourceKeyas21_ObjectiveCBridgeableSCsACP024_conditionallyBridgeFromC1C_6resultSb01_C5CTypeQz_xSgztFZTW, _$ss16IndexingIteratorVySayyyKcGGMD, symbolic yt______pIegrzo s5ErrorP, _$sS2iSZsWl, _$sS2SSlsWL, _$s20PropertyListModifier28readEnvironmentVariableAsURL4name11description13isUserDefined10Foundation0H0VSS_SSSbtKF, _got.$ss5ErrorP7_domainSSvgTq, _$sSaySSGMD, _$s10Foundation3URLVACs23CustomStringConvertibleAAWL, _symbolic ______p s7CVarArgP, _$s20PropertyListModifier11hashSourcesSSyKF, _$s20PropertyListModifier15MachServicesKeySSvp, _$s20PropertyListModifier04infoaB4Path10Foundation3URLVyKF, _$s20PropertyListModifier11ScriptErrorOWOe, _symbolic _____pIegzo s5ErrorP, _$s20PropertyListModifier07launchdaB4Path10Foundation3URLVyKF, ___swift_memcpy24_8, _got.$ss7CVarArgMp, _$s10Foundation4DataVAcA0B8ProtocolAAWL, _$s20PropertyListModifier26SMPrivilegedExecutablesKeySSvp, _$s9CryptoKit6SHA256VAcA12HashFunctionAAWL, _$s20PropertyListModifier23appleGenericRequirementSSvp, _$s20PropertyListModifier23readEnvironmentVariable4name11description13isUserDefinedS2S_SSSbtKF, _$s20PropertyListModifier11scriptTasksSDySSyyKcGvp, _$s20PropertyListModifier11ScriptErrorOWOy, _$sSo16NSURLResourceKeyaSHSCSH9hashValueSivgTW, _$sSaySSGSayxGSKsWL, _$sSo16NSURLResourceKeyaSQSCSQ2eeoiySbx_xtFZTW, _main, _symbolic SS_yyKct, _$sSo16NSURLResourceKeyaSHSCSH4hash4intoys6HasherVz_tFTW, _symbolic SaySSG, _$sSS_yyKctMD, ___swift_instantiateConcreteTypeFromMangledName, _$s9CryptoKit12SHA256DigestVACSTAAWL, _got.$ss5ErrorMp, _$sSo16NSURLResourceKeyas35_HasCustomAnyHashableRepresentationSCsACP03_todeF0s0eF0VSgyFTW, _$sSo16NSURLResourceKeyaSHSCSH13_rawHashValue4seedS2i_tFTW, _symbolic yyKc, _symbolic _____ySay_____GG s16IndexingIteratorV 10Foundation3URLV, _$sSo16NSURLResourceKeyaABSQSCWl, _$ss16IndexingIteratorVySay10Foundation3URLVGGMD, _$syyKcMD, ___swift_destroy_boxed_opaque_existential_1, _symbolic yp_ypt, _symbolic Su, _$s20PropertyListModifier27cleanupJobBlessRequirementsyyKF, _got.$ss35_HasCustomAnyHashableRepresentationMp, _$ss26DefaultStringInterpolationVWOh, _$ss11AnyHashableVWOh, _$syp_yptMD, _got.$sSD8IteratorVMn, _$sSo16NSURLResourceKeyaSYSCMc, _$ss11AnyHashableVWOc, _$s20PropertyListModifier19cleanupMachServicesyyKF, _got.$ss11AnyHashableVMn, _$sSD8IteratorV8_VariantOyxq___GSHRzr0_lWOe, _$sSD8IteratorVySSs11AnyHashableV_GMD, _$s20PropertyListModifier19specifyMachServicesyyKF, _symbolic _____ySS______G SD8IteratorV s11AnyHashableV, _$sSD8IteratorVySSs11AnyHashableV_GWOh, _got.$ss35_HasCustomAnyHashableRepresentationP03_tobcD0s0cD0VSgyFTq, _$sSS3key_s11AnyHashableV5valuetSgWOb, _$s20PropertyListModifier10TargetTypeO8rawValueSSvg, _$ss5Error_pIegzo_ytsAA_pIegrzo_TR, _$ss16IndexingIteratorVySaySSGGWOh, _symbolic SS______t s11AnyHashableV, _$sSS_s11AnyHashableVtMD, _$sSaySSGSayxGSlsWl, _$s20PropertyListModifier27satisfyJobBlessRequirementsyyKF, _$ss27_finalizeUninitializedArrayySayxGABnlF, _symbolic SDyS2SG, _$sSo19NSMutableDictionaryCMa, _$s20PropertyListModifier19determineTargetTypeAA0eF0OyKF, _$s20PropertyListModifier10TargetTypeO16bundleIdentifierSSyKF, _$sypWOc, _$s20PropertyListModifier10TargetTypeO8rawValueACSgSS_tcfC, _$sSDyS2SGMD, _$s20PropertyListModifier8LabelKeySSvp, _$ss7CVarArg_pMD, _$sSo16NSURLResourceKeyaMa, _$sSo16NSURLResourceKeyaABs35_HasCustomAnyHashableRepresentationSCWL, _$sSo19NSMutableDictionaryCML, _$sSaySSGSayxGSlsWL, _$s20PropertyListModifier18CFBundleVersionKeySSvp, _$sSo16NSURLResourceKeyas21_ObjectiveCBridgeableSCsACP09_bridgeToC1C01_C5CTypeQzyFTW, _associated conformance So16NSURLResourceKeyas20_SwiftNewtypeWrapperSCs35_HasCustomAnyHashableRepresentation, _symbolic _____ySaySSGG s16IndexingIteratorV, _$s20PropertyListModifier21CFBundleIdentifierKeySSvp, _got.$ss20_SwiftNewtypeWrapperPSYTb, _$sSo16NSURLResourceKeyas21_ObjectiveCBridgeableSCsACP026_unconditionallyBridgeFromC1Cyx01_C5CTypeQzSgFZTW, _$ss16IndexingIteratorVySaySSGGMD, _symbolic Su_S2ut, _$s20PropertyListModifier22SMAuthorizedClientsKeySSvp, _symbolic SS_SDySSSbGt, _got.$ss20_SwiftNewtypeWrapperPs35_HasCustomAnyHashableRepresentationTb, _symbolic Su_Sut, _$s20PropertyListModifier12BuildHashKeySSvp, _$s10Foundation6LocaleVSgWOh, ___swift_instantiateConcreteTypeFromMangledNameAbstract, _$sSS_SDySSSbGtMD, _$s20PropertyListModifier20autoIncrementVersionyyKF, _$sSo16NSURLResourceKeyas20_SwiftNewtypeWrapperSCMc, _$sS2SSysWl, _symbolic SS_Sbt, _got.$ss20_SwiftNewtypeWrapperMp, _symbolic _____ 20PropertyListModifier13BundleVersionO, _$sSaySSGSayxGSHsSHRzlWl, _$sSo16NSURLResourceKeyaSYSCMA, _$sSS_SbtMD, _$s20PropertyListModifier10TargetTypeOMn, _$s20PropertyListModifier13BundleVersionOMn, _$s20PropertyListModifier10TargetTypeOACSQAAWl, _symbolic SDySSSbG, _$sSDyS2SGSDyxq_GSHsSHR_rlWl, _symbolic SS_______pt s5ErrorP, _$sSDyS2SGWOh, _$sSDySSSbGMD, _got.$ss21_ObjectiveCBridgeableP09_bridgeToA1C01_A5CTypeQzyFTq, _$sSJWOh, _$s20PropertyListModifier10TargetTypeON, _symbolic _____ 20PropertyListModifier11ScriptErrorO, _got.$s15_ObjectiveCTypes01_A11CBridgeablePTl, _$sypWOb, $.PropertyListModifier.__inits.0, _$sS2SSlsWl, _$s20PropertyListModifier11ScriptErrorOMn, _$sypSgWOb, _$sSo16NSURLResourceKeyaSQSCMc, _$sypSgWOh, _$s20PropertyListModifierMXM, _got.$ss21_ObjectiveCBridgeableP024_conditionallyBridgeFromA1C_6resultSb01_A5CTypeQz_xSgztFZTq, _got.$ss21_ObjectiveCBridgeableP016_forceBridgeFromA1C_6resulty01_A5CTypeQz_xSgztFZTq, _$s10Foundation4DataVWOh, _$sSo16NSURLResourceKeyaSHSCMc, _associated conformance So16NSURLResourceKeyaSHSCSQ, _$s10Foundation4DataV15_RepresentationOWOe, _$s10Foundation3URLVACs23CustomStringConvertibleAAWl, _$sSo16NSURLResourceKeyaABSQSCWL, _got.$ss21_ObjectiveCBridgeableP026_unconditionallyBridgeFromA1Cyx01_A5CTypeQzSgFZTq, _$sSo16NSURLResourceKeyas35_HasCustomAnyHashableRepresentationSCMc, _associated conformance So16NSURLResourceKeyas20_SwiftNewtypeWrapperSCSY, _$s10Foundation4DataV15_RepresentationOWOy, _$sSoMXM, _$sSo16NSURLResourceKeyas21_ObjectiveCBridgeableSCsACP016_forceBridgeFromC1C_6resulty01_C5CTypeQz_xSgztFZTW, _$sSo16NSURLResourceKeyaABSYSCWL, ___swift_destroy_boxed_opaque_existential_0, _$sSo16NSURLResourceKeyas21_ObjectiveCBridgeableSCMc, _$sSSSgWOh, _$sSDyS2SGSDyxq_GSHsSHR_rlWL, _swift_FORCE_LOAD$swiftObjectiveC$_PropertyListModifier, _got.$sSY8rawValue03RawB0QzvgTq, _$s20PropertyListModifier13BundleVersionO9incrementACyF, _$s20PropertyListModifier17readBundleVersion08propertyB0AA0eF0OSo19NSMutableDictionaryC_tKF, _$s10Foundation4DataVAcA0B8ProtocolAAWl, _swift_FORCE_LOAD$swiftXPC$_PropertyListModifier, $ss17FixedWidthIntegerPsE_5radixxSgqd___SitcSyRd__lufcfA0, _$s10Foundation3URLVSgWOh, _$s9CryptoKit6SHA256VAcA12HashFunctionAAWl, _$sSaySSGSayxGSHsSHRzlWL, _$s20PropertyListModifier13BundleVersionO7versionSSvg, _swift_FORCE_LOAD$swiftCoreFoundation$_PropertyListModifier, _symbolic _____Sg 10Foundation6LocaleV, _$sSaySSGWOh, _got.$s10Foundation6LocaleVMn, _symbolic _____ So16NSURLResourceKeya, _$s20PropertyListModifier30incrementBundleVersionIfNeeded04infoaB4Pathy10Foundation3URLV_tKF, _swift_FORCE_LOAD$swiftDispatch$_PropertyListModifier, _$s10Foundation6LocaleVSgMD, _$sSaySSGSayxGSKsWl, _$s20PropertyListModifier10TargetTypeOSYAAMc, _symbolic So8NSStringC, $sSlsSQ7ElementRpzrlE5split9separator9maxSplits25omittingEmptySubsequencesSay11SubSequenceQzGAB_SiSbtFfA1, _$s20PropertyListModifier13readBuildHash08propertyB0SSSgSo19NSMutableDictionaryC_tKF, _symbolic SS_SSt, _got.$ss21_ObjectiveCBridgeableMp, _$sS2SSysWL, _$sSo16NSURLResourceKeyas21_ObjectiveCBridgeableSCMA, $sSlsSQ7ElementRpzrlE5split9separator9maxSplits25omittingEmptySubsequencesSay11SubSequenceQzGAB_SiSbtFfA0, _swift_FORCE_LOAD$swiftDarwin$_PropertyListModifier, _$s9CryptoKit12SHA256DigestVACSTAAWl, $sSKsSS7ElementRtzrlE6joined9separatorS2S_tFfA, _$ss16IndexingIteratorVySay10Foundation3URLVGGWOh, _$sSS_SStMD, _symbolic $ss21_ObjectiveCBridgeableP, _$sSay10Foundation3URLVGSayxGSlsWl, _$s20PropertyListModifier11ScriptErrorON, _$sS2sSysWl, _$sS2us17FixedWidthIntegersWl, _$s10FoundationMXM }) }
Command PhaseScriptExecution failed with a nonzero exit code

Xcode 14.3.1 builds the project just fine.

@norris-david
Copy link

I'm seeing this problem in Xcode RC Version 15.0 (15A240d) also. Any further update on how I can resolve it?

@jeff-h
Copy link
Author

jeff-h commented Sep 15, 2023

I hacked my way around it:

In PropertyListModifier.swift, I added an early return in the hashSources function:

return UUID().uuidString

This destroys some nice build process functionality — it essentially means the helper will be treated as new every time you build, even if nothing was changed.

@norris-david
Copy link

Thanks, looks to be an Apple Bug thats been logged under FB12857119 - i'll go back to Xcode 14 until it's fixed.

@jeff-h
Copy link
Author

jeff-h commented Sep 18, 2023

Can I ask how or where you found FB12857119? Or did you create it yourself?

@norris-david
Copy link

Yeah sure. Found it here

Hzao added a commit to Hzao/SwiftAuthorizationSample that referenced this issue Mar 8, 2024
…tibility

This commit updates the build scripts to compile PropertyListModifier.swift into executables before running them. This change addresses the issue(trilemma-dev#17) introduced in Xcode 15, where running Swift scripts directly can lead to errors due to the updated execution environment handling. By compiling Swift scripts first, we ensure compatibility with Xcode 15 and later versions, while also reducing potential environmental discrepancies.
Hzao added a commit to Hzao/SwiftAuthorizationSample that referenced this issue Mar 8, 2024
…tibility

This commit updates the build scripts to compile PropertyListModifier.swift into executables before running them. This change addresses the issue(trilemma-dev#17) introduced in Xcode 15, where running Swift scripts directly can lead to errors due to the updated execution environment handling. By compiling Swift scripts first, we ensure compatibility with Xcode 15 and later versions, while also reducing potential environmental discrepancies.
@Hzao
Copy link

Hzao commented Mar 8, 2024

We are running BuildScripts/PropertyListModifier.swift as script, without compiling it first. This causes a strange error after Xcode 15 when importing and using CryptoKit(JIT session error: symbols not found).
While this error hasn't been solved by Apple yet, we can compile the build script first before executing.
Although this might sightly expand the compilation time, we can finally compile without the trick of returning a random string in hashSources() .
I've opened a PR(#19) for this.

@jeff-h
Copy link
Author

jeff-h commented Mar 8, 2024

@Hzao nice work! Good discovery that it runs properly once compiled!

@Hzao
Copy link

Hzao commented Mar 8, 2024

@jeff-h I'm glad the solution worked out. Thank you for opening this issue!

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

No branches or pull requests

3 participants