Task: Document CompileStatic support in GSPs
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
There is CompileStatic support in the code base, but it hasn't been documented.
The features have been tested in this test class:
https://github.com/grails/grails-gsp/blob/master/grails-gsp/src/test/groovy/org/grails/gsp/GspCompileStaticSpec.groovy
Features
- defining types for model attributes. this turns on CompileStatic mode for GSPs implicitly.
- model attributes can have default values
- possibility to turn off CompileStatic mode while keeping model type definitions
- tag library prefixes have to be defined with `taglibs` when it's not `g' or `tmpl`
- [`grails.views.gsp.compileStaticConfig.taglibs` config property for default](https://github.com/grails/grails-gsp/blob/master/grails-gsp/src/main/groovy/org/grails/gsp/compiler/GroovyPageParser.java#L258).
Contributor guide
Research direction
Start by reading the behavior covered in grails-gsp/src/test/groovy/org/grails/gsp/GspCompileStaticSpec.groovy and the compileStaticConfig.taglibs reference in GroovyPageParser.java. Document the listed CompileStatic features, including typed model attributes, defaults, disabling CompileStatic, and taglib prefixes, in the appropriate GSP documentation location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100