The Grails compiler continues to run over and over, possibly due to a syntax error

I have this problem several times: sometimes when I command: grails run-app, the compiler works again and again, although after that I do not change anything. It looks like this:

Running Grails application..
Server running. Browse to http://localhost:8080/LiningTest
  [groovyc] Compiling 1 source file to E:\workspace\W1\LiningTest\target\classes

  [groovyc] Compiling 2 source files to E:\workspace\W1\LiningTest\target\classe
s
   [delete] Deleting directory C:\Documents and Settings\Long\.grails\1.3.6\proj
ects\LiningTest\tomcat
Running Grails application..
Server running. Browse to http://localhost:8080/LiningTest
  [groovyc] Compiling 1 source file to E:\workspace\W1\LiningTest\target\classes

  [groovyc] Compiling 2 source files to E:\workspace\W1\LiningTest\target\classe
s
   [delete] Deleting directory C:\Documents and Settings\Long\.grails\1.3.6\proj
ects\LiningTest\tomcat
Running Grails application..
Server running. Browse to http://localhost:8080/LiningTest
  [groovyc] Compiling 1 source file to E:\workspace\W1\LiningTest\target\classes
...

The compiler succeeded when “Server is running”, but then it will automatically recompile some files (I don’t know which file), and run it again and then recompile again ...

I met this problem once when I have a syntax error

constraint {
number(min:0.50) // the right way is "min: 0..50"
}

The question is why this problem arose, and how can I find the cause of the problem. (I think I missed some kind of comma / dot somewhere, but now it's hard to find because there is no error message there!)

UPDATE. , , src/ groovy.

+3
3

.

groovy src/groovy, com.acme.foobar.

- , Grails ( ) - - , , .

, src/groovy/com/acme/foobar, .

grails compile -verboseCompile . , , :

grails compile :

, , , .

- :

Running script /Users/ug/Software/grails/scripts/Compile.groovy
Environment set to development

- .

+1

, Grails, :

- src/ groovy/warm.groovy. warm.groovy "liningtest". , "" "src/groovy/liningtest/warm.groovy".

:

- , src/ groovy, , .

This is really weird behavior because it doesn't report any errors, just repeat the compilation again and again ... And for the weirdest part that works for me for the first time!

0
source

Source: https://habr.com/ru/post/1781773/


All Articles