Re: Dub dependency conflict resolution

2018-10-06 Thread Venkat via Digitalmars-d-learn
On Sunday, 7 October 2018 at 05:24:37 UTC, Bauss wrote: On Saturday, 6 October 2018 at 17:50:57 UTC, Venkat wrote: I couldn't find any documentation on how dub resolves dependency conflicts. Here is my situation. Package A has a dependency on package B-1.0.0 which has a dependency on

Re: Dub dependency conflict resolution

2018-10-06 Thread Bauss via Digitalmars-d-learn
On Saturday, 6 October 2018 at 17:50:57 UTC, Venkat wrote: I couldn't find any documentation on how dub resolves dependency conflicts. Here is my situation. Package A has a dependency on package B-1.0.0 which has a dependency on package C-1.0.0. Package A declares a dependency on package

Re: Is there a function for this?

2018-10-06 Thread Ali Çehreli via Digitalmars-d-learn
On 10/06/2018 01:07 PM, bauss wrote: > uniq will not work with, say a class and the class will require you to > implement opCmp, which you can't always do for classes you don't have > access to. Remembering that uniq works with a custom predicate, which should be sufficient in most of those

Re: Is there a function for this?

2018-10-06 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Oct 06, 2018 at 08:07:42PM +, bauss via Digitalmars-d-learn wrote: [...] > The whole problem is actually that they do not work with ranges that > aren't sorted. Things like .group and .uniq should work without sorted > ranges. You can't always expect a range to be sorted to perform

Re: Is there a function for this?

2018-10-06 Thread bauss via Digitalmars-d-learn
On Saturday, 6 October 2018 at 15:35:39 UTC, Basile B wrote: On Saturday, 6 October 2018 at 13:56:32 UTC, bauss wrote: On Saturday, 6 October 2018 at 13:35:38 UTC, Basile B wrote: On Saturday, 6 October 2018 at 13:17:22 UTC, bauss wrote: Let's say you have a range with struct, but some of the

Dub dependency conflict resolution

2018-10-06 Thread Venkat via Digitalmars-d-learn
I couldn't find any documentation on how dub resolves dependency conflicts. Here is my situation. Package A has a dependency on package B-1.0.0 which has a dependency on package C-1.0.0. Package A declares a dependency on package C-1.0.1 How does dub behave in this situation. From what

Re: Is there a function for this?

2018-10-06 Thread Basile B via Digitalmars-d-learn
On Saturday, 6 October 2018 at 13:56:32 UTC, bauss wrote: On Saturday, 6 October 2018 at 13:35:38 UTC, Basile B wrote: On Saturday, 6 October 2018 at 13:17:22 UTC, bauss wrote: Let's say you have a range with struct, but some of the struct are duplicates of each other. Is there a standard

Re: Is there a function for this?

2018-10-06 Thread Seb via Digitalmars-d-learn
On Saturday, 6 October 2018 at 13:56:32 UTC, bauss wrote: On Saturday, 6 October 2018 at 13:35:38 UTC, Basile B wrote: On Saturday, 6 October 2018 at 13:17:22 UTC, bauss wrote: [...] see https://www.programming-idioms.org/idiom/119/deduplicate-list. Did you even read my post? I stated I

Re: Is there a function for this?

2018-10-06 Thread bauss via Digitalmars-d-learn
On Saturday, 6 October 2018 at 13:34:44 UTC, Adam D. Ruppe wrote: On Saturday, 6 October 2018 at 13:17:22 UTC, bauss wrote: My first thought was "uniq", but it can't really do it like that, but it doesn't work. uniq needs it to be sorted first, it only compares side-by-side (to avoid

Re: Is there a function for this?

2018-10-06 Thread bauss via Digitalmars-d-learn
On Saturday, 6 October 2018 at 13:35:38 UTC, Basile B wrote: On Saturday, 6 October 2018 at 13:17:22 UTC, bauss wrote: Let's say you have a range with struct, but some of the struct are duplicates of each other. Is there a standard function in Phobos to remove duplicates? My first thought

Re: Is there a function for this?

2018-10-06 Thread Basile B via Digitalmars-d-learn
On Saturday, 6 October 2018 at 13:17:22 UTC, bauss wrote: Let's say you have a range with struct, but some of the struct are duplicates of each other. Is there a standard function in Phobos to remove duplicates? My first thought was "uniq", but it can't really do it like that, but it doesn't

Re: Is there a function for this?

2018-10-06 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 6 October 2018 at 13:17:22 UTC, bauss wrote: My first thought was "uniq", but it can't really do it like that, but it doesn't work. uniq needs it to be sorted first, it only compares side-by-side (to avoid allocating space to remember what it has already seen) Is there another

Re: Is there a function for this?

2018-10-06 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 6 October 2018 at 13:17:22 UTC, bauss wrote: Let's say you have a range with struct, but some of the struct are duplicates of each other. Is there a standard function in Phobos to remove duplicates? My first thought was "uniq", but it can't really do it like that, but it doesn't

Is there a function for this?

2018-10-06 Thread bauss via Digitalmars-d-learn
Let's say you have a range with struct, but some of the struct are duplicates of each other. Is there a standard function in Phobos to remove duplicates? My first thought was "uniq", but it can't really do it like that, but it doesn't work. See: https://run.dlang.io/is/IcFEtw Is there