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

[WIP] Limit number of header lines #516

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

OndraZizka
Copy link
Contributor

@OndraZizka OndraZizka commented Aug 1, 2018

Without any limit, JBake may encounter files that are very long, and try parsing them as text, looking for a header for the whole size of the file.

Looking for a header should be stopped after certain amount of lines and bytes.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 80.149% when pulling 3dd2448 on OndraZizka:oz09-limitHeaderLines into a402b14 on jbake-org:master.

@coveralls
Copy link

coveralls commented Aug 1, 2018

Coverage Status

Coverage decreased (-1.05%) to 79.73% when pulling 462023f on OndraZizka:oz09-limitHeaderLines into 058d403 on jbake-org:master.

@OndraZizka OndraZizka changed the title Oz09 limit header lines Limit header lines Aug 7, 2018
@OndraZizka OndraZizka changed the title Limit header lines Limit number of header lines Aug 7, 2018
…lank lines, test against a regex; do not require status and type if defaults are set.
@OndraZizka
Copy link
Contributor Author

Rebased, not ready - need to compare with the current hasHeader().

@OndraZizka OndraZizka changed the title Limit number of header lines [WIP] Limit number of header lines Oct 26, 2018
@OndraZizka
Copy link
Contributor Author

OndraZizka commented Oct 26, 2018

Getting this, does it ring a bell?

groovy.lang.MissingPropertyException: No such property: implicitThis for class: org.codehaus.groovy.ast.expr.StaticMethodCallExpression
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:67)
at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:65)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:298)

Looks like it runs with Groovy 2.4 for some reason.

@ancho
Copy link
Member

ancho commented Oct 26, 2018

Yes it does....https://issues.apache.org/jira/browse/GROOVY-8844

Are you really sure it uses groovy 2.4? How do you come to this conclusion?
You can check dependencies with ./gradlew :jbake-core:dependencies and ./gradlew :jbake-dist:dependencies

When does the error occur? While running test or smokeTest? I got that error in the smokeTests and fixed the template of the groovy-mte example project. Try ./gradlew clean and run again.

@OndraZizka
Copy link
Contributor Author

No I'm not sure about Groovy 2.4, I deduced from the error which looks like there's a property missing that is new in 2.5. Occurs during a build. Graddle jar IIRC. Will try again later this week.

@OndraZizka
Copy link
Contributor Author

Looks like it was resolve by the clean.
The issue remains with the PMD strictness...

@jonbullock
Copy link
Member

@OndraZizka is this PR still WIP?

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

Successfully merging this pull request may close these issues.

None yet

4 participants