Thread overview
Orange not working?
Jul 12, 2018
JN
Jul 13, 2018
Timoses
Jul 13, 2018
JN
Jul 13, 2018
Timoses
Jul 13, 2018
Jacob Carlborg
Jul 13, 2018
Jacob Carlborg
Jul 13, 2018
Jacob Carlborg
Jul 13, 2018
JN
Jul 14, 2018
Timoses
Jul 15, 2018
Jacob Carlborg
July 12, 2018
I am trying to make use of the Orange package, I added the latest version from dub to my project: "orange": "~>1.0.0" and copy pasted the "simple usage" code from https://github.com/jacob-carlborg/orange , but I am getting a long list of errors:

..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(714,21): Error: undefined identifier typedef
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(714,21): Error: undefined identifier typedef
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(925,42): Error: template instance `orange.serialization.Serializer.Serializer.serializeInternal!int` error instantiating
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(1543,37):        instantiated from here: serializePointer!(int*)
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(799,56):        instantiated from here: objectStructSerializeHelper!(Foo)
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(718,28):        instantiated from here: serializeObject!(Foo)
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(665,26):        instantiated from here: serializeInternal!(Foo)
source\app.d(19,22):        instantiated from here: serialize!(Foo)
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\util\Traits.d(135,27): Error: undefined identifier typedef
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(1121,20): Error: template instance `orange.util.Traits.isTypedef!(Foo)` error instantiating
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(1114,44):        instantiated from here: deserializeInternal!(Foo, string)
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(995,45):        instantiated from here: deserializeInternal!(Foo, string)
source\app.d(22,39):        instantiated from here: deserialize!(Foo)
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\util\Traits.d(135,27): Error: undefined identifier typedef
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(1121,20): Error: template instance `orange.util.Traits.isTypedef!int` error instantiating
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(1616,63):        instantiated from here: deserializeInternal!(int, string)
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(1220,58):        instantiated from here: objectStructDeserializeHelper!(Foo)
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(1125,41):        instantiated from here: deserializeObject!(Foo, string)
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(1114,44):        ... (1 instantiations, -v to show) ...
..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(995,45):        instantiated from here: deserializeInternal!(Foo, string)
source\app.d(22,39):        instantiated from here: deserialize!(Foo)
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

Anyone has the library working?

my DMD version is:

>dmd --version
DMD32 D Compiler v2.080.0

Copyright (C) 1999-2018 by The D Language Foundation, All Rights Reserved written by Walter Bright

July 13, 2018
On Thursday, 12 July 2018 at 20:44:43 UTC, JN wrote:
> I am trying to make use of the Orange package, I added the latest version from dub to my project: "orange": "~>1.0.0" and copy pasted the "simple usage" code from https://github.com/jacob-carlborg/orange , but I am getting a long list of errors:
>
> ..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(714,21): Error: undefined identifier typedef
> [...]

Hm, v1.0.0 is from 2016 and meanwhile typedef was deprecated
https://dlang.org/deprecate.html#typedef .

Perhaps use

"orange": "~master"

to use the latest code.
July 13, 2018
On Friday, 13 July 2018 at 05:29:58 UTC, Timoses wrote:
> On Thursday, 12 July 2018 at 20:44:43 UTC, JN wrote:
>> I am trying to make use of the Orange package, I added the latest version from dub to my project: "orange": "~>1.0.0" and copy pasted the "simple usage" code from https://github.com/jacob-carlborg/orange , but I am getting a long list of errors:
>>
>> ..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(714,21): Error: undefined identifier typedef
>> [...]
>
> Hm, v1.0.0 is from 2016 and meanwhile typedef was deprecated
> https://dlang.org/deprecate.html#typedef .
>
> Perhaps use
>
> "orange": "~master"
>
> to use the latest code.

Looks better, but still doesn't compile:

