Jump to page: 1 2 3
Thread overview
Moving druntime into the DMD repository
Jul 27, 2018
Seb
Jul 27, 2018
Mike Franklin
Jul 29, 2018
Seb
Jul 27, 2018
Mike Franklin
Jul 27, 2018
Iain Buclaw
Jul 27, 2018
Russel Winder
Jul 27, 2018
Seb
Jul 27, 2018
Jonathan M Davis
Jul 27, 2018
rikki cattermole
Jul 27, 2018
Seb
Jul 27, 2018
Jonathan M Davis
Jul 27, 2018
John Colvin
Jul 27, 2018
Stefan Koch
Jul 27, 2018
Joakim
Jul 29, 2018
Anton Fediushin
Jul 30, 2018
RazvanN
Jul 31, 2018
Jacob Carlborg
Jul 31, 2018
Walter Bright
Jul 31, 2018
Seb
Aug 01, 2018
Seb
Aug 01, 2018
rikki cattermole
Aug 01, 2018
Mike Franklin
Aug 01, 2018
Walter Bright
Jul 31, 2018
Radu
July 27, 2018
This a thread to explore whether it would be feasible to do so.

Motivation
----------

DRuntime and DMD heavily depend on each other.

It happens very often that a PR needs to touch both and then a complicated three-step (or sometimes four-step PR series) needs to be done to keep the CIs happy.
Moreover, as the whole testsuite is at dmd, it happens more often that an error is caught in the testsuite, but would require a druntime PR or the opposite you make a PR to druntime and want its accompanying test to be checked by the CI.

How would this happen?
----------------------

A potential migration could look like this:

- lock druntime (e.g. only allowing admins to merge)
- move source code to dmd (of course with the git history, see e.g. [1])
- update the druntime/posix.mak build script to forward to the new source location
- update other dlang Makefiles
- remove everything else from druntime (optional check for the Makefile update step)
- update CIs and build scripts (more on this below)

[1] https://stackoverflow.com/a/10548919/3026245

What would need to be updated?
-----------------------------

- Makefiles for DMD, Druntime, Phobos, Tools, Dlang.org (mostly path updates)
- LDC/GDC (I think LDC already includes druntime as git submodule)

If we update the druntime/posix.mak file to call the druntime/posix.mak at its new location, then there would be zero breakage (druntime already requires dmd to cloned) and over time these can be updated:

- CI scripts (all of them explicitly clone druntime, but removing that line should be all)
- Release scripts at dlang/installer
- Packager build scripts

(most distros just ship the the libphobos2.{so,a} libraries, but if druntime is shipped too, it will require a path update for the release after such a potential migration.)

What do you think?
------------------

- Has the dmd/druntime split being annoying you too?
- Do you have a better suggestion?
- Would this break your workflow in a drastic way?
July 27, 2018
On Friday, 27 July 2018 at 11:03:50 UTC, Seb wrote:

> - Do you have a better suggestion?

Do we have a rich enough CI API to recognize dependencies between repositories?  For example, if I create a local branch in my dmd repository named `fix_bug` and a local branch in my druntime repository also named `fix_bug` and submit both PRs to their corresponding repositories, can the CI scripts recognize that they have the same branch name and pull them both for testing?

Mike
July 27, 2018
On Friday, 27 July 2018 at 11:03:50 UTC, Seb wrote:

> What do you think?
> ------------------

Also, is there any other compelling reasons besides the test dependency problem to motivate merging the two repositories?  What other benefits would it provide, if any?

Mike
July 27, 2018
On 27 July 2018 at 13:32, Mike Franklin via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Friday, 27 July 2018 at 11:03:50 UTC, Seb wrote:
>
>> What do you think?
>> ------------------
>
>
> Also, is there any other compelling reasons besides the test dependency problem to motivate merging the two repositories?  What other benefits would it provide, if any?
>
> Mike

I can't think of any, but such ABI breakages should be avoided.  The preferred route for any such changes that require synchronisation between dmd and druntime should be in order of:

1. Commit new functions/feature to druntime as dead/unused code.
2. Commit changes to dmd which activates the feature you added to druntime.
3. Add/turn on tests in both dmd and druntime.

Iain
July 27, 2018
On Fri, 2018-07-27 at 11:03 +0000, Seb via Digitalmars-d wrote:
> This a thread to explore whether it would be feasible to do so.
> 
> Motivation
> ----------
> 
> DRuntime and DMD heavily depend on each other.
> 

But DMD is only one of the compilers, there is LDC and GDC. Is Druntime unique to DMD or do the other compilers also use it?

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk


July 27, 2018
On Friday, July 27, 2018 5:03:50 AM MDT Seb via Digitalmars-d wrote:
> What do you think?
> ------------------
>
> - Has the dmd/druntime split being annoying you too?
> - Do you have a better suggestion?
> - Would this break your workflow in a drastic way?

It would break all existing tools and scripts that are used to build the existing repos - many of which are not official tools. So, yes, it would be very annoying. That's not necessarily a good enough reason not to do it, but IMHO, it really needs to provide solid benefits to rearrange things like that for it to be worth breaking all of the existing tools that anyone uses for building dmd, druntime, and Phobos.

