lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


This time I'm sure i found some sort of bug

to run luatrace.profile I renamed it to luatrace.profile.bat (is there another way to make it executable in windows?) but when I ran it in my VS command window I got the following output:

C:\Program Files (x86)\Lua\5.1\own_tests>luatrace.profile

C:\Program Files (x86)\Lua\5.1\own_tests>lua -e 'require("luatrace.profile").go(
)'
lua: (command line):1: unexpected symbol near ''require(luatrace.profile).go()''

C:\Program Files (x86)\Lua\5.1\own_tests>

If I rewrite the command in luatrace.profile.bat from

lua -e 'require("luatrace.profile").go()'

to

lua -e "require('luatrace.profile').go()"

everything works fine.



On Fri, Oct 7, 2011 at 7:36 PM, Geoff Leyland <geoff_leyland@fastmail.fm> wrote:
On 8/10/2011, at 2:21 AM, Oskar Forsslund wrote:

> I can now build a dll
> I can run lua -luatrace
> I can require"luatrace" if I assign it to a variable (local luatrace = require"luatrace" for example)
> I get a trace-out.txt file when i run luatrace
>
> BUT
>
> when i then want to analyse it i run the command lua -luatrace.profile trace-out.txt (is this the correct way?)
> and get the following output:
>
> >lua -luatrace.profile trace-out.txt

You want to either:

lua -luatrace my_file.lua
luatrace.profile

(luatrace.profile is a shell script, not a lua script)

or

lua -luatrace.profile my_file.lua

(uatrace/profile.lua is a lua script)

What you're doing is asking lua to run a text file, which doesn't work.

Cheers,
Geoff