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

[Low-Code CDK] Support forward references in manifest #20503

Closed
clnoll opened this issue Dec 15, 2022 · 0 comments · Fixed by #20893
Closed

[Low-Code CDK] Support forward references in manifest #20503

clnoll opened this issue Dec 15, 2022 · 0 comments · Fixed by #20893
Assignees

Comments

@clnoll
Copy link
Contributor

clnoll commented Dec 15, 2022

Tell us about the problem you're trying to solve

When a low-code CDK user creates their manifest file, they have limited flexibility with the layout because the parser does not support forward references - i.e. each reference must be defined above the reference's location in the file, or else an UndefinedReferenceException exception is raised. From the developer's point of view this means that you may not be able to organize the file in a way that is readable.

The specific example that highlights this issue is the new schemas key. When schemas are defined inline in the manifest, they're bulky and long - it's ideal to have them at the end of the file, but that's not currently possible.

Describe the solution you’d like

Updating the manifest preprocessing code to support forward references.

The current code stores a temporary data structure, evaluated_mapping that collects manifest information that may be referenced later in the manifest. Instead, we can look up references by reading the value(s) at the referenced path in the raw manifest.

Describe the alternative you’ve considered or used

We could leave this as-is and assume that most people will have limited interaction with the yaml file. However, we expect that users are going to be toggling between the form view and the yaml even after the form is available, so it seems that the fact that a human will be looking at the yaml file isn't going to go away.

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

Successfully merging a pull request may close this issue.

1 participant