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

Output definitions in Cuckoofile.toml are ignored/in conflict using CuckooPluginFile. #494

Open
JavaAdam opened this issue May 29, 2024 · 5 comments

Comments

@JavaAdam
Copy link

CuckooPluginFile ist overriding all output definitions by setting CUCKOO_OVERRIDE_OUTPUT to an output on the derived data directory. This leads to two unexpected behaviors:

  • When a global output is defined in the Cuckoofile.toml an error is thrown because "two global output definitions" are set.
  • Output definitions in modules are ignored at all.

So the Swift Package Manager approach is usable for very simple projects only.

@JavaAdam JavaAdam mentioned this issue May 29, 2024
@MatyasKriz
Copy link
Collaborator

Hey @JavaAdam, thanks for letting me know.

I won't have access to my computer for a few more days so I can't really think of a better solution, do you have one in mind for complex projects?

@JavaAdam
Copy link
Author

JavaAdam commented Jun 3, 2024

To be honest, i am not familiar with restrictions concerning the Swift Package Manager Plugin. But I would just expect, that the output definitions in Cuckoofile.toml are respected/effective. So that the developer is free to define whatever is needed for his particular project.

When it's not possible to write somewhere else than in the derived data directory, than the developer would be responsible to define correct outputs in derived data. A descriptive message in the build log would be helpful here.

@dr-star
Copy link

dr-star commented Jun 19, 2024

Hello @JavaAdam could you share your Cuckoofile.toml?

  • When a global output is defined in the Cuckoofile.toml an error is thrown because "two global output definitions" are set.

@JavaAdam
Copy link
Author

Hello @dr-star. Unfortunately, I dropped the branch a while ago.

But as I remember I did something like this:

[modules.MyProject] output = "${PROJECT_DIR}/MyTarget/Tests/MyGeneratedMocks.swift"

Defining additional a global output failed with a "two global output definitions" error message.

@soucolline
Copy link

After trying to migrate to 2.0.9 i'm getting the exact same behaviour.

  • Setting an output to a specific folder inside a module doesn't work and creates the mock inside the derived data
  • Specifying a global output on line 1 of .toml file result in error Multiple global `output` parameters. Behavior is undefined
  • Only specifying a global output does the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants