Manually compile cfc/cfm files to check for errors

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?

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> On 4 Feb 2015, at 16:15, Jonathan Brookins <@Jonathan_Brookins> wrote:

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?


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+unsubscribe@googlegroups.com mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com mailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/3f1b2ef0-9fbf-480a-9c53-d30caf8a252b%40googlegroups.com https://groups.google.com/d/msgid/lucee/3f1b2ef0-9fbf-480a-9c53-d30caf8a252b%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

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 tag.

Regards

Mark Drew> On 4 Feb 2015, at 19:20, Geoff Parkhurst <@Geoff_Parkhurst> wrote:

Has anyone managed to get that plumbed into Jenkins or similar? Would
be nice to get that step into a CI process somehow…

On 4 February 2015 at 18:39, Michael Offner <@Michael_Offner> wrote:

That need to go into tip and trick section in the wiki :wink:

Micha

On Wed, Feb 4, 2015 at 5:27 PM, Mark Drew <@Mark_Drew> wrote:

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

On 4 Feb 2015, at 16:15, Jonathan Brookins <@Jonathan_Brookins> wrote:

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?


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@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.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/F25049D7-4FD3-41D5-9FF8-B3C4CBA94950%40gmail.com.

For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG%2BEEBxKXF5SULD%2BH3Av7dqtf1aKzRd-Y5uMQojOjE%2BKEoZbrw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAC0HRKn7WY4di_VYEeFx%3DefEeML0U%2BquAroMvo4KOjoy6uBzjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

runs the tag.

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

Very nice, Mark! Thanks!

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. :slight_smile:

-DenOn Wed, Feb 4, 2015 at 12:20 PM, Geoff Parkhurst <@Geoff_Parkhurst> wrote:

Has anyone managed to get that plumbed into Jenkins or similar? Would
be nice to get that step into a CI process somehow…

On 4 February 2015 at 18:39, Michael Offner <@Michael_Offner> wrote:

That need to go into tip and trick section in the wiki :wink:

Micha

On Wed, Feb 4, 2015 at 5:27 PM, Mark Drew <@Mark_Drew> wrote:

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

On 4 Feb 2015, at 16:15, Jonathan Brookins <@Jonathan_Brookins> wrote:

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?


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@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.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/F25049D7-4FD3-41D5-9FF8-B3C4CBA94950%40gmail.com
.

For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAG%2BEEBxKXF5SULD%2BH3Av7dqtf1aKzRd-Y5uMQojOjE%2BKEoZbrw%40mail.gmail.com
.

For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAC0HRKn7WY4di_VYEeFx%3DefEeML0U%2BquAroMvo4KOjoy6uBzjA%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.

Has anyone managed to get that plumbed into Jenkins or similar? Would
be nice to get that step into a CI process somehow…On 4 February 2015 at 18:39, Michael Offner <@Michael_Offner> wrote:

That need to go into tip and trick section in the wiki :wink:

Micha

On Wed, Feb 4, 2015 at 5:27 PM, Mark Drew <@Mark_Drew> wrote:

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

On 4 Feb 2015, at 16:15, Jonathan Brookins <@Jonathan_Brookins> wrote:

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?


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@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.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/F25049D7-4FD3-41D5-9FF8-B3C4CBA94950%40gmail.com.

For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG%2BEEBxKXF5SULD%2BH3Av7dqtf1aKzRd-Y5uMQojOjE%2BKEoZbrw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.