dub-registry icon indicating copy to clipboard operation
dub-registry copied to clipboard

[WIP] Experiment with generating all API data statically

Open wilzbach opened this issue 7 years ago • 7 comments

See https://github.com/dlang/dub-registry/issues/309

A start, probably curl is too slow and this should would need to be done directly in the registry.

TODO:

  • [ ] generate a list of redirects (see https://www.netlify.com/docs/redirects/)

wilzbach avatar Mar 30 '18 05:03 wilzbach

Thanks for your pull request, @wilzbach!

dlang-bot avatar Mar 30 '18 05:03 dlang-bot

7:46:36 AM: Build exceeded maximum allowed runtime

So I guess this would have to use a different approach, like

  • generate responses directly from the registry
  • use a different CI/build environment
  • run request in parallel
  • generate responses from the JSON file (though I think with https://github.com/dlang/dub-registry/pull/278 this wouldn't work anymore)

wilzbach avatar Mar 30 '18 08:03 wilzbach

how about limiting packages to a select few? I doubt we will need all packages. And whenever packages are needed for a test they can get added (such as when people might want packages with different readme names, with different languages, with different metadata, different logos, different repo types, etc)

WebFreak001 avatar Mar 30 '18 08:03 WebFreak001

This is not about previewing PRs, this is about having a static registry mirror on a CDN.

See: https://github.com/dlang/dub-registry/issues/309

wilzbach avatar Mar 30 '18 08:03 wilzbach

oh ok nvm then, though for netlify PRs I think that would be a good idea

WebFreak001 avatar Mar 30 '18 08:03 WebFreak001

though for netlify PRs I think that would be a good idea

FYI: They are already limited because at the moment there's no way to reach a package if not via the main list view and dependencies of such a a package. As all URLs with query parameters ("?") are ignored, the wget mirror won't do any pagination.

So if you go to https://dub.pm at the moment (that's the static snapshot = to what you see on the previews), only ~ 20 packages are reachable. Maybe a bit more with their dependencies.

wilzbach avatar Mar 31 '18 21:03 wilzbach

Not sure that's the best move, https://github.com/dlang/dub-registry/issues/309#issuecomment-384923697. It would also be a big future design liability.

MartinNowak avatar Apr 27 '18 09:04 MartinNowak