-
Notifications
You must be signed in to change notification settings - Fork 129
Some weird behaviour after I update my mac to use swift 6 #676
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
Comments
Hi @Dracks, I suspect this might be caused by your editor. I think we've seen something similar a while back happen in VS Code. Can you reproduce this in Xcode? cc @simonjbeaumont @FranzBusch |
This sounds very strange. The Swift OpenAPI Generator CLI invocation is made by SwiftPM when using the plugin and it should be passing an appropriate output directory based on the currently configured build directory. How are you driving the build, or is that opaque to you (done by the editor or some editor plugin that drives SwiftPM)? |
cc @dschaefer2 for visibility |
I still have yet and to see that but lots of people reporting it. I'm not sure how files can end up in the root, but it's clearly happening. A reproducible scenario that I could debug with would be a huge help. |
Yes, (I think I'm driving the build) I simply run swift build, (tecnically I've got an small bash script to run the build, or the tests at any change in swift files)
My intention is not to spam my project, but maybe you can try to clone my project the branch in which is happening? |
I suspect it has something to do with build plugins, almost seems like a race condition where sometimes the symbols path for the task that compiles the generated files ends up being (defaulted to?) the package path? |
At any rate, we should move this to swift-package-manager. Any objections? |
Not from me. |
Hrrmm, I can't since you guys are still in the apple org. At any rate, I'll dig up another one I have in this issue and link it. |
Thanks @dschaefer2, let's use swiftlang/swift-package-manager#7930 to track this then. Closing. |
Question
Hello,
I'm working on my pet project MrScrooge (which uses vapor and I'm using the openapi-generator to generate the apis), and last week I decided to upgrade my company laptop to the latest version of mac, which implied a migration of swift to 6. The package.json is not still changed (I'm awaiting to finish the lasts big things after involve myself on that) and I found some weird behaviour, which I don't know if everything is related to this project, but since the first simptom I think comes from the openapi generator, Let's start for here.
The first simptom, it generates at some point (not allways) the build files that OpenApi generates to the root (Client., Types. and Server.* files):

I don't know if I need to configure some specific stuff. You can see the branch in which I'm working here: Dracks/mr-scrooge#30
Is it something that I missed to configure?
Also, after this happens, (two or three compilations) swift decides to start throwing linking errors. (making impossible to compile again, until (not found any better way yet) full cleanup of the .build folder.
I'm using zed as editor, and I compile (and test) mainly using terminal (I've got a small bash script to automatically launch build after some changes)
Thanks,
Dracks.
The text was updated successfully, but these errors were encountered: