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
Fix generating CoreData models in resourceSynthesizer .coreData() #6201
Fix generating CoreData models in resourceSynthesizer .coreData() #6201
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the PR! The changes look good – however, can you update the ios_app_with_coredata fixture, so it would have failed without your changes?
37749b5
to
2125397
Compare
Yes, of course. @fortmarek thanks for the suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the fixture! We can merge this after the lint pipeline is fixed (you need to run mise run lint:fix
. Also, if we can update the coredata template file, that'd be amazing
fixtures/ios_app_with_coredata/Tuist/ResourceSynthesizers/CoreData.stencil
Show resolved
Hide resolved
5c8e9cf
to
f114566
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
@all-contributors add @alexfilimon for code |
I've put up a pull request to add @alexfilimon! 🎉 |
Resolves #6200
Short description 📝
I have realized that during project mapping, resources and CoreData models are explicitly separated in the project structure (
Target.resources
andTarget.coreDataModels
). However, in theSynthesizedResourceInterfaceProjectMapper
class, when generating code from templates, the search for files is done only in Target.resources
. When generating the CoreData template, it looks for files with the xcdatamodeld
extension, which are located inTarget.coreDataModels
.resources
andcoreDataModels
.SynthesizedResourceInterfaceProjectMapperTests
, and running these tests before my changes will result in failures.How to test the changes locally 🧐
.coreData()
resourceSynthesizertuist
target with the parameters (generate
,--no-open
,--path /path/to/project
)TuistCoreData+AppCore.swift
file appears in the tuist Derived folderContributor checklist ✅
mise run lint:fix
Reviewer checklist ✅
changelog:added
,changelog:fixed
, orchangelog:changed
, and the title is usable as a changelog entry