C:\Users\jacek\Desktop\test_orange>dub run
Package orange can be upgraded from ~master to 1.0.0.
Use "dub upgrade" to perform those changes.
WARNING: A deprecated branch based version specification is used for the dependency orange. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead.
Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86.
orange ~master: target for configuration "" is up to date.
test_orange ~master: building configuration "application"...
..\sertest\orange-master\orange\serialization\archives\Archive.d(1313,9): Warning: statement is not reachable
..\sertest\orange-master\orange\serialization\archives\Archive.d(1313,9): Warning: statement is not reachable
..\sertest\orange-master\orange\serialization\archives\Archive.d(1313,9): Warning: statement is not reachable
..\sertest\orange-master\orange\serialization\archives\Archive.d(1313,9): Warning: statement is not reachable
..\sertest\orange-master\orange\serialization\archives\Archive.d(1313,9): Warning: statement is not reachable
..\sertest\orange-master\orange\serialization\archives\Archive.d(1313,9): Warning: statement is not reachable
..\sertest\orange-master\orange\serialization\archives\Archive.d(1313,9): Warning: statement is not reachable
..\sertest\orange-master\orange\serialization\archives\Archive.d(1313,9): Warning: statement is not reachable
..\sertest\orange-master\orange\serialization\archives\Archive.d(1313,9): Warning: statement is not reachable
..\sertest\orange-master\orange\serialization\archives\Archive.d(1313,9): Warning: statement is not reachable
..\sertest\orange-master\orange\serialization\archives\Archive.d(1348,9): Warning: statement is not reachable
..\sertest\orange-master\orange\serialization\Serializer.d(1215,9): Warning: statement is not reachable
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.
July 13, 2018
On Friday, 13 July 2018 at 05:39:24 UTC, JN wrote:
> On Friday, 13 July 2018 at 05:29:58 UTC, Timoses wrote:
>> On Thursday, 12 July 2018 at 20:44:43 UTC, JN wrote:
>>> I am trying to make use of the Orange package, I added the latest version from dub to my project: "orange": "~>1.0.0" and copy pasted the "simple usage" code from https://github.com/jacob-carlborg/orange , but I am getting a long list of errors:
>>>
>>> ..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(714,21): Error: undefined identifier typedef
>>> [...]
>>
>> Hm, v1.0.0 is from 2016 and meanwhile typedef was deprecated
>> https://dlang.org/deprecate.html#typedef .
>>
>> Perhaps use
>>
>> "orange": "~master"
>>
>> to use the latest code.
>
> Looks better, but still doesn't compile:
>
> C:\Users\jacek\Desktop\test_orange>dub run
> [...]
> test_orange ~master: building configuration "application"...
> ..\sertest\orange-master\orange\serialization\archives\Archive.d(1313,9): Warning: statement is not reachable
> [...]
> ..\sertest\orange-master\orange\serialization\Serializer.d(1215,9): Warning: statement is not reachable
> C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

Huh, see this issue on github:
https://github.com/jacob-carlborg/orange/issues/39

which references to https://github.com/jacob-carlborg/mambo . Although that repository has last been updated in 2016 whereas Orange's was Oct. 2017.

Went ahead and applied a few fixes for the warnings I encountered:
https://github.com/jacob-carlborg/orange/pull/50
July 13, 2018
On 2018-07-12 22:44, JN wrote:
> I am trying to make use of the Orange package, I added the latest version from dub to my project: "orange": "~>1.0.0" and copy pasted the "simple usage" code from https://github.com/jacob-carlborg/orange , but I am getting a long list of errors:
> 
> ..\..\AppData\Local\dub\packages\orange-1.0.0\orange\orange\serialization\Serializer.d(714,21): C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.
> 
> Anyone has the library working?
> 
> my DMD version is:

Orange master is working properly. The tests are run on each push and PR with the latest DMD compiler. I pushed a new tag, v2.0.0, to make sure you can use a specific version as well. I picked a new major version because typedefs are not supported anymore.

