Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huge dependency download time and obsolete dependencies #13

Closed
altavir opened this issue Jan 18, 2016 · 9 comments
Closed

Huge dependency download time and obsolete dependencies #13

altavir opened this issue Jan 18, 2016 · 9 comments

Comments

@altavir
Copy link

altavir commented Jan 18, 2016

Dependency download takes a lot of time due to very large number of compile dependencies. Probably, you should make additional dependency uber-jar or exclude some unnecessary dependencies. Also many dependecies are obsolete (for example, groovy 2.2.1).

@larixer
Copy link
Member

larixer commented Jan 18, 2016

Please clarify why do you think there are unnecessary dependencies. Why groovy 2.2.1 is obsolete? Maybe it's not the latest version, but why should it be considered obsolete?

@altavir
Copy link
Author

altavir commented Jan 18, 2016

The problem is that initial dependency download takes 20-30 minutes and some dependencies (jruby, jython) are quite large. The total "weight" of dependencies is more than 50 mb. So for now grain is not portable at all, which is a bit frustrating. Does one realy need jruby and jython to run grain?

As for old dependencies. They are not quite obsolete, but using groovy 2.4.5 and latest gradle distribution could make grain work faster and make integration with external code easier.

@larixer
Copy link
Member

larixer commented Jan 18, 2016

Updating Groovy to 2.4.5 is not a problem a 1 minute task. As for JRuby and Jython... they are kinda optional, Grain is able to use system installed ruby and python if they are available. But if one wants theme code to be portable one needs to support JRuby/Jython, because the user of the theme might not have system-installed ruby and if case theme uses SASS/Compass, then it won't work out.

@larixer
Copy link
Member

larixer commented Jan 18, 2016

The real question is what are your needs. Do you want to embed Grain and dependency size doesn't allow you to do so? Are you going to use tools from Ruby and Python world (SCSS/SASS, pygments highlighting)?

@altavir
Copy link
Author

altavir commented Jan 18, 2016

Ok, got it.
I am using grain as a standalone site generator or as integrated part of java/groovy application, I don't need Ruby or Python at all.

larixer pushed a commit that referenced this issue Jan 18, 2016
@larixer
Copy link
Member

larixer commented Jan 18, 2016

Okay, I have removed some obsolete dependencies and updated to Groovy 2.4.5 in 0.7.0-SNAPSHOT. To use it just set
grain.version = 0.7.0-SNAPSHOT
in application.properties, important to have end of line in this file

Removing dependency on Jython/JRuby and related dependencies needs thinking and discussion. We will discuss and let you know later. Feel free to propose your solution/ideas to the issue of reducing dependency size.

@altavir
Copy link
Author

altavir commented Jan 18, 2016

Ok, thank you very much. Will try it right away.

@larixer
Copy link
Member

larixer commented Jan 18, 2016

Please note, that when you are using Grain you can exclude JRuby and Jython yourself, by using gradle exclude functionality, i.e.:

dependencies {
    compile ("com.sysgears.grain:grain:$project.grainVersion") {
        exclude group: "org.python"
        exclude group: "org.jruby"
    }
    ...
}

@altavir
Copy link
Author

altavir commented Jan 18, 2016

Version 0.7.0 with gradle 2.10 works at least 2 times faster (maybe 3 times). There are still problems with portability, but I'd better open new Issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants