-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix an issue where semver:sort#3
was not returning all results
#15
Conversation
36e84cd
to
79e7019
Compare
semver:sort#3
was not returning all results
79e7019
to
db1c9a4
Compare
@adamretter Thank you for spotting this issue! I have a couple of questions about the changes in the commit about making syntax compatible with 5.1.0 and 6.1.0-SNAPSHOT.
|
Thanks for your review Joe :-)
let $serialized := $sorted ! semver:serialize(.)
return
$serialized
In the context of running this on multiple eXist-db versions, I think there is unfortunately much of the code that is very fragile and not just the part I adjusted. I was actually surprised that more tweaks were not needed. The fragility of the code in this context is not a reflection on this application itself, quite the opposite, this application is indeed well structured, rather that past eXist-db versions have not been as standards compliant as they should. Rather than place comments throughout, I think it is better to have a robust CI which can guard against future regressions. This is why I put some effort into having our CI test this against eXist-db 4.2.0, 5.1.0, and 6.1.0-SNAPSHOT. Do you agree, that the CI now covers this? |
… returned from semver:sort#3 when coercion is used
db1c9a4
to
095332e
Compare
@adamretter Thanks for this info. CI tests will suffice for flagging errors. One more question has occurred to me. Could you explain the thinking behind targeting versions 4.2.0 and 5.1.0 - which are neither the oldest nor the newest releases in their respective major series? |
They are the most stable versions that I could execute the code against. I looked for the oldest possible versions to ensure the most compatibility possible |
@adamretter Ok, that makes sense. Thanks! |
There was a bug in the
semver:sort#3
function where it would only return items if those items' unparsed version string matched the serialized coerced version string. The comparison should instead have been performed against coerced versions only (assuming the user had requested coercion).I have tested that this works on the following eXist-db versions: