www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Making a repo of downloaded dub package

reply Dukc <ajieskola gmail.com> writes:
More than once I have downloaded a DUB package which almost 
compiles but not quite. The fixes are often so trivial that even 
the user can do them, and the package starts working.

But one may want to create a pull request to fix those issues for 
others too. Is there any way to make the automatically downloaded 
dub package into a git repository which acts as if cloned from 
GitHub before making the changes?
Aug 27 2017
parent reply Dukc <ajieskola gmail.com> writes:
Bump
Sep 04 2017
parent reply Igor <stojkovic.igor gmail.com> writes:
On Monday, 4 September 2017 at 14:35:47 UTC, Dukc wrote:
 Bump
Search for word "local" here: https://code.dlang.org/docs/commandline. Maybe some of those can help you. If not you could make a pull request for dub that would support such a thing :)
Sep 04 2017
parent reply Dukc <ajieskola gmail.com> writes:
On Monday, 4 September 2017 at 20:31:35 UTC, Igor wrote:
 Search for word "local" here: 
 https://code.dlang.org/docs/commandline. Maybe some of those 
 can help you. If not you could make a pull request for dub that 
 would support such a thing :)
That will make a Dub package out of a Git package, but I'm trying to do it vice-versa (And so that it is able to use the same histoy as the repository). I think it will require Git commands, but what commands exactly? I was unable to figure that out myself.
Sep 04 2017
parent reply Rene Zwanenburg <renezwanenburg gmail.com> writes:
On Tuesday, 5 September 2017 at 06:23:26 UTC, Dukc wrote:
 On Monday, 4 September 2017 at 20:31:35 UTC, Igor wrote:
 Search for word "local" here: 
 https://code.dlang.org/docs/commandline. Maybe some of those 
 can help you. If not you could make a pull request for dub 
 that would support such a thing :)
That will make a Dub package out of a Git package, but I'm trying to do it vice-versa (And so that it is able to use the same histoy as the repository). I think it will require Git commands, but what commands exactly? I was unable to figure that out myself.
When you go to the package's page on code.dlang, look for the github repository link in the top right corner. You can fork from there.
Sep 05 2017
parent reply Jonathan M Davis via Digitalmars-d-learn writes:
On Tuesday, September 05, 2017 07:52:03 Rene Zwanenburg via Digitalmars-d-
learn wrote:
 On Tuesday, 5 September 2017 at 06:23:26 UTC, Dukc wrote:
 On Monday, 4 September 2017 at 20:31:35 UTC, Igor wrote:
 Search for word "local" here:
 https://code.dlang.org/docs/commandline. Maybe some of those
 can help you. If not you could make a pull request for dub
 that would support such a thing :)
That will make a Dub package out of a Git package, but I'm trying to do it vice-versa (And so that it is able to use the same histoy as the repository). I think it will require Git commands, but what commands exactly? I was unable to figure that out myself.
When you go to the package's page on code.dlang, look for the github repository link in the top right corner. You can fork from there.
Yeah. I'm fairly certain that that's your only option. dub is not designed with the idea that you would be editing the source code that it downloads. That's just intended for building the code that you are editing. It does support adding local repos to get pulled in via dub so that you can have your local stuff depend on other local stuff, but when dub downloads something, it's really just for its internal use. - Jonathan M Davis
Sep 05 2017
parent Dukc <ajieskola gmail.com> writes:
On Tuesday, 5 September 2017 at 08:43:02 UTC, Jonathan M Davis 
wrote:
 Yeah. I'm fairly certain that that's your only option. dub is 
 not designed with the idea that you would be editing the source 
 code that it downloads. That's just intended for building the 
 code that you are editing. It does support adding local repos 
 to get pulled in via dub so that you can have your local stuff 
 depend on other local stuff, but when dub downloads something, 
 it's really just for its internal use.

 - Jonathan M Davis
It seems that if I reclone the repo into another directory and copy it's history (.git directory) into the dub package, it works except that DUB or something else has converted the line endings to wrong format. I have not tested this throughly yet so I'm not sure it does the trick but may be worth trying if somebody else has the same problem.
Sep 05 2017