schwa / punic

[DEPRECATED] Clean room reimplementation of Carthage tool
0 stars 1 forks source link

copy-frameworks bug (with macOS frameworks?) #79

Open noremac opened 7 years ago

noremac commented 7 years ago

You can find a sample project here: https://github.com/noremac/layout/tree/punic-bug

Here is the output of punic version (I've installed via homebrew)

Punic version: 0.2.10
Python version: 2.7.10
Checking punic version...
Current version: 0.2.10, latest version: 0.2.10
  1. Checkout the project (make sure you are on the punic-bug branch)
  2. punic update
  3. Open the project
  4. Select the Layout-macOS scheme
  5. Press command+u to run tests.

The build fails with this error:

Processing: "Quick.framework"
    Copying framework "Quick" to "$SYMROOT/Debug/Layout-macOS-Tests.xctest/Contents/Frameworks/Quick.framework"
Traceback (most recent call last):
  File "/usr/local/bin/punic", line 11, in <module>
    load_entry_point('punic==0.2.10', 'console_scripts', 'punic')()
  File "/usr/local/Cellar/punic/0.2.10/libexec/lib/python2.7/site-packages/punic/punic_cli.py", line 397, in main
    punic_cli()
  File "/usr/local/Cellar/punic/0.2.10/libexec/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Cellar/punic/0.2.10/libexec/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/Cellar/punic/0.2.10/libexec/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/Cellar/punic/0.2.10/libexec/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/Cellar/punic/0.2.10/libexec/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/Cellar/punic/0.2.10/libexec/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/Cellar/punic/0.2.10/libexec/lib/python2.7/site-packages/punic/punic_cli.py", line 240, in copy_frameworks
    copy_frameworks_main()
  File "/usr/local/Cellar/punic/0.2.10/libexec/lib/python2.7/site-packages/punic/copy_frameworks.py", line 61, in copy_frameworks_main
    assert match.groups()[0] == str(binary_path)
AttributeError: 'NoneType' object has no attribute 'groups'
Command /bin/sh failed with exit code 1

On the macOS scheme, if I replace /usr/local/bin/punic copy-frameworks with /usr/local/bin/carthage copy-frameworks things build and work as expected.

/usr/local/bin/punic copy-frameworks works correctly for the Layout-iOS and Layout-tvOS schemes.

Please let me know if you would like any more information, and thanks for making punic!