-
-
Notifications
You must be signed in to change notification settings - Fork 238
add code-mirror.dlang.io as fallback registry #1190
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,6 +65,7 @@ static this() | |
|
|
||
| /// The URL to the official package registry. | ||
| enum defaultRegistryURL = "http://code.dlang.org/"; | ||
| enum fallbackRegistryURL = "https://code-mirror.dlang.io/"; | ||
|
|
||
| /** Returns a default list of package suppliers. | ||
|
|
||
|
|
@@ -76,7 +77,12 @@ enum defaultRegistryURL = "http://code.dlang.org/"; | |
| PackageSupplier[] defaultPackageSuppliers() | ||
| { | ||
| logDiagnostic("Using dub registry url '%s'", defaultRegistryURL); | ||
| return [new RegistryPackageSupplier(URL(defaultRegistryURL))]; | ||
| return [ | ||
| new FallbackPackageSupplier( | ||
| new RegistryPackageSupplier(URL(defaultRegistryURL)), | ||
| new RegistryPackageSupplier(URL(fallbackRegistryURL)) | ||
| ) | ||
| ]; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not simply return an array of the two? The intent is already that later array entries act as fallbacks to the earlier ones.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid duplicates, e.g. in
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hope that the documentation on FallbackPackageRegistry is good enough @s-ludwig. |
||
| } | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would make sense to make this an array (this week will I hopefully finally get around setting up a stable mirror myself).
(http://alpha.dub.pm has been around since a while is an active mirror as well, but we use this VM as a pure staging server to preview PRs, hence I don't consider this as stable.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub didn't send my review, so I finally got around setting up a stable mirror myself:
-> https://code-mirror2.dlang.io
Heroku Deploy is a bit more difficult to setup due to vibe-d/vibe.d#1785, but I will get around this as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> https://dub-registry.herokuapp.com/
With dlang/dub-registry#231 setting up a local mirror should be absolutely easy (and doesn't even require a CLI nor money).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://alpha.dub.pm/ says bad gateway btw.