-- 
/Jacob Carlborg
July 13, 2018
On 2018-07-13 14:59, Timoses wrote:

> Huh, see this issue on github:
> https://github.com/jacob-carlborg/orange/issues/39
> 
> which references to https://github.com/jacob-carlborg/mambo . Although that repository has last been updated in 2016 whereas Orange's was Oct. 2017.

Yeah, Mambo was a dependency before but now it's not used anymore. See the readme for more details [1].

> Went ahead and applied a few fixes for the warnings I encountered:
> https://github.com/jacob-carlborg/orange/pull/50

Thanks for that.

[1] https://github.com/jacob-carlborg/orange#d-versions

-- 
/Jacob Carlborg
July 13, 2018
On 2018-07-13 20:52, Jacob Carlborg wrote:

> Orange master is working properly. The tests are run on each push and PR with the latest DMD compiler.

I just added a cron job in Travis CI as well to make sure it every month even though there hasn't been a commit. This will make sure it always works with the latest compiler.

-- 
/Jacob Carlborg
July 13, 2018
On Friday, 13 July 2018 at 19:03:32 UTC, Jacob Carlborg wrote:
> On 2018-07-13 20:52, Jacob Carlborg wrote:
>
>> Orange master is working properly. The tests are run on each push and PR with the latest DMD compiler.
>
> I just added a cron job in Travis CI as well to make sure it every month even though there hasn't been a commit. This will make sure it always works with the latest compiler.

I'm curious, are the tests in any way OS specific? I see the tests are passing, but trying the latest DMD on Windows and orange v2.0.0, when I add "@nonSerialized" to a struct member, I get this:

C:\Users\jacek\Desktop\test_orange>dub run
Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86.
orange 2.0.0: target for configuration "" is up to date.
test_orange ~master: building configuration "application"...
..\..\AppData\Local\dub\packages\orange-2.0.0\orange\orange\serialization\Serializer.d(1504,13): Warning: statement is not reachable
..\..\AppData\Local\dub\packages\orange-2.0.0\orange\orange\serialization\Serializer.d(1510,17): Warning: statement is not reachable
..\..\AppData\Local\dub\packages\orange-2.0.0\orange\orange\serialization\Serializer.d(1512,13): Warning: statement is not reachable
..\..\AppData\Local\dub\packages\orange-2.0.0\orange\orange\serialization\Serializer.d(1514,13): Warning: statement is not reachable
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.
July 14, 2018
On Friday, 13 July 2018 at 21:38:18 UTC, JN wrote:
>
> I'm curious, are the tests in any way OS specific? I see the tests are passing, but trying the latest DMD on Windows and orange v2.0.0, when I add "@nonSerialized" to a struct member, I get this:
>
> C:\Users\jacek\Desktop\test_orange>dub run
> Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86.
> orange 2.0.0: target for configuration "" is up to date.
> test_orange ~master: building configuration "application"...
> ..\..\AppData\Local\dub\packages\orange-2.0.0\orange\orange\serialization\Serializer.d(1504,13): Warning: statement is not reachable
> ..\..\AppData\Local\dub\packages\orange-2.0.0\orange\orange\serialization\Serializer.d(1510,17): Warning: statement is not reachable
> ..\..\AppData\Local\dub\packages\orange-2.0.0\orange\orange\serialization\Serializer.d(1512,13): Warning: statement is not reachable
> ..\..\AppData\Local\dub\packages\orange-2.0.0\orange\orange\serialization\Serializer.d(1514,13): Warning: statement is not reachable
> C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

Wasn't aware of the `buildRequirements "silenceWarnings"` switch in dub.sdl.

Now there should hopefully be no more warnings with below PR.

https://github.com/jacob-carlborg/orange/pull/51

Could perhaps bump it to 2.0.1 ? @Jacob
July 15, 2018
On 2018-07-14 08:48, Timoses wrote:

> Could perhaps bump it to 2.0.1 ? @Jacob

Done.

-- 
/Jacob Carlborg