Skip to content

Conversation

brianmichel
Copy link
Collaborator

We need to ensure that files get copied to the right place before running the application. Ideally SPM would do this with a plugin, but they don't work on Windows right now. This just gives us a tiny speed up in our local build loop.

@brianmichel brianmichel requested a review from compnerd August 29, 2023 14:39
Copy link
Owner

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm loathe to add this. I think that we should recommend that people use cmd rather than PowerShell. This also now adds a second point to maintain any changes to the manifest. Addition of a new executable target would mean that swift run no longer works and needs to be told the executable target. If you list the target, the script and Package.swift need to be kept in sync. This just adds additional overhead. I'd rather add a CMake build instead which can automate this properly.

@brianmichel
Copy link
Collaborator Author

I'm loathe to add this. I think that we should recommend that people use cmd rather than PowerShell. This also now adds a second point to maintain any changes to the manifest. Addition of a new executable target would mean that swift run no longer works and needs to be told the executable target. If you list the target, the script and Package.swift need to be kept in sync. This just adds additional overhead. I'd rather add a CMake build instead which can automate this properly.

I'm going to defer to you on a lot of this since I'm not familiar enough with the Windows platform to know why cmd vs powershell. Would love to pair on helping you with the CMake build since I'm not very familiar with that though!

I do think this is something that we should do in some form especially with how often we've seen people on the team use deleting the build folder as a way around issues/debugging build problems. This will likely keep coming up as a support issue that we could easily fix.

@compnerd compnerd deleted the brian/add-simple-run-script branch August 29, 2023 14:53
compnerd pushed a commit that referenced this pull request Nov 27, 2023
We need to ensure that when successfully fetching a document that doesn't exist, rather than getting back a document, you get back nil. We were simply returning the value before checking if it was valid to do so. This adds the check on whether or not it's a valid document before returning it back to the caller.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants