-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Post SPM/Linux inclusion cleanup #245
Comments
yeah. the issue is that we need a blank file in the source folder otherwise the spm build script complains there are no source files. we could do with out it but then we need to rely on documentation to clear it up. we could name it anything as long as its self explanatory. |
I'd suggest we should name deleteme.swift file after the exercise (eg. HelloWorld.swift), so people can write code there directly. |
okay. i just pushed an update to the images. |
that was the original thought but it felt too much like micromanagement. the user can name the file what the want. It was also making hard to edit the sample files because of the name name we actually almost served the solution in a couple of files. I rather have a file name blank.swift or something along those lines and have the user rename them or add their own. |
@harquail I actually agree about renaming the Hello World blank source file. |
hmm ok, I'd still rather call deleteme.swift something like solution.swift and tell people they can rename the file in the readme. Or if we want to keep things as they are, we need to document creating a new file in Xcode |
Naming the source file consistent with the project name is a gift to new users who are already dealing with a complex and opaque hurdle known as Xcode. I think what looks like micromanagement from an experienced developer's point of view looks like a ball of confusion to a learner who may be just tasting Xcode for the first time. I also suspect that avoiding naming the file with a name that has to be changed will avoid problems with Xcode. Keep in mind the default install of Xcode will automatically build the project the first time it opens. Once that name changes, the user will probably have to clean the project manually and rebuild in order to get a successful compile. Obviously both of these points can be talked though in the docs, but since the goal is to teach the language first, every simplification of the environment pays dividends as new programmings get to focus earlier on code and not troubleshooting compile issues. Perhaps a name collision can be avoided with a prefix in the source file, such as ex_HelloWorld.swift, or solveHelloWorld.swift. That would make it easier to identify for submission in the terminal and in the docs. We could even create en exercism convention similar to how Apple does the tests source, using HelloWorldSolutions.swift. I should add that I think renaming or creating a new source file is the root of the added complexity. "solution.swift" is also a good fix. Although the docs would probably have to make clear the relationship between file names and their enclosed classes since solution.swift is a bit of a break from convention. |
Okay. Let's change them back to the package name as you suggested. :) |
The updates that include SPM and Linux are great, a vast improvement for Mac users over the old process to setup Xcode.
Unfortunately, a few broken dishes were left behind.
The images don't show up on http://exercism.io/languages/swift/tests.
The first image is does not match the deliverable via fetch. It shows "Hello-World" inside the source folder, yet all the source folder contains a file called "deleteme.swift."
The "deleteme,swift" change breaks the docs.
Since I don't know which "deleteme" approach is correct, raising the question here is as far as I know how to go.
Once this is resolved, I can update tests.md. I've found a few issues likely to trip up Mac users. Most notably the generated project may need to be cleaned inside Xcode before it will compile. And instructions to add and name a few source file.
I'm not going to touch tests.md until the images are working and I understand what the deliverables will look like.
The text was updated successfully, but these errors were encountered: