Skip to content

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

@acecilia

Description

@acecilia

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions