Closure compiler does not write out errors - grails

I have a Groovy script that runs the closure compiler latest version.
def command = "java -jar $compiler --js $orderedDependencies --js_output_file $minFilename --create_source_map $mapFilename --compilation_level WHITESPACE_ONLY --source_map_format=V3 --language_in=ECMASCRIPT5 --debug --formatting=PRETTY_PRINT"
command.execute(null as List, outputDir).waitForProcessOutput(System.out, System.err)
When I use it without the --language_in option, I get error output. When I add the command option, I don't get any error output, but it breaks somewhere, because nothing gets created and the web interface is broken.
Does anyone have any idea why this might be?

I'm not sure what the problem is since the code you provided isn't enough the reproduce it.
But chances are that you are searching in the wrong place: the .execute() command can be quite annoying. Take a look at this question to get some ideas on what could go wrong and how to solve it: Trying to send an email trough a groovy shell script

Related

Basic Erlang module troubles

So I straight up copy and pasted the code from the Erlang docs: https://erlang.org/doc/reference_manual/modules.html#module-syntax
Please help!
The module didn't compiled. To fix it try this in the Erlang shell (eshell):
1> c(m).
ok
2> m:fact(1).
1
See documentation on how code loading works.
exception error: undefined shell command
almost always means that the shell environment does not have the intended function, which can also mean that the module which contains its definition has not been loaded for all the code that we write by our hand and execute. You can deliberately try to misspell some auto loaded BIF(s) for example "length1" and you will still see same message showing up.

Powershell Parameter Passing

This seems so trivial, but I can't figure out why the parameters I'm passing into a .ps1 script from the command pane aren't getting captured correctly as shown in this image below. String parameters are just empty, numbers are 0 which tells me I've overlooked something basic! This is with Powershell v2.
Thanks mklement0.
It was, in fact, a path issue within the ISE

What is the syntax to comment a line in a tibco ems script

In a script which looks like below
create queue one
create queue two
create topic three
How can I comment a line?
I could find noting in either the tool itself or documentation.
The closest thing to comments you could do is:
echo off some comments here
tibemsadmin does not fail, and don't react to extra parameters. The "echo" command is harmless... so it is a great candidate.
Of course, you might prefer "echo on".
Not a great solution, but the only one I find.
Are you referring to the script that will be executed by tibemsadmin binary? You can try to prepend "#" in the front of the line which you don't need.
There is no way to run a command against the EMS server that is a comment. The easiest is to let it crash.
I've use
// Comment line "Creating queue for XYZ process"
However it still generates an error which wasn't a problem until we have just implemented continuous deployments for EMS and Tibco BW Ears, and it stopped when there was an error coming back from the command.
You could write a quick pre-processor that reads each line of the EMS script file and spits out a separate file that you can just run without errors. I'd do something like
(Your language of choice)
for each line in the file
if line starts with // then
do nothing
else
write it to the other file
end loop

how to debug this lithium request?

I am trying to work on whats wrong with my lithium current setup. I have installed the Xdebug and verified that remote host can establish the connection as requested.
http://myinstance.com/test/lithium/tests/cases/analysis/logger/adapter/CacheTest?filters[]=lithium\test\filter\Coverage
Please note in fresh installation in local environment , "Coverage" Filter is working as expected.
I added some test code inside the "apply" function in coverage.php but it is not even called !!!! Can some have experience in debugging the above URL ?
I am not able to understand why coverage filter is not called up and executed ...Any hints are highly appreciated !
The filters in the query string are added to the options in lithium\test\Controller::__invoke() and then passed into the test Report object created by the test Dispatcher. The Report object finds the test filter class and then runs the applyFilter() method for that test filter as can be seen in lines 140 to 143 of the current code. So those lines would be another place to debug. Those should wrap the run() method of your tests with this filter code inside the apply() method that uses xdebug_get_code_coverage() and related functions. You said you added test code in the apply method and it isn't called. I'm not sure what the issue is. Are you sure you are pointing to the right server and code location? It is possible to run tests from the command line. Maybe you should try that. See code comments in lithium\console\command\Test or run li3 test --help for info on how to use the command-line test runner.
I can confirm on nginx I also have /test/lithium/tests/cases/analysis/logger/adapter/CacheTest?filters[]=lithium\x5Ctest\x5Cfilter\x5CCoverage in my access log. The \x5C is expected url encoding of the backslash character.

Error executing script CreateAuthDomains: null\scripts\Init.groovy (The system cannot find the path specified)

I am trying to build an app that makes use of the acegi and multitenant-plugin in grails. I am following the instructions from this tutorial:
http://ridingthetiger.wikia.com/wiki/Creating_a_Secure,_Multi-Tenant_Web_App_with_Grails
however when I get to this instruction:
grails create-auth-domains org.racetrack.User org.racetrack.Role Requestmap
I get this error:
Running script C:\Users\roise\.grails\1.3.7\projects\racetrack\plugins\acegi-0.5.2\scripts\CreateAuthDomains.groovy
Error executing script CreateAuthDomains: null\scripts\Init.groovy (The system cannot find the path specified)
java.io.FileNotFoundException: null\scripts\Init.groovy (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at gant.Gant$_closure1.doCall(Gant.groovy:128)
at gant.Gant$_closure1.call(Gant.groovy)
at _SecurityTargets_groovy.run(_SecurityTargets_groovy:25)
at _SecurityTargets_groovy$run.call(Unknown Source)
at CreateAuthDomains.run(CreateAuthDomains:23)
at CreateAuthDomains$run.call(Unknown Source)
at gant.Gant.prepareTargets(Gant.groovy:606)
Error executing script CreateAuthDomains: null\scripts\Init.groovy (The system cannot find the path specified)
I have tried to follow the tutorial to the last comma. The only thing that is different is that i am developing in STS and I cannot run the create-app command from the command line, I actually have to create a new app from the New menu. The other three commands I have got up to so far - I have entered and executed exactly as shown.
The problem here is that "GRAILS_HOME" environment variable is not set.
From the Grails documentation:
On Windows this is typically a matter of setting an environment variable under My Computer/Advanced/Environment Variables
I believe that #arcdegree is right that the problem is because a script cannot figure out what GRAILS_HOME is but in my case that environment variable was set correctly and I was still experiencing the problem.
What I found to fix my problem and I believe will fix your problem is that the command you are trying to run (create-auth-domains ) is accessing a script (CreateAuthDomains.groovy) within the acegi plugin that needs updating. Now, this question is quite old with no accepted answers so I'm not sure if you are still experiencing this problem but I do think this answer will help anyone else looking into a similar problem. Mine stems from trying to use an old plugin for jsecurity that has been replaced with a newer plugin but I was intent on using the same thing a document I was referring to had used.
Your script in this case, CreateAuthDomains, probably uses an old reference to grailsHome and includeTargets that should be replaced with a single line that calls grailsScript("Init") instead. So, comment out these lines:
grailsHome = Ant.project.properties."environment.GRAILS_HOME"
includeTargets << new File ("${grailsHome}/scripts/Init.groovy")
then add this one line
includeTargets << grailsScript("Init")
Save the file and try your command again.

Resources