cgrindel / rules_swift_package_manager

Collection of utilities and Bazel rules to aid in the development and maintenance of Swift repositories using Bazel.
Apache License 2.0
75 stars 26 forks source link

Road to 1.0.0 #924

Open cgrindel opened 7 months ago

cgrindel commented 7 months ago

Goals

  1. Remove need for Swift index JSON file.
  2. Move Gazelle plugin to its own repository.
  3. Create release 1.0.0.

Tasks

cgrindel commented 5 months ago

Notes regarding Gazelle plugin

See below for new plan.

brentleyjones commented 5 months ago

What do we need DependencyIndex for anymore? Aren't product names deterministic now?

cgrindel commented 5 months ago

What do we need DependencyIndex for anymore? Aren't product names deterministic now?

The Gazelle plugin needs to resolve module names to Bazel labels.

brentleyjones commented 5 months ago

Ahh, so that won't be in this repo in the end? Got it.

cgrindel commented 5 months ago

For anyone following along at home, this branch has the examples working if you run bazel test //..., no index file required. 🙂 I started updating the Gazelle plugin to work properly in this new world. Here is the basic plan:

brentleyjones commented 3 months ago

Can we add #1079 to this?

cgrindel commented 3 months ago

Can we add https://github.com/cgrindel/rules_swift_package_manager/issues/1079 to this?

Done.

cgrindel commented 3 days ago

Just a quick update regarding the v1 release. I have been working on #1079. I have a draft PR (#1217) with everything working except the rules_xcodeproj no-sandbox build. Unfortunately, that fails with duplicate definitions. I see and mostly understand why this is happening. Unfortunately, I am struggling to prevent the duplicate module map files causing the errors.

I put together #1266 which attempts to prevent objc_library from creating its own module map file by specifying the one that rules_swift_package_manager creates. Unfortunately, this causes an error:

In file included from external/rules_swift_package_manager~~swift_deps~swiftpkg_firebase_ios_sdk/FirebaseInstallations/Source/Library/FIRInstallations.m:25:
external/rules_swift_package_manager~~swift_deps~swiftpkg_firebase_ios_sdk/FirebaseCore/Extension/FirebaseCoreInternal.h:15:1: error: use of '@import' when modules are disabled
@import FirebaseCore;
^
1 error generated.

Looking through the actual command-line, I do not see the -fmodules flag. I thought that this was added by setting enable_modules = True.

If anyone has any thoughts or suggestions, please send them my way.