It also arguably makes no sense in that a lot of what's in druntime has nothing to do with dmd - e.g. all of the OS C bindings are in there. There are also several modules that need to be in druntime, because druntime uses them but don't really have much to do with the compiler (e.g. core.time and core.thread). And not only from a code organizational standpoint does the current separation make a lot of sense for a lot of what's in druntime, but it also matters from the standpoint of who has permissions to do what. Right now, it's reasonable to give privileges to folks to merge PRs for druntime who have no business merging PRs for dmd. If the repos are merged, then we're forced to either give some of those folks dmd merge rights or make the smaller pool of folks who have merge rights for dmd deal with those PRs.

Also, given that druntime gets linked into Phobos, having that repo be part of the compiler is that much weirder. In that sense, it belongs more with Phobos than dmd.

The dependencies between the three repos do occasionally cause problems, but overall, I think that the separation makes a lot of sense.

- Jonathan M Davis



July 28, 2018
+1 leave it

July 27, 2018
On Friday, 27 July 2018 at 12:04:18 UTC, Jonathan M Davis wrote:
> On Friday, July 27, 2018 5:03:50 AM MDT Seb via Digitalmars-d wrote:
>> What do you think?
>> ------------------
>>
>> - Has the dmd/druntime split being annoying you too?
>> - Do you have a better suggestion?
>> - Would this break your workflow in a drastic way?
>
> It would break all existing tools and scripts that are used to build the existing repos - many of which are not official tools. So, yes, it would be very annoying.

FWIW I don't think this would be the case. All build scripts I have seen call the Makefile (except for LDC/GDC, of course). The Makefile build would continue to work at any stage.

> That's not necessarily a good enough reason not to do it, but IMHO, it really needs to provide solid benefits to rearrange things like that for it to be worth breaking all of the existing tools that anyone uses for building dmd, druntime, and Phobos.

As mentioned, I don't know of any tool that builds druntime itself. Everyone calls the Makefiles.
If there are tools that build druntime on their own, it would be a very good point yes.

> It also arguably makes no sense in that a lot of what's in druntime has nothing to do with dmd - e.g. all of the OS C bindings are in there. There are also several modules that need to be in druntime, because druntime uses them but don't really have much to do with the compiler (e.g. core.time and core.thread). And not only from a code organizational standpoint does the current separation make a lot of sense for a lot of what's in druntime, but it also matters from the standpoint of who has permissions to do what. Right now, it's reasonable to give privileges to folks to merge PRs for druntime who have no business merging PRs for dmd.

> If the repos are merged, then we're forced to either give some of those folks dmd merge rights or make the smaller pool of folks who have merge rights for dmd deal with those PRs.

This shouldn't be a problem either as GitHub's CODEOWNERS files, are made for this use case and
all we need would be sth. this:

* @team-dmd
src/druntime @team-druntime

https://help.github.com/articles/enabling-required-reviews-for-pull-requests (Step 8)

> Also, given that druntime gets linked into Phobos, having that repo be part of the compiler is that much weirder. In that sense, it belongs more with Phobos than dmd.
>
> The dependencies between the three repos do occasionally cause problems, but overall, I think that the separation makes a lot of sense.

It causes A LOT of problems in terms of maintaining the CI and build scripts,
moving things between DMD and adding test for druntime features to the dmd testsuite.
July 27, 2018
On Friday, 27 July 2018 at 12:02:50 UTC, Russel Winder wrote:
> On Fri, 2018-07-27 at 11:03 +0000, Seb via Digitalmars-d wrote:
>> This a thread to explore whether it would be feasible to do so.
>> 
>> Motivation
>> ----------
>> 
>> DRuntime and DMD heavily depend on each other.
>> 
>
> But DMD is only one of the compilers, there is LDC and GDC. Is Druntime unique to DMD or do the other compilers also use it?

It's unique to the DMD Frontend which is used by LDC/GDC ;-)
They use it with small modifications, e.g. for the LLVM intrinsincs and a few LDC specific features:

https://github.com/ldc-developers/druntime
https://github.com/dlang/druntime/compare/master...ldc-developers:ldc
July 27, 2018
On Friday, 27 July 2018 at 12:04:18 UTC, Jonathan M Davis wrote:
> On Friday, July 27, 2018 5:03:50 AM MDT Seb via Digitalmars-d wrote:
>> What do you think?
>> ------------------
>>
>> - Has the dmd/druntime split being annoying you too?
>> - Do you have a better suggestion?
>> - Would this break your workflow in a drastic way?
>
> It would break all existing tools and scripts that are used to build the existing repos - many of which are not official tools. So, yes, it would be very annoying. That's not necessarily a good enough reason not to do it, but IMHO, it really needs to provide solid benefits to rearrange things like that for it to be worth breaking all of the existing tools that anyone uses for building dmd, druntime, and Phobos.

Not necessarily. The druntime repo could just contain makefiles that forward to the dmd ones.
« First   ‹ Prev
1 2 3