www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [spec] Ddoc generator issue?

reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
I have set a branch other than 'master' in my fork of the 
dlang.org repo. But if I try to run make on this locally there is 
some error about not finding master. Is it required that the 
build  has to run on the master branch?
May 16
parent reply Seb <seb wilzba.ch> writes:
On Thursday, 16 May 2019 at 21:17:11 UTC, Dibyendu Majumdar wrote:
 I have set a branch other than 'master' in my fork of the 
 dlang.org repo. But if I try to run make on this locally there 
 is some error about not finding master. Is it required that the 
 build  has to run on the master branch?
No it's not. What error are you receiving and what command did you run?
May 16
parent reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
On Thursday, 16 May 2019 at 23:44:32 UTC, Seb wrote:
 What error are you receiving and what command did you run?
I am running mamke -f posix.mak test. The error I get is this: .generated/stable_dmd-2.085.0/dmd2/linux/bin64/rdmd --compiler=.generated/stable_dmd-2.085.0/dmd2/linux/bin64/dmd -conf=.generated/stable_dmd-2.085.0/dmd2/linux/bin64/dmd.conf ../tools/contributors.d --format=ddoc "master" > .generated/contributors_list.tmp fatal: ambiguous argument 'master': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' object.Exception ../tools/contributors.d(88): Failed to execute '"git" "-c" "mailmap.file=/home/dylan/dlang/tools/.mailmap" "-C" "/home/dylan/dlang/tools/../dlang.org" "log" "--use-mailmap" "--pretty=format:%aN|%aE" "master"'. ---------------- ??:? pure safe void std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, scope const(char)[]) [0xa07028d2] ??:? pure safe bool std.exception.enforce!().enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0xa070284c] ??:? contributors.GitAuthor[] contributors.findAuthors(immutable(char)[], contributors.FindConfig) [0xa06facfc] ??:? _Dmain [0xa06fb0b6] posix.mak:908: recipe for target '.generated/contributors_list.ddoc' failed make: *** [.generated/contributors_list.ddoc] Error 1
May 17
parent reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
On Friday, 17 May 2019 at 12:17:43 UTC, Dibyendu Majumdar wrote:
 The error I get is this:

 .generated/stable_dmd-2.085.0/dmd2/linux/bin64/rdmd 
 --compiler=.generated/stable_dmd-2.085.0/dmd2/linux/bin64/dmd 
 -conf=.generated/stable_dmd-2.085.0/dmd2/linux/bin64/dmd.conf 
 ../tools/contributors.d --format=ddoc "master" > 
 .generated/contributors_list.tmp
 fatal: ambiguous argument 'master': unknown revision or path 
 not in the working tree.
Okay it seems that I needed to create a local master branch tracking origin/master. Because I have set the default branch on my fork to some other branch, there was no local master branch created. Still - all I want to do is work on the spec. It is very very painful.
May 17
next sibling parent reply Jonathan M Davis <newsgroup.d jmdavisprog.com> writes:
On Friday, May 17, 2019 6:56:02 AM MDT Dibyendu Majumdar via Digitalmars-d 
wrote:
 On Friday, 17 May 2019 at 12:17:43 UTC, Dibyendu Majumdar wrote:
 The error I get is this:

 .generated/stable_dmd-2.085.0/dmd2/linux/bin64/rdmd
 --compiler=.generated/stable_dmd-2.085.0/dmd2/linux/bin64/dmd
 -conf=.generated/stable_dmd-2.085.0/dmd2/linux/bin64/dmd.conf
 ../tools/contributors.d --format=ddoc "master" >
 .generated/contributors_list.tmp
 fatal: ambiguous argument 'master': unknown revision or path
 not in the working tree.
Okay it seems that I needed to create a local master branch tracking origin/master. Because I have set the default branch on my fork to some other branch, there was no local master branch created. Still - all I want to do is work on the spec. It is very very painful.
The normal workflow is to fork the repo on github then clone your entire repo locally. You keep your master up-to-date with the upstream master and create a local branch whenever you want to do work for a PR. Once it's ready, you push that branch to your github repo and create a PR from that branch to upstream. Separate branches are used for each PR, and you usually delete each branch after a PR has been merged. Because that's the normal workflow that pretty much everyone follows, it's really not surprising if the Makefiles assume something based on that workflow and don't work properly if you do something differently. In general though, I have no idea how you could function without a local copy of master, because you need to be branching off of master when creating PRs, or you risk working on outdated versions of the files. Regardless, the dlang.org repo is probably the worst repo we have, because is has so many targets, a number of which run tools that not everyone has (the target that creates the ebook version of the documentation would be a prime example of that). So, if you're going to run into problems with any of our repos, it would be that one. - Jonathaan M Davis
May 17
parent Dibyendu Majumdar <d.majumdar gmail.com> writes:
On Friday, 17 May 2019 at 13:40:42 UTC, Jonathan M Davis wrote:
 The normal workflow is to fork the repo on github then clone 
 your entire repo locally. You keep your master up-to-date with 
 the upstream master and create a local branch whenever you want 
 to do work for a PR. Once it's ready, you push that branch to 
 your github repo and create a PR from that branch to upstream. 
 Separate branches are used for each PR, and you usually delete 
 each branch after a PR has been merged. Because that's the 
 normal workflow that pretty much everyone follows, it's really 
 not surprising if the Makefiles assume something based on that 
 workflow and don't work properly if you do something 
 differently. In general though, I have no idea how you could 
 function without a local copy of master, because you need to be 
 branching off of master when creating PRs, or you risk working 
 on outdated versions of the files.
