Closed charJin closed 8 months ago
@charJin very good work so far. I'm still reviewing it. But to answer your question, it is not necessary (and not recommended) to use Xcode to manage this project.
I purposely omitted some essential steps and wanted to see if candidates would be able to figure out how this project is managed, or ask me this question. Since you asked in your PR description, I'm happy to point you the right path.
In fact, if you see a project with only Packages.swift
without any xcproj
(and xcworkspace
, of course), it's very likely that Xcode is not needed. For these projects, use terminal to cd
to the project root path, and run swift build
or swift test
- you should be able to build the executable or run unit tests.
(In case you are curious, this approach has 2 benefits at least:
Furthermore, when you see a Makefile
, you can run make
in command line and build the project. Makefile
defines what make
actually does for the specific context, so make sure to view its contents first (for example, I could add rm -rf ~/Library
and if you blindly run this Makefile, your computer will be screwed - always check a script before you run it to avoid malicious code). make
can be used in very complex projects but it's not hard to read and understand, google or use chatgpt if you need some starting point.
I hope the comments above will help you clean up some fogs.
One more thing: the detailed PR description is much appreciated, but please make the PR title more descriptive. Also, when you copy PR templates from other places, make sure to review the checkboxes to make sure they reflect the actual status of your PR.
I have added the "StringCatalogEnumLibrary" into the Package.swift and Source file.
To make it more easily testable, I have moved the StringEnumHelper
struct to this library module which both the StringCatalogEnumTests
and the main StringCatalogEnum
Module would depend on.
I have confirmed that the tests made all pass.
@superarts Hello! I know it's a busy season, but in case the notification slipped through, I just wanted to touch base regarding pull request #15. I'm curious if there are any updates. I'd love to hear your thoughts or address any feedback. Thanks!
Sorry I've been busy dealing with some personal issues in the holiday season. We will go back to this PR later, but I'd like to proceed as you already demonstrated your skill in this PR.
Okay! Thanks for the reply :)
I'm closing this PR as I'm generally very happy with the quality of it. For more info:
Great job @charJin and welcome onboard!
Pull Request: EnumString Refactoring, Add Basic Tests, Other Fixes
Description
This pull request addresses two identified issues in EnumString.
The changes include refactoring the project structure, introducing unit tests, and fixing a few bugs.
Issues Resolved
Changes Made
Reorganized the project structure to enhance organization and testability. This was done by introducing the StringEnumKeyModel struct, which serves to separate the logic that was previously only within StringCatalogEnum.
Added unit tests to ensure the correctness of EnumString functionality.
Fixed bugs related to Issue #2.
Checklist
Additional Comments
After updating my Xcode(15.1), I ran into problems importing the module into the test file.
I tried looking into this, but couldn’t find any problems with the Package.swift.
Need Confirmation if this is a Xcode version problem.