flatpak / flatpak-builder-tools

Various helper tools for flatpak-builder
191 stars 107 forks source link

[cargo] KeyError in latest commit #401

Closed darkdragon-001 closed 7 months ago

darkdragon-001 commented 7 months ago

flatpak-builder version

ubuntu-latest

Linux distribution and version

ubuntu-latest

Affected flatpak-builder tool

cargo/flatpak-cargo-generator.py

flatpak-builder tool cli args

Cargo.lock -o sources.json

Source repository URL

https://github.com/nanu-c/axolotl/pull/1191

Flatpak-builder manifest URL

No response

Description

Current master (db00e6798f99263fb6cd7f736ebdc1fd5642b0a9) is broken for us: https://github.com/nanu-c/axolotl/actions/runs/8122834779/job/22202670035

Traceback (most recent call last):
  File "/home/runner/work/axolotl/axolotl/flatpak-builder-tools/cargo/./flatpak-cargo-generator.py", line 470, in <module>
    main()
  File "/home/runner/work/axolotl/axolotl/flatpak-builder-tools/cargo/./flatpak-cargo-generator.py", line 463, in main
    generated_sources = asyncio.run(generate_sources(load_toml(args.cargo_lock),
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/runner/work/axolotl/axolotl/flatpak-builder-tools/cargo/./flatpak-cargo-generator.py", line 417, in generate_sources
    for pkg in await asyncio.gather(*pkg_coros):
  File "/home/runner/work/axolotl/axolotl/flatpak-builder-tools/cargo/./flatpak-cargo-generator.py", line 367, in get_package_sources
    return await get_git_package_sources(package, git_repos)
  File "/home/runner/work/axolotl/axolotl/flatpak-builder-tools/cargo/./flatpak-cargo-generator.py", line 337, in get_git_package_sources
    'contents': toml.dumps(git_pkg.normalized),
  File "/home/runner/work/axolotl/axolotl/flatpak-builder-tools/cargo/./flatpak-cargo-generator.py", line 160, in normalized
    update_workspace_keys(package, self.workspace)
  File "/home/runner/work/axolotl/axolotl/flatpak-builder-tools/cargo/./flatpak-cargo-generator.py", line 129, in update_workspace_keys
    update_workspace_keys(item, workspace['dependencies'])
KeyError: 'dependencies'
Error: Process completed with exit code 1.
hfiguiere commented 7 months ago

See #400