I create a branch off master using Github UI - and then set that branch to be the default so that when I cloned the repo, it was on my branch. I think if I didn't set the default branch to my own and left it as master it would work fine. Regards
May 17
prev sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.com> writes:
On 5/17/19 8:56 AM, Dibyendu Majumdar wrote:
 On Friday, 17 May 2019 at 12:17:43 UTC, Dibyendu Majumdar wrote:
 The error I get is this:

 .generated/stable_dmd-2.085.0/dmd2/linux/bin64/rdmd 
 --compiler=.generated/stable_dmd-2.085.0/dmd2/linux/bin64/dmd 
 -conf=.generated/stable_dmd-2.085.0/dmd2/linux/bin64/dmd.conf 
 ../tools/contributors.d --format=ddoc "master" > 
 .generated/contributors_list.tmp
 fatal: ambiguous argument 'master': unknown revision or path not in 
 the working tree.
Okay it seems that I needed to create a local master branch tracking origin/master. Because I have set the default branch on my fork to some other branch, there was no local master branch created. Still - all I want to do is work on the spec. It is very very painful.
Well it's a large project and installation comes with some decorum. It's par for the course. To work on the spec is quite a hardcore thing to do, so don't get discouraged! At a point I wrote an installation script, and others contributed to it and created this page: https://wiki.dlang.org/Starting_as_a_Contributor I hope you'll find it helpful.
May 17
parent reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
On Friday, 17 May 2019 at 13:57:34 UTC, Andrei Alexandrescu wrote:
 On 5/17/19 8:56 AM, Dibyendu Majumdar wrote:
 Still - all I want to do is work on the spec. It is very very 
 painful.
Well it's a large project and installation comes with some decorum. It's par for the course. To work on the spec is quite a hardcore thing to do, so don't get discouraged!
I am not discouraged but it is needless pain. But I understand the baggage.
 At a point I wrote an installation script, and others 
 contributed to it and created this page:

 https://wiki.dlang.org/Starting_as_a_Contributor

 I hope you'll find it helpful.
Yes I am actually using that. Regards
May 17
parent reply Seb <seb wilzba.ch> writes:
On Friday, 17 May 2019 at 15:16:49 UTC, Dibyendu Majumdar wrote:
 On Friday, 17 May 2019 at 13:57:34 UTC, Andrei Alexandrescu 
 wrote:
 On 5/17/19 8:56 AM, Dibyendu Majumdar wrote:
 Still - all I want to do is work on the spec. It is very very 
 painful.
Well it's a large project and installation comes with some decorum. It's par for the course. To work on the spec is quite a hardcore thing to do, so don't get discouraged!
I am not discouraged but it is needless pain. But I understand the baggage.
 At a point I wrote an installation script, and others 
 contributed to it and created this page:

 https://wiki.dlang.org/Starting_as_a_Contributor

 I hope you'll find it helpful.
Yes I am actually using that. Regards
I am sorry, but I can't recommend using Andrei's installation script as people seem to run in a lot of errors with it which is because the interesting steps are automated, so you don't know what failed. It is also outdated and while I fixed it a few issues in it (e.g. https://github.com/dlang/tools/pull/324), I still don't think we should recommend it to anyone. The wiki should suggest digger if one just wants to build DMD master and git clones for everything else. And well yep building dlang.org is a bit tricky, it's not too hard either if you just build the 'html' target and follow the official instructions here: https://github.com/dlang/dlang.org/blob/master/CONTRIBUTING.md
May 18
parent Dibyendu Majumdar <d.majumdar gmail.com> writes:
On Saturday, 18 May 2019 at 08:45:03 UTC, Seb wrote:
 And well yep building dlang.org is a bit tricky, it's not too 
 hard either if you just build the 'html' target and follow the 
 official instructions here:

 https://github.com/dlang/dlang.org/blob/master/CONTRIBUTING.md
Yes I tried that. The problem is it passes but then the CI tests fail. Turns out during testing there is a step that checks for trailing spaces - and if any line has a trailing space it fails. So I am forced to run the test to ensure that I haven't introduced a trailing space. Why trailing spaces matter I don't know. Regards
May 18