Is HWP in HWP finally possible for 1.0.0?

8 replies [Last post]
UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 28 weeks 3 days ago. Offline
Joined: 2016-06-26
Posts: 381

"Is HWP in HWP finally possible for 1.0.0?"

I've been waiting for ten years for this one.

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 14 hours ago. Offline
Joined: 2010-12-25
Posts: 528

Sadly, it's not possible. But this option would be EXTREMELY useful for me. I could just put my themes individually in a folder on Google Drive and if someone wanted all of them, they could just download the folder (GD supports zip-downloading folders). I could dynamically change the contents of the packages, which means no more uploading everything on tiny theme updates.

+1 for implementing this. Oh, what I'm saying. +1000000.

Wuzzy
Wuzzy's picture
User offline. Last seen 10 hours 44 min ago. Offline
Joined: 2012-06-20
Posts: 1190

Nested HWPs ARE possible since version 0.9.25, but they are heavily restricted.

First, only a depth of 1 layer is supported. HWPs in deeper layers are ignored. So a HWP inside a HWP will work, but a HWP inside a HWP inside a HWP won't work.
Second, a nested HWP only works if it's a sidecar.

These restrictions are by design, to keep things simple.

Hi, I am a Hedgewars developer. Smile I accept personal donations in bitcoin. Heart 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 14 hours ago. Offline
Joined: 2010-12-25
Posts: 528

Quote:
Second, a nested HWP only works if it's a sidecar.
So it won't work for my theme idea? (creating a HWP of HWPs)

Wuzzy
Wuzzy's picture
User offline. Last seen 10 hours 44 min ago. Offline
Joined: 2012-06-20
Posts: 1190

Yeah, it won't. Sad Smiley

Hi, I am a Hedgewars developer. Smile I accept personal donations in bitcoin. Heart 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 14 hours ago. Offline
Joined: 2010-12-25
Posts: 528

So my support for improving this still stands.

Why was this "kept simple"? Limiting depth makes sense (although the level could be higher), but why only sidecars?

Wuzzy
Wuzzy's picture
User offline. Last seen 10 hours 44 min ago. Offline
Joined: 2012-06-20
Posts: 1190

Hmmm, I don't really remember anymore. I don't know if this is a deliberate choice out of paranoia or if it was just not coded yet.

EDIT:

Well, thinking about this, I don't really like the idea of allowing *any* HWPs to be nested. So yeah, it was probably a deliberate choice.

So the only argument you gave us so far was for organizing. That's not very compelling.

The downside of allowing to nest everything is loss of clarity. You now probably need to unpack 2 layers of HWPs to see everything, which could be confusing. It also increases complexity in our code, and we are very reluctant to do that.

So, I and nemo agree that the simplicity we have is a good thing and should be kept.

The reason why the sidecar exception exists is simply because of neccessity, since some scripts need a sidecar and without them they don't function correctly.

Anyway: Nemo said you can still drop multiple different things in a single HWP, like a collection of themes instead of just a single one. But you do that already, so I doubt this answer will satisfy you. :/

Hi, I am a Hedgewars developer. Smile I accept personal donations in bitcoin. Heart 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 14 hours ago. Offline
Joined: 2010-12-25
Posts: 528

Quote:
The downside of allowing to nest everything is loss of clarity. You now probably need to unpack 2 layers of HWPs to see everything, which could be confusing.
Confusing to whom? End-users don't need to unpack the HWPs at all. And if they do it, it's their problem.

Quote:
It also increases complexity in our code, and we are very reluctant to do that.
Doesn't it just require some recursion?

Quote:
Anyway: Nemo said you can still drop multiple different things in a single HWP, like a collection of themes instead of just a single one. But you do that already, so I doubt this answer will satisfy you. :/
I'd have to eventually give up single theme packages, because now I need to maintain full package + singular ones for each theme and not only it's difficult to update anything, it leads to the problems like with that one broken theme, which I was sure was fixed and it wasn't.

nemo
nemo's picture
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 2009-01-28
Posts: 1807

I'd rather not have nested global HWPs.
At present, the sidecar is there out of necessity, and if loaded every time, instead of only with script, it would cause desyncs.
I like the fact that at present the only nested HWPs are these desyncable ones, with no ambiguity.

I'm afraid I still don't see the advantage here. Luelle's 22 theme pack has been on DLC for a very long time, no one has had any issues grabbing it. I also don't see why it's any easier to zip up a dozen HWPs than zip up a tree with a dozen themes.

Esp for someone like you w/ automated build processes. I mean heck, if you wanted to *start* from your dozen HWPs you could literally have a repacker that unzips the dozen to a folder, then zips them all up together.

So yeah, it's potentially a source of desync issues and it doesn't seem to add anything.

That said, if you really really want this, and you are willing to implement it yourself, and ensure that you do it with at least some sensible restriction to avoid loading the sidecars accidentally, do feel free to commit something to https://hg.hedgewars.org/hedgewars-draft/

Even though I don't think it's a good idea for confusion/sync reasons, and that it adds no value, and have no desire to implement it, if you really care about this so much, I'd be fine with merging it if it didn't break anything.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

Copyright © 2004-2017 Hedgewars Project. All rights reserved. [ contact ]