flipperdevices / flipper-application-catalog

Flipper Application Catalog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

With fap_private_libs, tools/bundle.py fails if no sources=[...] specified

kbembedded opened this issue · comments

The documentation and output notes that if no sources line is specified, it defaults to *.c*. However in testing this with tools/bundle.py I see the following output:

scons: *** No sources gathered for private library FlipperApplication.Library(name='flipper-gblink', fap_include_paths=['.'], sources=['*.c*'], cflags=[], cdefines=[], cincludes=[])`
File "/home/.../.ufbt/current/scripts/fbt_tools/fbt_extapps.py", line 123, in _build_private_lib
15:28:57.780 [E] Code checks failed: scons: Entering directory `/home/.../.ufbt/current/scripts/ufbt'

If I add:
sources=["gblink.c"],

To the application's application.fam under fap_private_libs, then tools/bundle.py correctly builds the whole application.

I will note that, not adding an fap_include_paths to application.fam does correctly use the . dir as the include path.

Cannot reproduce.

I cloned your repo and patched out explicit source specification: hedger/Flipper-Zero-Game-Boy-Pokemon-Trading@31caa40

I used the following manifest:

sourcecode:
  type: git
  location:
    origin: https://github.com/hedger/Flipper-Zero-Game-Boy-Pokemon-Trading.git
    commit_sha: 31caa4058942ca6e5ad3826d3ce9369041ced510
short_description: |
  Pokemon exchange from Flipper Zero to Game Boy for Generation I (Pokemon Red, Blue, Yellow)
description: "@README_catalog.md"
changelog: "@changelog.md"
screenshots:
  - ".flipcorg/gallery/1.png"

This is the result of running the bundler script:

11:41:25.273 [I] Working in '/private/var/folders/n8/yscnz1dj5ml07kymk4fn77ww0000gn/T/tmpcgflwin2'
11:41:25.274 [I] Loaded app manifest from applications/GPIO/pokemon/manifest.yml
11:41:25.274 [I] Cloning https://github.com/hedger/Flipper-Zero-Game-Boy-Pokemon-Trading.git to /private/var/folders/n8/yscnz1dj5ml07kymk4fn77ww0000gn/T/tmpf8yeedsq
11:41:33.793 [I] Cloned
11:41:33.929 [I] Checked out commit 31caa4058942ca6e5ad3826d3ce9369041ced510
11:41:33.929 [I] Moving /private/var/folders/n8/yscnz1dj5ml07kymk4fn77ww0000gn/T/tmpf8yeedsq to /private/var/folders/n8/yscnz1dj5ml07kymk4fn77ww0000gn/T/tmpcgflwin2/code
11:41:33.929 [I] Building
11:41:35.352 [I] Value for 'name' is empty in YAML. Using value 'Pokemon Trading' from FAM.
11:41:35.352 [I] Value for 'id' is empty in YAML. Using value 'pokemon' from FAM.
11:41:35.352 [I] Value for 'author' is empty in YAML. Using value 'Esteban Fuentealba, Kris Bahnsen, Darryn Cull' from FAM.
11:41:35.352 [I] Value for 'category' is empty in YAML. Using value 'GPIO' from FAM.
11:41:35.352 [I] Value for 'icon' is empty in YAML. Using value 'pokemon_10px.png' from FAM.
11:41:35.352 [W] Value in YAML for 'short_description' is different from value in FAM: 'Pokemon exchange from Flipper Zero to Game Boy for Generation I (Pokemon Red, Blue, Yellow)
' / 'Pokemon exchange from Flipper Zero to Game Boy for Generation I (Pokemon Red, Blue, Yellow)'. Using value from YAML.
11:41:35.352 [I] Value for 'targets' is empty in YAML. Using value '['all']' from FAM.
11:41:35.352 [I] Value for 'version' is empty in YAML. Using value '1.5' from FAM.
11:41:35.353 [I] Including changelog from file /private/var/folders/n8/yscnz1dj5ml07kymk4fn77ww0000gn/T/tmpcgflwin2/code/changelog.md
11:41:35.353 [I] Including description from file /private/var/folders/n8/yscnz1dj5ml07kymk4fn77ww0000gn/T/tmpcgflwin2/code/README_catalog.md
11:41:35.400 [I] Saving updated manifest: skip_source_code=False
11:41:38.043 [I] Bundle created: test.zip

Please provide an example where the issue can be reproduced.

Unfortunately I'm unable to reproduce this now, too. Tried a full clean of ~/.ufbt/, tried your repo, made similar change to my repo. I'm not sure what I ran in to then. Apologies.