-
Notifications
You must be signed in to change notification settings - Fork 641
Just Updated column lists greatest, not the latest version #310
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
Comments
I think this is fix/changed? |
No, the summary page still shows the max version next to crates in all positions. |
Yep, this is where the version is coming from for the /summary JSON that's used on the home page. |
Ok, so currently the way we get the "just updated" list is:
There are a number of possible solutions here; I'm not sure which is best.
I kind of like this solution because it does one query instead of 2, but it diverges the "just updated" query the most from the other queries, which adds maintenance complexity. I'm also not sure off the top of my head how to translate this to diesel. Implementing this solution should definitely add tests that capture the current behavior in the common case and the desired behavior in the case described in this issue, around here: Lines 1224 to 1288 in 21e04f3
|
What is the purpose of the "Just updated" section on the homepage? I haven't personally found it useful so far. |
That's a great question! At least originally, I think the idea was to quickly show the activity going on, because it's mildly interesting. |
I've been stumbling toward what I hope is a fix for this issue. I started with the tests, which led me to decide that adding I have an incomplete PR #1931 which has a commented out test that fails. I think that is just a test setup problem. Also, the PR code figures out which version is the most recently updated, but doesn't bubble that information all the way up to the user interface. My question here is about the approach. Does the general shape of the PR code seem good? I didn't take any of the three paths that @carols10cents suggested. Oops! I am unsettled to realize there there are two other places in the code that gets all the versions and the picks the highest version: src/controllers/krate/metadata.rs and src/controllers/krate/search.rs. I don't see a low impact way to fold those queries into my new |
Ah. As usual, once I start talking about some code, I find other ways to look at it. The stuff I changed doesn't include the query used the GET /summary route. My (commented out) test failure is a real failure. (I'm remain unsure if the test setup is correct, but no way that test can pass as the code stands.) |
I'm happy with my PR at this point. The path I took adds a field, What remains to do is to use |
Hmm. Looking at https://crates.io home page… I find the crate versions in several columns confusing. It's pretty clear that page always shows the highest version number for each crate mentioned. For example, under Most Downloaded right now is |
Hi Bruce! Thank you so much for working on this!!
That's totally fine!!! I'm extremely open to ideas that I wasn't able to think of! I see now that I was assuming the change to the logic should be pushed down into the query and have the SQL be responsible, but your approach separates the queries (which are actually fine as-is) from the display in the UI (which is rightfully a separate concern). Neat, and I like it!
I... hadn't really thought about how the version number doesn't really make sense for the most downloaded list! That list uses the total number of downloads for all versions of that crate, so perhaps we shouldn't display a version number for that column at all. That also goes for the "Most Recently Downloaded" column. Review of the PR incoming, with some pointers to the frontend code that'll need to be updated with this approach. |
…8.0.0, r=Turbo87 Bump ember-moment from 7.5.0 to 8.0.0 Bumps [ember-moment](https://github.com/stefanpenner/ember-moment) from 7.5.0 to 8.0.0. <details> <summary>Release notes</summary> *Sourced from [ember-moment's releases](https://github.com/stefanpenner/ember-moment/releases).* > ## Add smoke tests, travis ci now tests against 1.10->#release, fixes regression against Ember 1.10.0 > - Smoke tests added > - Fixing regression which broke 1.10.0 > - Added Ember 1.10.0 -> #release to the Travis CI matrix </details> <details> <summary>Changelog</summary> *Sourced from [ember-moment's changelog](https://github.com/stefanpenner/ember-moment/blob/master/CHANGELOG.md).* > ### 8.0.0 > > * [BREAKING] drops Node 6 support > * Updates ember-macro-helpers to 4.x > > ### 7.8.1 > > * [@​puwelous](https://github.com/puwelous) Substitute merge() with assign() - Ember deprecation [#296](https://github-redirect.dependabot.com/stefanpenner/ember-moment/issues/296) > * [@​jasonmit](https://github.com/jasonmit) ci: Bump Supported Node version from 4 to 6. > * [@​kellyselden](https://github.com/kellyselden) update ember-macro-helpers [#285](https://github-redirect.dependabot.com/stefanpenner/ember-moment/issues/285) > * [@​scottkidder](https://github.com/scottkidder) Replace Logger with console [#281](https://github-redirect.dependabot.com/stefanpenner/ember-moment/issues/281) > > ### 7.7.0 > > * [@​fenekku](https://github.com/fenekku) deprecated hideSuffix/hidePrefix in favor of hideAffix > * [@​crotwell](https://github.com/crotwell) added utc helper & macro > * > > ### 7.6.0 > > * [@​kellyselden](https://github.com/kellyselden) Fix invalid reexport for helpers/unix > * Upgrade ember-cli and dependencies > > ### 7.3.0 > > * Setting locale now sets locale on global moment object > * Added `setLocale` and `setTimeZone`. Better naming. Will continue to support `changeLocale` and `changeTimeZone` but have updated README to prefer new method names > * Added `localeChanged` and `timeZoneChanged` events > * [@​mfeltz](https://github.com/mfeltz) scoped moment-subtract and moment-add to use the moment service `locale` property > > ### 7.2.0 > > * [@​kellyselden](https://github.com/kellyselden) add back `ember-macro-helpers` > > ### 7.1.1 > > * Removed `ember-macro-helpers` > > ### 7.1.0 > > * [@​kellyselden](https://github.com/kellyselden) ported computed macro factory to use computed macro utility methods from `ember-macro-helpers` > > ### 7.0.3 > > * Upgrade `ember-cli-moment-shim` to 3.0.0 > * now helper now recomputes using setTimeout instead of run.later [#205](https://github-redirect.dependabot.com/stefanpenner/ember-moment/issues/205) > > ### 7.0.2 > > * Revert upgrade `ember-cli-moment-shim` to 2.2.1 (moment.now issue) ></tr></table> ... (truncated) </details> <details> <summary>Commits</summary> - [`7334cee`](adopted-ember-addons/ember-moment@7334cee) 8.0.0 - [`61aa2c1`](adopted-ember-addons/ember-moment@61aa2c1) chore: Update changelog. - [`4b56658`](adopted-ember-addons/ember-moment@4b56658) Merge pull request [#314](https://github-redirect.dependabot.com/stefanpenner/ember-moment/issues/314) from GreatWizard/update-ember-macro-helpers - [`bef3ffe`](adopted-ember-addons/ember-moment@bef3ffe) ci: update CI config and engines node to run on node 8 and upper - [`9e1bdcd`](adopted-ember-addons/ember-moment@9e1bdcd) chore: update ember-macro-helpers version to expose a recent one in dependency - [`f7eeb90`](adopted-ember-addons/ember-moment@f7eeb90) Merge pull request [#310](https://github-redirect.dependabot.com/stefanpenner/ember-moment/issues/310) from himynameisjonas/patch-1 - [`29e4029`](adopted-ember-addons/ember-moment@29e4029) Replace merge with assign - [`a14c935`](adopted-ember-addons/ember-moment@a14c935) Merge pull request [#305](https://github-redirect.dependabot.com/stefanpenner/ember-moment/issues/305) from mbinet/cleanup-readme - [`7469733`](adopted-ember-addons/ember-moment@7469733) Move contributing informations to dedicated file - [`2dc62a8`](adopted-ember-addons/ember-moment@2dc62a8) Add TOC - Additional commits viewable in [compare view](adopted-ember-addons/ember-moment@v7.5.0...v8.0.0) </details> <br /> [](https://dependabot.com/compatibility-score.html?dependency-name=ember-moment&package-manager=npm_and_yarn&previous-version=7.5.0&new-version=8.0.0) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- **Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit. You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com). <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Automerge options (never/patch/minor, and dev/runtime dependencies) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details>
Newest updated This PR is working toward addressing #310. This is incomplete. There is a relevant test commented out because it fails.
I think this was fixed by #1931, meaning this issue can be closed. |
Right now the Just Updated column lists
ndarray (0.5.0-alpha.1)
even though the new upload that triggered it was0.4.9
. ndarray @ crates.ioThe text was updated successfully, but these errors were encountered: