Separation
Have you ever thought about splitting up the library code into a separate parser and a core project? Drop the JAS, guava and org.apache.commons.math code - and just use them as dependencies?
Comments (7)
-
repo owner -
Sorry - had to create an account first ...
Well - I really love symja compared to other symbolic math libraries for java. But as an Eclipse-Plugin-Developer working with OSGi-Bundles, I would prefer to have things a bit more tidy.
To get your thing running in our OSGi-World, I took the symja code and made 3 different bundles of it (edu.jas (technically none of your business) , org.matheclipse.core and org.matheclipse.parser). To satisfy the dependencies of the core project/osgi-bundle I simply had to add org.matheclipse.parser, org.apache.commons.math3, com.google.guava and edu.jas.
This worked very well but it started to get a bit awkward as I saw the latest bugfixes in your repo. For me this would mean to do this whole thing allover again. This is why I came up with the idea of tidy up the code base of "the library" to contain just the code of "the library" ...
Why would I have guava, math commons and all the other libraries in symja, only because it depends on these libraries ... There are many other ways of dependency management besides OSGi: Maven or Ivy for example ... All these are better than having the complete Code of guava and commons math in the repo ...
-
repo owner The focus lies on creating a library for Android. So I'm using the ProGuard tool to shrink all the included JARs.
See the Ant build.xml file.
Maybe you can add an ANT task to create your own "reduced" symja core JAR?
See also: 65k method limit in DEX
-
I would also be interested in a seperate symja library which I could add in my (Maven based) project where the external dependencies of symja are shared with my other libaries. Having symya carry its own dependencies along is hard to manage to say the least.
What I think ananz is suggesting is that he did exactly what you suggested but that certain changes in your code base would have him needing to redo all that work, perhaps he can explain exactly what he meant.
-
repo owner If someone likes to maintain the Maven structure, I don't have a problem for integrating it in the project, but for the android proguard build I think I need at least a /lib folder (independent ofthe Maven build) with the necessary JARs inside the project.
Also I don't know how to handle the JAS library with Maven?
In ##edu.jas.kern.ComputerThreads## I'm setting
NO_THREADS = true;
And I delete all "example" classes in JAS before integrating it in Symja.
-
repo owner I've moved the parser to github now as Apache commons-math parser project. The only dependency is the commons-math library.
-
repo owner - changed status to resolved
- Log in to comment
You mean only the parsing part without any dependencies to the math libraries?
Maybe you can sketch which parts should be separated by enumerating the parser package names which should belong together?