UnvanquishedAssets / UnvanquishedAssets

The parent asset repository for the Unvanquished game project
https://unvanquished.net
10 stars 1 forks source link

Circular dependencies in DEPS files #8

Open illwieckz opened 3 years ago

illwieckz commented 3 years ago

Today on IRC:

@slipher: why do we declare circular dependencies in DEPS files? https://github.com/UnvanquishedAssets/res-players_src.dpkdir/blob/master/DEPS https://github.com/UnvanquishedAssets/res-weapons_src.dpkdir/blob/master/DEPS

illwieckz commented 3 years ago

From res-weapons_src.dpkdir:

commit 54a9caddb3560813ce446fcf1df385e66b3ddf69
Author: Thomas Debesse <dev@illwieckz.net>
Date:   Sat Feb 17 02:51:31 2018 +0100

    DEPS: requires res-buildables because of creep

commit 24e162efd012ef630ab7a85d55f7fbaad365071b
Author: Thomas Debesse <dev@illwieckz.net>
Date:   Sun Feb 4 18:35:17 2018 +0100

    DEPS: make res-players package a dependency because of player hands

Note: the player hand of first person model can be part of the weapon model…

From res-players_src.dpkdir:

commit 866a65086b81d740353d54d2e310dd7b1ee511bf
Author: Thomas Debesse <dev@illwieckz.net>
Date:   Sun Feb 4 20:41:23 2018 +0100

    DEPS: make res-weapons package dependency because of smoke reused by jetpack

From res-buildables_src.dpkdir:

commit 1e7cb6784432f0c0b37787d9d1f9f58348226ae6
Author: Thomas Debesse <dev@illwieckz.net>
Date:   Sun Feb 4 18:36:05 2018 +0100

    DEPS: make res-players and res-weapons packages dependencies because of blood/flame etc.

    basically, alien buildables are living things like players
    and many human buildables are weapons

    - alien buildable blood reuses alien player blood
    - alien fire effect reuses weapon fire effect
    - etc.

Maybe we can move some blood, creep, flame, smoke effects to the res-ambient_src.dpkdir repository instead.

Moving the smoke can be enough to remove the circular dependency. For the smoke it makes special sense to move it to res-ambient_src.dpkdir because maps may rely on it as well (if I'm right, Citadel does).

Also, there is already some blood splashes (to be applied on walls) in res-ambient_src.dpkdir.

Also we may redo the layout, with res-humans_src.dpkdir and res-aliens_src.dpkdir instead of res-weapons_src.dpkdir and res-players_src.dpkdir (and res-buildables_src.dpkdir), so both player and weapon models can load hand texture from the same own repository…

illwieckz commented 3 years ago

We have three different smokes, we may want to provide them to mappers in res-ambient_src.dpkdir.

illwieckz commented 3 years ago

From res-players_src.dpkdir:

commit 3c6467cf37b913adbf8ffd52ad6cf9a77d744871
Author: Thomas Debesse <dev@illwieckz.net>
Date:   Sat Feb 17 03:09:29 2018 +0100

    import rifle/legacy_smoke from res-weapons, it's only used by jetpack, rename accordingly

So res-players_src.dpkdir does not need to rely on res-weapons anymore, we can break the circular dependency safely.

It looks like I took care of that but forgot to remove it from DEPS.

illwieckz commented 3 years ago

The circular dependency has been removed.

illwieckz commented 3 years ago

Hmm, there is still one:

../unvanquished-validate-release/validate_release.py unvanquished_0.51.1+20210428-172348+e5b6307+0.52.0-rc6.zip
Checking the universal zip (version = '0.51.1+20210428-172348+e5b6307+0.52.0-rc6')
Pak dependency cycle: res-weapons_0.51+20210428-001952+b9d747d.dpk -> res-buildables_0.51+20210426-233006+486659f.dpk -> res-weapons_0.51+20210428-001952+b9d747d.dpk
illwieckz commented 3 years ago

That's because alien buildable fire effect reuses weapon fire effect, and some alien weapon reuse alien buildable creep…