Clojure-Contrib

pprint depends on order of compilation

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

pprint causes problems with the build process:

1. c.c.pprint.ColumnWriter
2. c.c.pprint.PrettyWriter
3. c.c.pprint

The first two are gen-class'd, and PrettyWriter extends the class
generated for ColumnWriter.

Unless they are compiled in exactly the order given above, the build
fails with a ClassNotFoundException.

Activity

Hide
Assembla Importer added a comment -

stu said: Updating tickets (#2, #3, #33, #38, #51, #52, #65, #67, #70)

Show
Assembla Importer added a comment - stu said: Updating tickets (#2, #3, #33, #38, #51, #52, #65, #67, #70)
Hide
Assembla Importer added a comment -

stuart.sierra said: Tried it. Didn't work.

Show
Assembla Importer added a comment - stuart.sierra said: Tried it. Didn't work.
Hide
Assembla Importer added a comment -

cemerick said: I mentioned this elsewhere, but perhaps there's a reason why this isn't workable in this case: I believe if you require clojure.contrib.pprint.ColumnWriter in PrettyWriter's ns declaration (perhaps before the :gen-class form?), then the compiler will visit and gen CW before attempting to gen-class PW.

This would eliminate the need to explicitly specify which namespaces to compile.

Show
Assembla Importer added a comment - cemerick said: I mentioned this elsewhere, but perhaps there's a reason why this isn't workable in this case: I believe if you require clojure.contrib.pprint.ColumnWriter in PrettyWriter's ns declaration (perhaps before the :gen-class form?), then the compiler will visit and gen CW before attempting to gen-class PW. This would eliminate the need to explicitly specify which namespaces to compile.
Hide
Assembla Importer added a comment -

stuart.sierra said: It's not that bad. The Ant build script was messier. This is more flexible, because it only AOT-compiles things that need it, i.e. gen-class.

Show
Assembla Importer added a comment - stuart.sierra said: It's not that bad. The Ant build script was messier. This is more flexible, because it only AOT-compiles things that need it, i.e. gen-class.
Hide
Assembla Importer added a comment -

tomfaulhaber said: What a mess! This seems like a big problem with gen-class if we have to jump through this many hoops to make it work once we have more than one class in a hierarchy.

Of course it worked fine back in ant-land where we had control over the compilation order.

Show
Assembla Importer added a comment - tomfaulhaber said: What a mess! This seems like a big problem with gen-class if we have to jump through this many hoops to make it work once we have more than one class in a hierarchy. Of course it worked fine back in ant-land where we had control over the compilation order.
Hide
Assembla Importer added a comment -

stuart.sierra said: I think I have fixed this by placing the gen-class directives in a separate file; only that file will be AOT-compiled.

Show
Assembla Importer added a comment - stuart.sierra said: I think I have fixed this by placing the gen-class directives in a separate file; only that file will be AOT-compiled.
Hide
Assembla Importer added a comment -

stuart.sierra said: (In revision:aa34fb9e52fa500c99bb45448bdfcd4020db5392) Reenable compiling of test namespaces in POM; refs #65

But disable tests of pprint, which fail currently

Branch: master

Show
Assembla Importer added a comment - stuart.sierra said: (In revision:aa34fb9e52fa500c99bb45448bdfcd4020db5392) Reenable compiling of test namespaces in POM; refs #65 But disable tests of pprint, which fail currently Branch: master
Hide
Assembla Importer added a comment -

stuart.sierra said: (In revision:3275810556b075ff9a3a0abc0d08b3a19ee46bae) pprint: Move gen-class expressions to separate file; refs #65

To avoid order-of-compilation issues,
this patch puts the gen-class expressions
for ColumnWriter and PrettyWriter in a
separate file, rather than in the ns
declarations.

Branch: master

Show
Assembla Importer added a comment - stuart.sierra said: (In revision:3275810556b075ff9a3a0abc0d08b3a19ee46bae) pprint: Move gen-class expressions to separate file; refs #65 To avoid order-of-compilation issues, this patch puts the gen-class expressions for ColumnWriter and PrettyWriter in a separate file, rather than in the ns declarations. Branch: master
Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/65

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: