August 07, 2013 Re: Phobos and older DMD versions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On Wednesday, 7 August 2013 at 18:37:22 UTC, Jesse Phillips wrote:
> On Tuesday, 6 August 2013 at 22:23:03 UTC, Andrei Alexandrescu wrote:
>> I think it should be fair to require the new compiler with the new stdlib. They are released in unison.
>>
>> Andrei
>
> I agree, but there is at least potential benefits from choosing previous compiler version. If a change in compiler requires a change in Phobos/druntime it also means a change in user code (at least I don't see why it wouldn't).
>
> It would just be an extra layer to make upgrading from one compiler to another less likely to have unintended breaking changes. But this would be minor in comparison to the other steps which have been taken.
You should be able to run side-by-side installations of dmd+phobos, at least that is how I do it. One latest stable, one built from GitHub source.
|
August 07, 2013 Re: Phobos and older DMD versions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andre Artus | On 2013-08-07 21:13, Andre Artus wrote: > You should be able to run side-by-side installations of dmd+phobos, at > least that is how I do it. One latest stable, one built from GitHub source. DVM is a great way to do that: https://github.com/jacob-carlborg/dvm -- /Jacob Carlborg |
August 08, 2013 Re: Phobos and older DMD versions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andre Artus | On Wednesday, 7 August 2013 at 19:13:13 UTC, Andre Artus wrote:
> You should be able to run side-by-side installations of dmd+phobos, at least that is how I do it. One latest stable, one built from GitHub source.
That isn't related to what I'm trying to describe.
dmd2.063 program.d
dmd2.064-head program.d
If Phobos2.064-head does not compile with dmd2.063, it increases how likely program.d will not compile with the new dmd. This is a very loose relation making its value very minimal.
Another positive of this working is that after updating your code for the new compiler one could keep the updates in the source and switch to the previous release if it doesn't work out.
|
August 10, 2013 Re: Phobos and older DMD versions | ||||
---|---|---|---|---|
| ||||
Posted in reply to qznc | On Tue, Aug 06, 2013 at 04:51:33PM +0200, qznc wrote: > My recent pull request [0] triggered some issue, which should get a bigger discussion: > > Should Phobos version N also compile with DMD N-1? > > In my opinion it should, because it makes Phobos development simpler. You don't need a self compiled dmd to fix bugs. > > However, reality sometimes requires exceptions. I understand that sometimes Phobos uses a feature of dmd HEAD. That is why I said "should", but not "must". ;) [...] The problem is that D is still undergoing rapid development, and often new Phobos additions require the latest compiler features / bugfixes. Jonathan pointed out the use of package.d to help break std.datetime into more manageable pieces. That's an example of a change that couldn't possibly compile with an earlier version of DMD. Other examples include compiler bugfixes that require corresponding changes in druntime/phobos. It's not possible to isolate Phobos from DMD git HEAD in this case, since the changes must be applied to both, otherwise it would result in Phobos being uncompilable / horribly broken. There *are* ways of working around this, of course. We could use static if (__VERSION__ < 2064L) to keep Phobos compilable with dmd 2.063, for example. But it would result in basically maintaining two versions of Phobos within the same code, which deteriorates into the equivalent of C/C++ #ifdef hell pretty quickly. T -- Life is unfair. Ask too much from it, and it may decide you don't deserve what you have now either. |
August 10, 2013 Re: Phobos and older DMD versions | ||||
---|---|---|---|---|
| ||||
Posted in reply to qznc | On Tuesday, August 06, 2013 20:34:24 qznc wrote:
> On Tuesday, 6 August 2013 at 16:02:31 UTC, Jesse Phillips wrote:
> > On Tuesday, 6 August 2013 at 14:51:35 UTC, qznc wrote:
> >> My recent pull request [0] triggered some issue, which should get a bigger discussion:
> >>
> >> Should Phobos version N also compile with DMD N-1?
> >>
> >> In my opinion it should, because it makes Phobos development simpler. You don't need a self compiled dmd to fix bugs.
> >>
> >> However, reality sometimes requires exceptions. I understand that sometimes Phobos uses a feature of dmd HEAD. That is why I said "should", but not "must". ;)
> >>
> >>
> >> [0] https://github.com/D-Programming-Language/phobos/pull/1454/files#r5601514
> >
> > This doesn't sound related to the problem discussed. Phobos N must compile with DMD N, that is a primary requirement. If Phobos N compiles with DMD N-1, great but it can't fail in DMD N.
>
> Correct, Phobos N with DMD N is a "must". The question is, whether Phobos N with DMD N-1 is a "should".
>
> For the pull request, the question is what goes into the guidelines. That should be discussed there, instead of here in the forums. ;)
We're really not worrying about whether Phobos N compiles with DMD N-1. What matters is that the current Phobos compiles with the current dmd. And I really don't see much reason to do otherwise. Phobos is always released together with dmd, so you're never going to be using an older dmd with a newer Phobos unless you're building the yourself and don't keep them in sync. The autotester tests the latest master only, and it would just be extra overhead for little to no gain to make it test against the previous release as well, especially when we do make changes that are not expected to work with the previous release, and I don't expect that to change. It's likely to become less frequent overtime (and is already less frequent than it used to be), but there is no requirement that the current druntime or Phobos compile with the previous release of dmd, and I don't expect that there will ever be such a requirement.
Anyone submitting pull requests to druntime or Phobos should be using the latest dmd, because that's what we're testing. If they happen to be able to get away with using the previous release, that's fine, but we make no guarantee that that will work and are not likely to put forth any effort to make it work.
- Jonathan M Davis
|
August 10, 2013 Re: Phobos and older DMD versions | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarch_dodra | On 8/7/13, monarch_dodra <monarchdodra@gmail.com> wrote:
> It's not just about new features in DMD that phobos wants to use. dmd bugs are fixed for phobos, I'd say, on a twice by week basis (roughly).
Yep. Backwards compatibility would be nice but currently we just can't afford it. But as far as I know isn't this the same for C++? E.g. I don't know whether a newer GCC version necessarily compiles an older C++ stdlib?
|
Copyright © 1999-2021 by the D Language Foundation