You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by "abderrahim (via GitHub)" <gi...@apache.org> on 2023/10/15 13:16:59 UTC
[PR] _yaml.pyx: disallow duplicate keys in yaml mappings [buildstream]
abderrahim opened a new pull request, #1877:
URL: https://github.com/apache/buildstream/pull/1877
The current behaviour is to silently keep the latst one which is obviously wrong.
ruamel-yaml as used in the round-tripping code also raises an error (at least in the current version)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] _yaml.pyx: disallow duplicate keys in yaml mappings [buildstream]
Posted by "fishrockz (via GitHub)" <gi...@apache.org>.
fishrockz commented on PR #1877:
URL: https://github.com/apache/buildstream/pull/1877#issuecomment-1867916861
Isn't this going to cause currently working but badly constructed projects to start failing to load?
Would that not make it a braking change?
Wouldn't this ether need to be a configurable failure or a bump to bst3?
Ps I agree this is obviously behaviour we want to call out to our users and generally fail on
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] _yaml.pyx: disallow duplicate keys in yaml mappings [buildstream]
Posted by "abderrahim (via GitHub)" <gi...@apache.org>.
abderrahim merged PR #1877:
URL: https://github.com/apache/buildstream/pull/1877
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] _yaml.pyx: disallow duplicate keys in yaml mappings [buildstream]
Posted by "nanonyme (via GitHub)" <gi...@apache.org>.
nanonyme commented on PR #1877:
URL: https://github.com/apache/buildstream/pull/1877#issuecomment-1939506154
This was supposed to be BuildStream 2 behaviour. BuildStream 1 warned about this and stated it's going to start failing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] _yaml.pyx: disallow duplicate keys in yaml mappings [buildstream]
Posted by "abderrahim (via GitHub)" <gi...@apache.org>.
abderrahim commented on PR #1877:
URL: https://github.com/apache/buildstream/pull/1877#issuecomment-1942152625
> This was supposed to be BuildStream 2 behaviour. BuildStream 1 warned about this and stated it's going to start failing.
Except it wasn't :). Using buildstream 1, you could get either no warning, a warning or an error depending on the version of ruaml-yaml that you're using.
This is why I think it is reasonable to merge this even though it used to "work": depending on the version of a dependency it could work or not.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] _yaml.pyx: disallow duplicate keys in yaml mappings [buildstream]
Posted by "gtristan (via GitHub)" <gi...@apache.org>.
gtristan commented on PR #1877:
URL: https://github.com/apache/buildstream/pull/1877#issuecomment-1763686005
If I understand correctly, this will improve correctness by raising an error when bst loads redundant dict keys such as:
```yaml:
mydict:
foo: Pony
bar: Horsy
foo: Zebry
```
And the update to the test case is required because we're otherwise using our yaml parsing to parse "variables" dictionaries of multiple elements which would cause this error to be raised.
If my understanding is correct, then this looks good to me @abderrahim please feel free to merge :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] _yaml.pyx: disallow duplicate keys in yaml mappings [buildstream]
Posted by "nanonyme (via GitHub)" <gi...@apache.org>.
nanonyme commented on PR #1877:
URL: https://github.com/apache/buildstream/pull/1877#issuecomment-1939507666
At minimum bring the warnings back.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org