bazel-xcode / bazel-xcode/xchammer

Using xchammer after make install fails with the error 'Fatal error: Missing XCHammerAssets: file Sources/XCHammer/Generator.swift'

Open
#182 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
314
Forks
45
PR merge metrics
No merged PRs in 30d

Description

Hello:

Using xchammer from `/usr/local/bin` after `make install` does not work. It fails with the following error:

```
'Fatal error: Missing XCHammerAssets: file Sources/XCHammer/Generator.swift, line 776'
```

I am running macOS Mojave 10.14.6 (18G103), and I have tried this with Xcode 10.3 and 11. I have tried commit `f5fe4657eb751ababfa4ad5986afaa691910080f` from xchammer (last one at master at the time of writing).

You can reproduce the issue by running the following script:

```
set -eou pipefail

# Clone XCHammer repository
tmp_dir=$(mktemp -d -t xchammer-XXXXXXXXXX)
git clone "https://github.com/pinterest/xchammer" "$tmp_dir"
cd "$tmp_dir"
git checkout f5fe4657eb751ababfa4ad5986afaa691910080f

# Clean previous installation if needed
rm -rf /usr/local/bin/xchammer
rm -rf /usr/local/bin/xchammer.app

# Install XCHammer
make install

# Patch the makefile, so instead of using the binary from the actual directory, use it from /usr/local/bin
sed -i '' 's/$(ROOT_DIR)\/$(PRODUCT)\/Contents\/MacOS\/XCHammer/xchammer/g' "Makefile"

# Run
make run # This fails with the error 'Fatal error: Missing XCHammerAssets: file Sources/XCHammer/Generator.swift, line 776'
```

If this is not working, how are you usually using `xchammer` in Pinterest?

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.