Skip to content
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

ResourceSynthesizer .coreData() is not generating code for CoreData models #6200

Closed
alexfilimon opened this issue Apr 17, 2024 · 1 comment · Fixed by #6201
Closed

ResourceSynthesizer .coreData() is not generating code for CoreData models #6200

alexfilimon opened this issue Apr 17, 2024 · 1 comment · Fixed by #6201
Assignees
Labels
type:bug Something isn't working

Comments

@alexfilimon
Copy link
Contributor

What happened?

I encountered an issue where the TuistCoreData+AppCore.swift file was not generated despite specifying resourceSynthesizers .coreData() in the file. I couldn't figure out the issue and suspect it might be a bug within Tuist.

PS. The CoreData.stencil file is located in the correct Tuist/ResourceSynthesizers/CoreData.stencil folder. It is placed correctly, because if it is removed or named differently, tuist shows an error - i.e. the template file is recognised

Project(
    name: "App",
    organizationName: "my_organization",
    options: .options(
        defaultKnownRegions: [
            "en"
        ],
        developmentRegion: "en"
    ),
    targets: [
        /* Other targets */
        .target(
            name: "AppCore",
            product: .staticFramework,
            bundleId: "bundle_id.core",
            infoPlist: .default,
            sources: .sourceFilesList(
                globs: [
                    "Targets/AppCore/Sources/**"
                ]
            ),
            resources: .resources(
                [ 
                    .glob(
                        pattern: "Targets/AppCore/Resources/**"
                    )
                ]
            ),
            dependencies: [],
            coreDataModels: [
                .coreDataModel("Targets/AppCore/Sources/Database/App.xcdatamodeld")
            ]
        )
    ],
    resourceSynthesizers: [
        .strings(),
        .assets(),
        .plists(),
        .fonts(),
        .coreData()
    ]
)

How do we reproduce it?

  1. Define the project configuration (an example can be found above)
  2. Add xcdatamodeld
  3. Add resourceSynthesizer .coreData()
  4. Call project generation tuist generate

Expected

  • file TuistCoreData+AppCore.swift is generated

Behaviour

  • file TuistCoreData+AppCore.swift is not generated

Error log

macOS version

14.2.1

Tuist version

4.9.0

Xcode version

15.3

@alexfilimon alexfilimon added the type:bug Something isn't working label Apr 17, 2024
@alexfilimon
Copy link
Contributor Author

I am currently investigating this problem in the source code and will try to fix it soon

@alexfilimon alexfilimon changed the title Insert title here ResourceSynthesizers .coreData() is not generating code for CoreData models Apr 17, 2024
@alexfilimon alexfilimon changed the title ResourceSynthesizers .coreData() is not generating code for CoreData models ResourceSynthesizer .coreData() is not generating code for CoreData models Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant