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

Empty build settings #80

Open
4 tasks
mehmetbaykar opened this issue Nov 23, 2024 · 2 comments
Open
4 tasks

Empty build settings #80

mehmetbaykar opened this issue Nov 23, 2024 · 2 comments

Comments

@mehmetbaykar
Copy link

Empty Build Settings Error When Building Swift Package Library Products

Description

When attempting to build a library product from a Swift Package with multiple targets using sweetpad (v0.1.42), I encounter an "Empty build settings" error. This occurs because sweetpad doesn't automatically configure build settings for SPM library products, unlike Xcode which handles this configuration automatically.

Current Behavior

  • Attempting to build a library product results in error:
{
  "message": "Empty build settings",
  "level": 3,
  "command": "sweetpad.build.build",
  "error": {}
}
  • Currently requires manual configuration through Xcode for each library product
  • Need to add executable target in build settings for each package target manually

Expected Behavior

  • Automatic configuration of build settings for SPM library products (similar to Xcode)
  • Ability to build library products without manual configuration
  • Support for multi-target Swift packages out of the box

Steps to Reproduce

  1. Create a Swift package with multiple targets
  2. Define library products in Package.swift
  3. Attempt to build one of the package library products using sweetpad
  4. Observe "Empty build settings" error

Environment

  • sweetpad version: 0.1.42
  • Editor: Cursor
  • OS: macOS
  • Swift Package Manager: Multiple targets configuration

Suggested Solution

Implement automatic build settings configuration for SPM library products:

  1. Detect all library products in Package.swift
  2. Auto-configure build settings for each library product
  3. Support different library types (static, dynamic)
  4. Provide fallback configuration similar to Xcode's default behavior

Additional Context

This is particularly important for workflow automation as currently developers need to switch to Xcode for initial configuration, which defeats the purpose of using an IDE extension for Swift development. Library products are especially important as they're commonly used as dependencies in larger projects.

Impact

This issue affects development workflow by:

  • Requiring manual Xcode configuration
  • Breaking CI/CD pipelines
  • Increasing project setup time
  • Making it difficult to work with multi-target packages and their library products

Would you like me to:

  • Add more detailed logging for build settings
  • Support automatic library product configuration
  • Provide CLI fallback when build settings are missing
  • Add documentation for manual configuration workarounds
@cameroncooke
Copy link

I've seen this issue with xcode projects too, I had to open the project and build on Xcode first before Sweetpad would work. Strange.

@mdoukmak
Copy link

mdoukmak commented Dec 6, 2024

I'm seeing the same issue as OP. Opening on Xcode and building first does not resolve the issue.

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

3 participants