FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Serializer examples

 
Post new topic   Reply to topic     Forum Index -> Doost
View previous topic :: View next topic  
Author Message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Sun Jun 22, 2008 8:10 pm    Post subject: Serializer examples Reply with quote

I am unable to compile the serialzer examples as they are in SVN.

I get these errors:
Code:

dsss_objs\D\doost-util-serializer-Serializer.obj(doost-util-serializer-Serializer)
 Error 42: Symbol Undefined _D5doost4text7Escaper7__arrayZ
dsss_objs\D\doost-util-serializer-Serializer.obj(doost-util-serializer-Serializer)
 Error 42: Symbol Undefined _D5doost4text7Escaper5toDecFwZk
dsss_objs\D\doost-util-serializer-Serializer.obj(doost-util-serializer-Serializer)
 Error 42: Symbol Undefined _D5doost4text7Escaper7maxsizeAk
dsss_objs\D\doost-util-serializer-Serializer.obj(doost-util-serializer-Serializer)
 Error 42: Symbol Undefined _D5doost4text7Escaper17UnescapeException7__ClassZ
dsss_objs\D\doost-util-serializer-Serializer.obj(doost-util-serializer-Serializer)
 Error 42: Symbol Undefined _D5doost4text7Escaper17UnescapeException5_ctorMFAaZC5doost4text7Escaper17UnescapeException
--- errorlevel 5
Error: Command failed, aborting.
Command f:\usr\pkg\d\dsss\bin\rebuild.exe returned with code -1, aborting.


However, it works if I add
Code:

import doost.text.Escaper;

to the examples.
Back to top
View user's profile Send private message
aarti_pl



Joined: 25 Jul 2006
Posts: 28

PostPosted: Mon Jun 23, 2008 4:28 pm    Post subject: Reply with quote

Hmm. Interesting. Escaper should not be necessary on this level. Maybe it is bug in dsss?

I will investigate a bit more tomorrow. Today I am too sleepy Smile
Back to top
View user's profile Send private message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Thu Jun 26, 2008 12:40 pm    Post subject: Reply with quote

aarti_pl wrote:
Hmm. Interesting. Escaper should not be necessary on this level. Maybe it is bug in dsss?

I will investigate a bit more tomorrow. Today I am too sleepy Smile


Filed a bug with DSSS:
http://www.dsource.org/projects/dsss/ticket/193

But as you'll see there, I think you may be relying on undocumented behavior.

From here: http://www.digitalmars.com/d/1.0/class.html
Code:

ClassBodyDeclaration:
   Declaration
   Constructor
   Destructor
   StaticConstructor
   StaticDestructor
   Invariant
   UnitTest
   ClassAllocator
   ClassDeallocator


Declaration looks like it might cover imports, but...
From here: http://www.digitalmars.com/d/1.0/declaration.html
Code:

Declaration:
        typedef Decl
        alias Decl
        Decl


So Decl maybe?
Code:

Decl:
        StorageClasses Decl
        BasicType Declarators ;
        BasicType Declarator FunctionBody
   AutoDeclaration


Nope, no ImportDeclaration there.

So as far as I can tell, the spec says you can't put imports inside a class, despite the fact that it does work on current DMDFE compilers.

I submitted a bug asking for clarification of this to D's bugzilla:
http://d.puremagic.com/issues/show_bug.cgi?id=2179
Back to top
View user's profile Send private message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Thu Jun 26, 2008 1:04 pm    Post subject: In the mean time... Reply with quote

It could take a while to get the DSSS/spec issues sorted out. Both getting a ruling from Walter on whether it should be legal or not, and if legal, there's no telling how long it will be till a new version of DSSS appears. Probably the next version of DSSS will use dmd's -v flag directly, in which case the issue will go away.

But in the mean time ... DSSS is perhaps the biggest player in the D build tools market right now, so having doost needs to work well with it.

The simplest fix would be to duplicate the imports that are in those mixins also at the module scope. Or at least do so with the ones that turn out to be problematic, like Escaper. Those could also be put in a version(build) block as well, so that only BUD and DSSS see them. But I don't see much point in that.

Let me know if this is ok with you and I will add the needed imports to build with dsss as I go along.
Back to top
View user's profile Send private message
aarti_pl



Joined: 25 Jul 2006
Posts: 28

PostPosted: Thu Jun 26, 2008 2:34 pm    Post subject: Reply with quote

Yes, that's ok for me. Just add a short comment that it is workaround for dsss/bud. And bug number for reference. Thanks!
Back to top
View user's profile Send private message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Thu Jun 26, 2008 2:38 pm    Post subject: Reply with quote

aarti_pl wrote:
Yes, that's ok for me. Just add a short comment that it is workaround for dsss/bud. And bug number for reference. Thanks!


Ok. Done.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Doost All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group