Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for Swift Macros #1058

Closed
wants to merge 2 commits into from
Closed

Conversation

keith
Copy link
Member

@keith keith commented Jun 9, 2023

No description provided.

@keith keith force-pushed the ks/add-support-for-swift-macros branch from d055211 to 6d039a7 Compare June 9, 2023 23:31
@chiragramani
Copy link
Contributor

chiragramani commented Jun 15, 2023

Thanks for putting this up! 🙏🏼
I was trying to build the example but it failed with the following error:

bazel build :main

Compiling Swift module //:lib failed: (Exit 1): worker failed: error executing command (from target //:lib) bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/build_bazel_rules_swift/tools/worker/worker swiftc @bazel-out/darwin_arm64-fastbuild/bin/lib.swiftmodule-0.params
error: emit-module command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: error opening input file 'bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/macrosplugin#macros' (No such file or directory)
<unknown>:0: error: error opening input file 'bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/macrosplugin#macros' (No such file or directory)
Target //:main failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.305s, Critical Path: 0.16s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully

The file bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/macrosplugin is present but from the params file - it's looking for bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/macrosplugin#macros which is not present.

@keith
Copy link
Member Author

keith commented Jun 15, 2023

hrm what's your build command? can you make sure you're on the latest commit here too?

@chiragramani
Copy link
Contributor

chiragramani commented Jun 15, 2023

hrm what's your build command? can you make sure you're on the latest commit here too?

Yes, on the latest commit.

commit 3674f6fc27877af848cf55e10045587c6ac950ce (HEAD -> macro_test, origin/ks/add-support-for-swift-macros)
Author: Keith Smiley <keithbsmiley@gmail.com>
Date:   Wed Jun 14 16:41:11 2023 -0700

    Add test target example

Build command: building the main binary. //examples/macros:main

bazel build :main

@keith
Copy link
Member Author

keith commented Jun 15, 2023

Could you be using an old version of Xcode / Swift?

@keith
Copy link
Member Author

keith commented Jun 15, 2023

(that's the same error CI has for an old version)

@chiragramani
Copy link
Contributor

chiragramani commented Jun 16, 2023

Could you be using an old version of Xcode / Swift?

Oh yes, you are right, Xcode was switched, sorry for the wrong call. Works all great now!

@jafara
Copy link

jafara commented Jul 31, 2023

whats the status of landing this?

@keith
Copy link
Member Author

keith commented Jul 31, 2023

I think we'll likely wait a bit longer, maybe 1 more beta? to make sure things still work

@tinder-tannerbennett
Copy link

@keith Everything still working with the latest betas? 😄

@brentleyjones
Copy link
Collaborator

I believe an updated version of #1061 is what will eventually land.

@keith
Copy link
Member Author

keith commented Sep 6, 2023

#1061

@keith keith closed this Sep 6, 2023
@keith keith deleted the ks/add-support-for-swift-macros branch September 6, 2023 23:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants