Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@include order hard to predict in complicated manifests #2

Open
ypcrts opened this issue Dec 1, 2017 · 1 comment
Open

@include order hard to predict in complicated manifests #2

ypcrts opened this issue Dec 1, 2017 · 1 comment
Labels

Comments

@ypcrts
Copy link
Owner

ypcrts commented Dec 1, 2017

@include resolves recursively, but order is hard to grok in complicated manifests

this makes overriding one with another hard.

either: overriding within the same manifest in nested sections must be verboten; preflight panic
or: new destination macro, @force is an include you run in order, and ordering must matter, so refactor to use ordered sets for everything (for this i would use an ordered dict because builtin); and you must record @force sections recursively (implement using a queue because python recursion depth limit trash) to prevent a cycle

@force sounds like a lot of work for little. it sounds like poor design. maybe it is.

using different sections that can be manually constructed to cause a force is cooler.

@ypcrts ypcrts changed the title @include order hard to predict in complicated manifests @include order hard to predict in complicated manifests Dec 1, 2017
@ypcrts ypcrts added the invalid label Mar 11, 2021
@ypcrts
Copy link
Owner Author

ypcrts commented Mar 11, 2021

I don't like the idea that @include'd targets should be ordered.

Consider *X means dereference X, identical to` \@include: X` 
C := { x=1, y=2, *G }
G := { x=4, y=3 }
E := { z=3, *C }

`toda install E` will clearly be order-dependent in its output, and this should throw. Does it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant