View previous topic :: View next topic |
Author |
Message |
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Sun Jun 22, 2008 8:10 pm Post subject: Serializer examples |
|
|
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 |
|
|
aarti_pl
Joined: 25 Jul 2006 Posts: 28
|
Posted: Mon Jun 23, 2008 4:28 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Thu Jun 26, 2008 12:40 pm Post subject: |
|
|
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 |
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 |
|
|
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Thu Jun 26, 2008 1:04 pm Post subject: In the mean time... |
|
|
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 |
|
|
aarti_pl
Joined: 25 Jul 2006 Posts: 28
|
Posted: Thu Jun 26, 2008 2:34 pm Post subject: |
|
|
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 |
|
|
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Thu Jun 26, 2008 2:38 pm Post subject: |
|
|
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 |
|
|
|