Stabilize --preserve-order as a non-experimental CLI flag#217
Stabilize --preserve-order as a non-experimental CLI flag#217vivainio wants to merge 1 commit intoCertainLach:masterfrom
Conversation
Remove the exp-preserve-order compile-time feature gate, making --preserve-order and the preserve_order parameter on std.manifest*/ std.objectFields* always available without requiring a feature flag. Closes CertainLach#212
|
I don't want to enable it by default unless the behavior is decided on cpp-jsonnet/go-jsonnet side |
It would be a flag that is disabled by default |
|
I'm more concerned about preserve_order argument of stdlib functions I'll think about it. |
|
I agree that adding |
This is the right approach, as having that as a global flag braks many usecases with internal manifestification, I only meant that preserve_order argument on stdlib functions should not be stabilized until consensus is reached with jsonnet upstream |
|
Do you have a particular use case that would break in mind? Global flag is all-or-nothing, and without it everything would behave as before |
Summary
exp-preserve-ordercompile-time feature gate across all crates--preserve-orderCLI flag andpreserve_orderparameter onstd.manifest*/std.objectFields*always availableImplements #212
Details
The
preserve_orderfunctionality was already fully implemented behind theexp-preserve-orderfeature. This PR simply removes the#[cfg(feature = "exp-preserve-order")]gates from all 28 affected files, making the feature unconditionally available while keeping it opt-in (not enabled by default).No behavioral changes — the same code that ran with
--features exp-preserve-ordernow runs in all builds.Test plan
cargo checkpassesstd_param_namestest updated for new parameter signaturespreserve_order.jsonnettest covering: field ordering, objectFields/Values/KeysValues, manifestJson output, field override behavior, and object comprehension order