Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Extract com.mysema.query.types as module to minimize deps of generated code #103

Closed
h2000 opened this Issue Feb 25, 2012 · 7 comments

Comments

Projects
None yet
2 participants

h2000 commented Feb 25, 2012

At the moment generated code (Q... classes) contains imports to com.mysema.query.types. This package is in querydsl-core module/jar which has a lot of dependencies (see querydsl / querydsl-core / pom.xml).

Now imagine a value module which provides types with @embeddable annotations. It would be good if this simple module could have a minimized set of RUNTIME thirdparty deps e.g. a querdsl-core-types module.

What do you think?

Sincerely, h2000

PS. Thank you very much for your great library!

Owner

timowest commented Feb 25, 2012

This might make sense if the generated query types would primarily be used without Querydsl queries. Is it like that in your case? Could you present your case in more detail?

h2000 commented Feb 25, 2012

Generally I would try to minimize deps where possible (esp. coming from a big osgi project). Try to reverse your view: why should the generated project depended on such "big" jar esp. if the imports in the generated code success otherwise.

We have a relative simple module with embeddable value classes like money (currency+big decimal amount). So why should we add so much third-party deps to the module? It is possible that the user of the module did not want to use the querydsl at all, so the price using our module should be so small as possible.

I think this could be a good starting point to minimize other module deps as well.

Owner

timowest commented Feb 26, 2012

We can't make such a change for a minor release, but this can be considered for 2.4.0 or 2.5.0.

Owner

timowest commented Mar 1, 2012

This issue is related : #106

Owner

timowest commented Mar 1, 2012

In addition to ripping codegen related classes also the alias functionality could be extracted. Then the cglib dependency could be dropped.

Owner

timowest commented May 25, 2012

Querydsl core should be now quite minimal :

Bundle-SymbolicName: com.mysema.querydsl.core
Bundle-Name: Querydsl Core
Bundle-Vendor: Mysema
Bundle-ManifestVersion: 2
Import-Template:
  com.mysema.commons.lang.*;version="${mysema.lang.version}",
  javax.annotation.*;version="0",  
  net.sf.cglib.proxy.*;version="${cglib.version}";resolution:=optional,
  com.google.common.*;version="${guava.version}"

@timowest timowest closed this May 25, 2012

h2000 commented May 29, 2012

Thx, a lot for your great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment