Manually compile cfc/cfm files to check for errors

202 views
Skip to first unread message

Jonathan Brookins

unread,
Feb 4, 2015, 11:15:02 AM2/4/15
to lu...@googlegroups.com
We've recently converted some of our legacy CF code ( probably around 10 years old or older in places ) to Railo, but I wish there was a way I could run a manual compile in order to find syntax errors that might have been introduced.  I read an old Railo group thread about it, but trying this
GetPageContext().compile(page)
 on a test page that has an error doesn't seem to fail.  I think Micha referred to a cfdeploy that might help, but I cannot find any documentation on it.

Any ideas?

Mark Drew

unread,
Feb 4, 2015, 11:27:08 AM2/4/15
to lu...@googlegroups.com
Yep! Totally! 

Go to the Lucee admin and create a mapping to the root of your application 

something like 
Virtual = /
Resource =  ~/Sites/myapp/

Save it, click on the editor (pencil) icon next to the mapping entry and you can see a page where you can now untick the "Stop on error” and press the “Compile|” button. This will now give you a list of errors in compilation with your code. 

This is how I checked applications for general compatibility when I worked at Railo

HTH

MD 


--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/3f1b2ef0-9fbf-480a-9c53-d30caf8a252b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Quackenbush

unread,
Feb 4, 2015, 11:30:40 AM2/4/15
to lu...@googlegroups.com
Great tip, Mark!

Jonathan Brookins

unread,
Feb 4, 2015, 11:52:51 AM2/4/15
to lu...@googlegroups.com
Very nice, Mark!  Thanks!

Michael Offner

unread,
Feb 4, 2015, 1:39:17 PM2/4/15
to lucee
That need to go into tip and trick section in the wiki ;-)

Micha

Geoff Parkhurst

unread,
Feb 4, 2015, 2:20:18 PM2/4/15
to lu...@googlegroups.com
Has anyone managed to get that plumbed into Jenkins or similar? Would
be nice to get that step into a CI process somehow...
> https://groups.google.com/d/msgid/lucee/CAG%2BEEBxKXF5SULD%2BH3Av7dqtf1aKzRd-Y5uMQojOjE%2BKEoZbrw%40mail.gmail.com.

Mark Drew

unread,
Feb 4, 2015, 2:30:15 PM2/4/15
to lu...@googlegroups.com
I did a ANT task runner for railo CLI a long while back and was able to run railo as an ant task so you could just point it to a script that runs the <cfadmin> tag.

Regards

Mark Drew
> To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAC0HRKn7WY4di_VYEeFx%3DefEeML0U%2BquAroMvo4KOjoy6uBzjA%40mail.gmail.com.

Adam Cameron

unread,
Feb 4, 2015, 2:36:02 PM2/4/15
to lu...@googlegroups.com



>runs the <cfadmin> tag.

You're just saying that to wind me up, now, aren't you ;-)

--
Adam

denstar

unread,
Feb 4, 2015, 2:47:42 PM2/4/15
to lucee
Yep, we've got an ant macrodef for compiling Lucee archives (fails with any errors).  The whole process is scripted so you son't need a running server first.  There will be a lucee-cli, installable via apt-get or yum sometime next week too, so best of both worlds. :)

-Den

Reply all
Reply to author
Forward
0 new messages