If you try to create a union that has no upstreams, rclone tells you "This value is required and has no default." I was hoping to create such unions, hoping that trying to do operations on them would be no-op.
The reason I want to do this is to make it easier to make and maintain unions of unions (and so on). For example:
Let's say I have three "real" remotes: Dropbox:
, Google:
, and Amazon:
. I pay Google and Amazon, but my Dropbox account is free and therefore has a low storage limit. I want to backup all my stuff to both Google and Amazon, but only certain small things to Dropbox.
To make this easier, I could create a Big:
union of Google:
and Amazon
, and an All:
union of Dropbox:
, Google:
, and Amazon:
. However, since unions can contain unions, it would be even easier if I were to instead make All:
a union of Big:
and Dropbox:
. The benefit there is that if I ever add another big "real" remote, I only have to modify the definition of Big:
, not the definitions of both Big:
and All:
.
But note that unions are allowed to have a single entry, so I can make it even easier to maintain by creating a Small:
union with just Dropbox:
in it, and making All:
a union of Big:
and Small:
instead of Big:
and Dropbox:
. That way, if I ever add another small "real" remote, I only have to modify the definition of Small:
, not the definitions of both All:
and Small:
.
So that's great as far as it goes, but now how about if I eventually want to add OneDrive, which I pay for, and so is not "small", but it's also not "big", as it has a hard cap on storage, unlike Amazon and Google. Then (as it currently stands) I would add a "real" OneDrive:
and a union Medium:
which contains OneDrive:
, modify All:
to contain Big:
, Medium:
, and Small:
, and maybe even add another union, MediumAndAbove:
, being Big:
and Medium:
.
But if empty unions were allowed (and were essentially no-op), I could've set up Medium:
before I ever got a OneDrive account. And I could have set up All:
to include Medium:
right from the start, and that way if I ever add a medium remote, all I have to do is modify the definition of Medium:
.
Or even better, I could set up an empty MediumAndAbove:
, and defined All:
not as Big:
, Medium:
, and Small:
, but Big:
and MediumAndAbove:
. This would make it easier to maintain if I ever wanted to add, say, Biggish:
.
And to be clear, this "space" sort of thing is just an example. I actually want to do multiple different kinds of things, some unrelated to the file storage limits, that would be easier if empty unions were allowed.
Done editing to add the stuff I hadn't yet typed when I accidentally hit Reply