-
Notifications
You must be signed in to change notification settings - Fork 660
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
Bug: YAML Validation does not support aliases between documents #3248
Comments
I don't see this documented anywhere as an expected functionality. Why would this then be a bug? I understand if this is a feature request, but this kind of aliasing is not explicitly supported. |
I'm having some trouble understanding the specification so I could be wrong, but the section about rejecting unidentified aliases says "A well-formed character stream must match the BNF productions specified in the following chapters. Successful loading also requires that each alias shall refer to a previous node identified by the anchor. A YAML processor should reject ill-formed streams and unidentified aliases." So it sounds like it's talking about the anchors existing in the stream not the document, and the section on streams says "A YAML stream consists of zero or more documents" This seems to be reinforced by it working in the official linter. |
Looking into this issue, what you want to do cannot be done with how YAML files are processed. The anchor cannot be aliased across document as documents are completely independent of each other. Therefore, any anchor must be aliased before the next I tried using your YAML on the linter that you linked to and it also failed to recognize the alias, but returned that it is valid. Deleting the anchor without deleting the alias also returns this as true, which it clearly shouldn't. The linter is only checking if it is in the right format and not if the data is valid or not. Therefore, the linter shows that it is correct while properly parsing the data on the website shows it as invalid since the anchor does not exist for the alias on your second player. |
An additional source using Python. I firmly believe that this is not a bug with Archipelago and is instead fundamental to the YAML format. |
What happened?
YAML files that contain anchors in one document which are referenced in further documents results in a validation error on https://archipelago.gg/check and a crash when used with the "Generate" option, but are valid YAML according to the official YAML linter https://www.yamllint.com/
I have attached an example file
ExampleYAML.zip
What were the expected results?
I would expect the file to pass validation on https://archipelago.gg/check and generate a multiworld with 2 games each of which picks from the same options
Software
Website
The text was updated successfully, but these errors were encountered: