Re: [jgrapht-developers] 0.7.0
Brought to you by:
barak_naveh,
perfecthash
From: John V. S. <js...@gm...> - 2006-03-09 17:19:43
|
Right, I will change the checkin criteria in etc/project-policies.html to be more explicit: it must compile with command-line ant. Regardless of that, Hartmut, thanks for the checkin! Once we get the build fixed I can start on some of the repackaging work that's been planned (including move to org.jgrapht and migration to Subversion). We can keep investigating the generics "warts" in parallel. JVS Christian Hammer wrote: > Hartmut Benz wrote: > >> Hallo, >> >> I have just merged the Generics tree into the HEAD version and create two >> new tags: >> vers_0_6_0_1 Immediately before the Merge >> vers_0_6_1 The merged version. >> >> "Down" to 206 generics-type-cast warnings now: >> - alg (22 - some usage of equivalence classes untouched) >> - experimental (35) >> - ext (11) >> - graph (18 - almost entirely related to the edge factories) >> - traverse (1) >> - util (3) >> - testsrc (116) >> >> This move to generis turned out to be an order of magnitude more work tan >> expected - even with eclipse helping a lot. As a consequence, I merged my >> work back into the main stream and I'll ask *all* developers and >> non-developers to help. >> I am also no longer working with the project using jgrapht and thus >> will be >> quite limited on the time I can spend working on jgrapht in the coming >> months. >> >> The principle problems with the EdgeFactories remain. I have no immediate >> solution to either removing the warnings currently there, or making the >> whole construction with it type safe. Removing the default constructors, >> which set problematic default factories, entirely is a solution, but that >> question is probably better answered by large-scale users of jgrapht. >> Another (drastic) option is to give the current edges the same status as >> vertices, i.e., make them user objects and move the incidence/adjacency >> relation into the graph object itself. This would effectively remove the >> user-visible edge factory altogether. >> >> I am curious to hear opinions of others on this subject. >> >> Greetings and success >> Hartmut >> >> >> > Hi, > > Maybe it's not such a good idea to use Eclipse only. I just checked out > the most recent version an got about 12 errors using Suns java compiler: > > "ConnectivityInspector.java": a type variable may not be followed by > other bounds at line 105, column 35 > "ConnectivityInspector.java": type parameter EE is not within its bound > at line 105, column 79 > "AsUndirectedGraph.java": a type variable may not be followed by other > bounds at line 97, column 39 > "GraphDelegator.java": incompatible types; found : > java.util.List<capture of ? extends capture of ? extends E>, required: > java.util.List<? extends E> at line 203, column 60 > "GraphDelegator.java": incompatible types; found : > java.util.List<capture of ? extends capture of ? extends E>, required: > java.util.List<? extends E> at line 219, column 60 > "AsUndirectedGraph.java": type parameter ED is not within its bound at > line 97, column 78 > ... > > It seems the Eclipse compiler is not as strict as Suns. > > Another point about the compiler warnings: I am not convinced that one > can really eliminate all those because there are definitely some points > in the code where the code itself is not 100% secure. Another problem > seems to be when one would like to cast e.g. a Graph<V,E> to a > DirectedGraph<V,DE> where E extends Edge<V> and DE extends DirEdge<V>. > It seems secure as DirectedGraph is defined as extends Graph<V,DE> but > I'm not sure if and how one can express it such that the type systems > accepts it. > > By the way: there seems to be a solution proposed by Sun how to > integrate Factories into generics. I will do some experiments and send > you the results. > |