eclipse-archived / ceylon-herd

The Ceylon repository web application
Apache License 2.0
21 stars 11 forks source link

Search with binary versions using `retrieval=any` returns wrong results #258

Open quintesse opened 8 years ago

quintesse commented 8 years ago

Issue https://github.com/ceylon/ceylon/issues/5990 turns out to be the Herd returning different results than the local CMR.

Right now when you pass the binary versions for both JVM and JS artifacts the Herd will perform an AND even when retrieval=any, ie. it will only return artifacts that have the correct binary versions set for both backends. This is not according to the definition of retrieval=any.

So for example the following query should return versions 1.2.0 (valid for JVM only) and 1.2.1 (valid for both JVM and JS):

https://modules.ceylon-lang.org/api/5/complete-versions?module=ceylon.collection&version=&type=.car%2C.jar%2C-model.js%2C.js%2C.dart%2C-dartmodel.json%2Cmodule-resources%2C.src%2C-sources.jar%2Cmodule-doc%2C.scripts.zip%2Cmodule.properties%2Cmodule.xml%2Cmodule-resources%2Cmodule-doc&binaryMajor=8&binaryMinor=0&memberName=&memberSearchPackageOnly=false&memberSearchExact=false&retrieval=any&jvmBinaryMajor=8&jvmBinaryMinor=0&jsBinaryMajor=9&jsBinaryMinor=0

This happens even when the affected artifact isn't part of the requested artifact types! (So even when only looking for JVM artifacts the fact that a JS artifact exists with the wrong binary version is enough to exclude it from the results).

FroMage commented 8 years ago

Good things we now have working Herd tests in the CMR :)