Re: [Codenarc-user] CodeNarc with Groovy 1.8
Brought to you by:
chrismair
From: <chr...@we...> - 2011-05-09 13:00:31
|
>> I just wanted to ask for the timeline to support Groovy 1.8? >> >> Currently CodeNarc 0.13 fails with Groovy 1.8 because some packages have >> been rearranged in Groovy. >> >> Groovy 1.7.10: org/codehaus/groovy/transform/powerassert/ValueRecorder >> Groovy 1.8.0: org/codehaus/groovy/runtime/powerassert/ValueRecorder >> >> Regars, >> René Scheibe > The package rearrangement means that we just need to recompile the > product and re-deploy it. I estimate it would take only a few hours to > fix all the failing tests that 1.8 creates (I've already done the > research). But the bigger problem is that this means two Maven > artefacts: CodeNarc_for_Groovy_1_7 and CodeNarc_for_Groovy_1_8. That's > unfortunate because it is additional complexity in getting up and > running. One possible (but untested) alternative is to remove all > "assert" statements from the CodeNarc codebase. Then the ValueRecorder > incompatibility might never be triggered and we wouldn't need two > different deployments. I'll let Chris weigh in on this issue and see > what he things. > > Hamlet D'Arcy I would be hesitant to remove all of the "assert" statements. Would you replace them with a custom assert-like facility? I hate to bastardize the code like that, but perhaps that would be a worthwhile sacrifice in the name of pragmatism. And having two separate branches and maven artefacts (1.7/1.8) sounds pretty distasteful as well. Of course at some point we will need to support Groovy 1.8. Since CodeNarc runtime environment is not tied to the code that it analyzes (i.e. it can run in 1.7 and analyze 1.8 code), I would be inclined to leave it at 1.7 for the upcoming 0.14 release. Perhaps once there is a "tipping point" to 1.8, we can switch over. That does, however, have implications for environments/tools that are tied to a specific Groovy version of Groovy -- e.g. Grails. So, maybe we decide at that point that it is worth it to support two streams, or maybe we just make a clean break and move to 1.8. Worth some discussion and debate. Thanks. Chris |