-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Test tour.dlang.org as alternative backend #1647
Conversation
Why? |
'Cause DPaste is down a lot of time (like now) and we have no control over it (i.e. can't fix it), which means all executable blocks on dlang.org don't work... The DTour already exposes an API to executable runnable examples, so this was a proof-of-concept PR to investigate whether we could switch to the DTour as API backend. |
013ccea
to
dc0492e
Compare
This is no longer true - DPaste's frontend and backend is hosted on my server. The only thing that's not under our control is the domian. I suggest we fix that by making in redirect to paste.dlang.io instead of the other way around. |
Oh it seems that I forgot to post the motivation here. There are many problems with DPaste and I don't think it's easy to fix all of them:
A good "real life" example can be found on dlang/phobos#5517 (comment) as well.
It's not like I haven't tried to improve DPaste in the past, even the rebranding: nazriel/dpaste-frontend#4 @CyberShadow you still have access to dlang.io via NameCheap right? Feel free to set up a A / CNAME record for #perf mattersDPaste: DTour: Note that it didn't cache the request as this is currently not activated (-> dlang-tour/core#545). |
Agreed.
I'm fine with going forward with this PR if you consider things to be ready here and on the backend's side.
If there is no interest in maintaining DPaste, then a better solution would be a migration plan to upgrade the tour backend with DPaste's critical features (saving pastes and supporting its set of compilers), migrating its database of pastes, and replacing / decommissioning it. |
CC @nazriel |
Yep, I do. As shown, even without the caching PR, the tour backend is still a lot faster :)
Could you please fill all required tasks at the DTour repo? We might also want to take inspirations from the playgrounds of other languages, e.g. https://play.rust-lang.org/ |
I think this breaks the front page examples but I'm not sure how. I can only see that they don't work on dtest.dlang.io, even though the master branch works. |
dc0492e
to
f09ce0b
Compare
Thanks for your pull request, @wilzbach! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
DPaste sends formencoded requests, while I set the default to json. However, this means that the request is "preflighted" (see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Preflighted_requests), which DPaste doesn't support:
Another good resource: https://www.soasta.com/blog/options-web-performance-with-single-page-applications. |
f09ce0b
to
617cb19
Compare
Okay, it's in the queue This should make things even faster when merged and deployed.
Should be fixed now - let's better wait and have a look at Dtest though ;-) |
617cb19
to
58e80ca
Compare
OK, I filed the ones that came up so far.
Seems to work! |
BTW, I noticed something a little weird - the "Reset" button is visible by default, but it goes away after you click it once. |
Thanks. I will work on them over the next weeks - you will be notified ;-)
-> #1779 |
Proof of concept PR (it's ugly!) to switch over to the DLang Tour as code executor for the executable blocks on dlang.org
However, unfortunately DLang Tour doesn't support
STDIN
norARGS
, so it would only work for the runnable code block in the documentation.