dlang.org endpoint for permanent links to DIPs

Seb seb at wilzba.ch
Wed Jun 3 19:51:10 UTC 2020


On Wednesday, 3 June 2020 at 18:57:18 UTC, Dennis wrote:
> On Wednesday, 3 June 2020 at 18:22:34 UTC, Seb wrote:
>> With the current setup it would probably need to be a bot that 
>> monitors commits to dlang/dips, parses the current DIP list, 
>> updates the .htaccess based on this and opens this as a PR if 
>> the diff changed. Not super hard, but certainly not an hour's 
>> work.
>
> Watching the dlang/dips repository and parsing the DIP list is 
> something that needs to happen regardless of whether you want 
> to change .htaccess or generate .html pages based on it. 
> Because I don't know the underlying machinery, I don't get why 
> the former is hard and the latter is easy.

HTML generation can happen directly at the dlang/dips repository 
and can easily be pushed to any file storage (like e.g. netlify).
When you want to adjust the .htaccess you can't just update the 
file in-place, but you need to automatically create PRs which (1) 
need to be reviewed by humans every time (there's no direct merge 
into master) and (2) you need to make sure GitHub doesn't block 
your bot account and (3) that there won't ever be a possibility 
for a merge conflict.
Furthermore, it's a lot harder to debug when/why the bot doesn't 
fire compared to just running a HTML build & deploy script which 
almost every CI can do.

>> Furthermore, a lot of people won't be aware that the links 
>> from GitHub can break and might not even know about 
>> dips.dlang.org
>
> People who do know can safely use the links in e.g. the DMD 
> source code.
> People who don't know will not use it, regardless of whether it 
> redirects to GitHub or renders the DIP on the site.

The rendered site could be promoted as the official way by 
basically moving the ToC to it and let all links point to it.
Then it would be the only way almost all people look at DIPs 
(like Python does with its PEPs).

> Is the Vibe.d server that runs the dlang website open source?

Technically speaking Vibe.d isn't used to run dlang.org. Ddox 
(Vibe.d) like ddoc generate HTML files which are automatically 
uploaded to an Apache2 server.


More information about the Digitalmars-d mailing list