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

Xcode 15 NSCocoaError 513 #24

Closed
Velin92 opened this issue Sep 19, 2023 · 4 comments
Closed

Xcode 15 NSCocoaError 513 #24

Velin92 opened this issue Sep 19, 2023 · 4 comments

Comments

@Velin92
Copy link

Velin92 commented Sep 19, 2023

When I try to run my tests on Xcode 15 with the PrefireTestsPlugin I get the following error:
Screenshot 2023-09-19 at 10 45 51

I am using a custom prefire config file where I write the tests in an internal folder of the project tests

@BarredEwe
Copy link
Owner

Xcode 15 does not give plugins permission to write to the project directory 🥲

As a quick solution, I can recommend writing in DerivedData.
To do this, remove the test_file_path parameter from the .prefier.yml file.

Now I'm trying to find another solution, but so far there are difficulties with this. To be honest, I'm not sure that it can be possible now: swiftlang/swift-package-manager#6814

@Velin92
Copy link
Author

Velin92 commented Sep 19, 2023

I see, thanks for the suggestion, however I just tried it by removing the test_file_path and the UnitTests do not build since multiple commands seem to be produce the UnitTests product.

Do you know what might be causing this issue?

Prepare build
note: Building targets in dependency order
error: Multiple commands produce '/Users/mauroromito/Library/Developer/Xcode/DerivedData/ElementX-aywdboxrhlkajqbvczulivesmexq/Build/Products/Debug-iphonesimulator/ElementX.app/PlugIns/UnitTests.xctest/UnitTests'
    note: Target 'UnitTests' (project 'ElementX') has copy command from '/Users/mauroromito/Library/Developer/Xcode/DerivedData/ElementX-aywdboxrhlkajqbvczulivesmexq/SourcePackages/plugins/ElementX.output/UnitTests/PrefireTestsPlugin/UnitTests' to '/Users/mauroromito/Library/Developer/Xcode/DerivedData/ElementX-aywdboxrhlkajqbvczulivesmexq/Build/Products/Debug-iphonesimulator/ElementX.app/PlugIns/UnitTests.xctest/UnitTests'
    note: Target 'UnitTests' (project 'ElementX') has link command with output '/Users/mauroromito/Library/Developer/Xcode/DerivedData/ElementX-aywdboxrhlkajqbvczulivesmexq/Build/Products/Debug-iphonesimulator/ElementX.app/PlugIns/UnitTests.xctest/UnitTests'


Building targets in dependency order

Multiple commands produce '/Users/mauroromito/Library/Developer/Xcode/DerivedData/ElementX-aywdboxrhlkajqbvczulivesmexq/Build/Products/Debug-iphonesimulator/ElementX.app/PlugIns/UnitTests.xctest/UnitTests'

Computing target dependency graph and provisioning inputs

Create build description
Build description signature: 4f8dec47da3429f29502ac0dae87d55d
Build description path: /Users/mauroromito/Library/Developer/Xcode/DerivedData/ElementX-aywdboxrhlkajqbvczulivesmexq/Build/Intermediates.noindex/XCBuildData/4f8dec47da3429f29502ac0dae87d55d.xcbuilddata


@BarredEwe
Copy link
Owner

Could you try the latest release?

@Velin92
Copy link
Author

Velin92 commented Sep 20, 2023

Tried, and it now works thanks!
However having the code in the DerivedData has some downsides (sometimes the code does not preview, you cannot directly change it to play around with it, which makes editing the stencil a bit more painful, it does not render immediately until you run the tests if you use a project file builder tool like xcodegen and other small things).

Not a bid deal, but was wondering instead of generating the code through the plugin, would be possible to instead expose/use a command that we may run during the Build Phase of the app?
I guess this should allow for changes inside the project directory itself.

Btw great work, this package is amazing, will close the issue, hope this suggestion might be of help!
Thanks again.

@Velin92 Velin92 closed this as completed Sep 20, 2023
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

2 participants