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

Improve default bundle handling for SPM and Xcode targets #4

Open
kublaios opened this issue Mar 14, 2024 · 0 comments
Open

Improve default bundle handling for SPM and Xcode targets #4

kublaios opened this issue Mar 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kublaios
Copy link
Contributor

Our current implementation assumes the consumer is using Xcode project test targets when trying to find the feature files. The defaults don’t work for an SPM test target, you need to remember to pass .module or it won’t find the features. Given the way things are going, it doesn't make sense to have such a default.

A naive solution would involve two changes:

  • For the Feature() function, we make bundle a required param. For Xcode projects, the consumer would specify Bundle(for: Self.self) and for SPM .module.
  • GenerateFeature_EXPERIMENTAL also has bundle as a required param. When generating the code, it should preserve the bundle param from its call site in the generated Feature call.

We can also see if there's a cleaner solution that avoids the user having to pass the bundle explicitly.

@kublaios kublaios added the enhancement New feature or request label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant