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

Make information block optional in syntax, but point out it will be needed #24

Merged
merged 3 commits into from Mar 11, 2021

Conversation

cabo
Copy link
Member

@cabo cabo commented Mar 9, 2021

Close #23

@@ -1,7 +1,7 @@
start = sdf-syntax

sdf-syntax = {
info: sdfinfo ; don't *require* this in flexible syntax, though
? info: sdfinfo ; This will be required in most process policies, but not a syntax error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

although not a syntax error, a warning should be given that this block is missing

@@ -496,6 +496,9 @@ This object has three sections: the information block, the namespaces section, a
## Information block

The information block contains generic meta data for the file itself and all included definitions.
To enable tool integration, the information block is optional in the grammar
of SDF; most processes for working with SDF files will have policies
that only SDF models with an info block can be processed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Syntax verification tooling should give a warning (but not fail) when this block is missing.

@nwidell
Copy link

nwidell commented Mar 9, 2021

If info-block is optional, then I guess the info-block qualities should also be optional, right? Assuming that if the info block is there then all its components must be present.
E.g., If I want an info block with only a version

@cabo
Copy link
Member Author

cabo commented Mar 10, 2021

Making each quality optional increases the number of cases that need to be tested.
(Nothing says the strings cannot be empty :-)

@cabo cabo merged commit 16df786 into master Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mandatory/optional SDF information block
3 participants