-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Hi all,
Thanks for releasing and working on this. I was excitedly trying to give XCHammer a whirl but pretty quickly ran into issues on all avenues and didn't get it off the ground. Bummer. Conceptually it looks really great! I'd love to use it if there's a way to get it to work. If anyone is making it through the above and using XCHammer successfully, I'd love to hear from you, too!
So I'm writing what I found, thinking that others might be running into the same things. Some of the issues I hit seem to be reported already and some not.
The first issue is that trying to use bazel's xcode_project rule like in the README crashes with basically the same error as #182 reported for CLI usage.
Fatal error: Missing XCHammerAssets: <redacted>/execroot/<WORKSPACE_NAME>/external/xchammer/xchammer.app/Contents/Resources/XCHammerAssets: file Sources/XCHammer/Generator.swift, line 852
[The docs in the README also seem to be a bit stale? @xchammer//:xcodeproject.bzl doesn't exist, so I swapped in @xchammer//:BazelExtensions/xcodeproject.bzl. And used the latest release, instead of the one listed. And then paths seems to have been removed as an argument and folded into project_config rules (undocumented?). Happy to file a PR for these, but figured maybe I should get it to work before you'd want me contributing. In any event, didn't matter, because the XCHammerAssets crash seems to block use of the rule for now.]
So next up, I tried things from the command line. Ran into the same error (as noted in #182), but as described in the comments of that issue, calling it from /usr/local/bin/xchammer.app/Contents/MacOS/xchammer does avoid the crash...only to have it immediately hit something else. And it's a pretty weird one. Looks like it's trying to access a BUILD file as a directory? And com_google_protobuf isn't even a folder in the main workspace, regardless; it's brought in as an external dependency in the WORKSPACE file.
swiftException(XCHammerSources.Generator.GenerateError.some(Error Domain=NSCocoaErrorDomain Code=260 "The folder “BUILD” doesn’t exist." UserInfo={NSFilePath=<WORKSPACE DIR>/com_google_protobuf/BUILD, NSUserStringVariant=(
Folder
), NSUnderlyingError=0x7fc2d34bb380 {Error Domain=NSOSStatusErrorDomain Code=-43 "fnfErr: File not found"}}))
The operation couldn’t be completed. (Commandant.CommandantError<XCHammerSources.CommandError> error 1.)
So to sum: I was excited to try out XCHammer but quickly hit blocking bugs on both recommended usages. It seemed like I'd spent enough time that I should file an issue, ask for help, and see if anyone else has gotten through.
Thanks so much,
Chris