You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mantle doesn't support a Roblox feature I would like to use
Mantle CLI improvement
Mantle config improvement
Other
Describe your problem
The current environment overrides configuration options are limited and require lots of boilerplate which makes it harder to read.
The targetOverrides provides full flexibility at the cost of making it hard to add simple things and by reducing DRYness. As a result, the targetNamePrefix and targetAccess properties were added as shorthands to targetOverrides modifications. This is not a scalable approach to the config format.
Describe the solution you'd like
Switch to a variable-based approach, where Mantle provides a simple variable expansion to the user's config. Mantle will provide a set of default variables (like environmentLabel) and will allow the user to define their own variables per environment via a variables dictionary property on the environment object.
In order for this to work we would need to perform the variable expansion before parsing the config with serde. To do this we could do an initial parse of just the environments property (without any expansion), expand variables on the whole file's contents, then parse with serde.
To make this more useful and powerful we could also allow some simple expressions:
target:
experience:
places:
start:
configuration:
name: My Game${ if(ne($environmentLabel, 'prod'), concat(' [', upper($environmentLabel), ']')) }name: My Game${ if $environmentLabel != 'prod' then ' [$environmentLabel]' }
The text was updated successfully, but these errors were encountered:
Another thing we could consider here is using multiple yaml docs (separated by ---). This way we could parse the first doc to read the environment info and variables, then apply the template to the full config. This would mean expressions could be used to generate keys as well as values.
If we had templates around keys it would wreck formatting in editors. How does Helm solve this? Do we need a Mantle vscode extension?
What type of feature request is this?
Describe your problem
The current environment overrides configuration options are limited and require lots of boilerplate which makes it harder to read.
The
targetOverrides
provides full flexibility at the cost of making it hard to add simple things and by reducing DRYness. As a result, thetargetNamePrefix
andtargetAccess
properties were added as shorthands totargetOverrides
modifications. This is not a scalable approach to the config format.Describe the solution you'd like
Switch to a variable-based approach, where Mantle provides a simple variable expansion to the user's config. Mantle will provide a set of default variables (like
environmentLabel
) and will allow the user to define their own variables per environment via avariables
dictionary property on the environment object.In order for this to work we would need to perform the variable expansion before parsing the config with serde. To do this we could do an initial parse of just the
environments
property (without any expansion), expand variables on the whole file's contents, then parse with serde.To make this more useful and powerful we could also allow some simple expressions:
The text was updated successfully, but these errors were encountered: