[jira] Created: (BOO-1262) The white space agnostic parser is not preserving file names

View: New views
3 Messages — Rating Filter:   Alert me  

[jira] Created: (BOO-1262) The white space agnostic parser is not preserving file names

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The white space agnostic parser is not preserving file names
------------------------------------------------------------

                 Key: BOO-1262
                 URL: http://jira.codehaus.org/browse/BOO-1262
             Project: Boo
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 0.9.2
            Reporter: Andre Van Der Merwe
            Priority: Minor
         Attachments: WSA.diff

The white space agnostic parser is not preserving the source file names. This means that the generated assemblies can not be debugged as the PDB does not reference the source file.

To fix

In Boo.Lang.Parser.WSABooParser: in the CreateBooLexer method (line 77 for boo 0.9.2.3383)

Change: lexer.Initialize(selector, tabSize, BooToken.Creator);
To: lexer.Initialize(selector, tabSize, BooToken.TokenCreator);


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (BOO-1262) The white space agnostic parser is not preserving file names

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/BOO-1262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197403#action_197403 ]

Andre Van Der Merwe commented on BOO-1262:
------------------------------------------

C# file to test the issue

Without the patch you can not step into the boo code. With the patch you can. Alternatively you can dump the generated assembly with ildasm, before the path there will be no ".line" directives.


--------------------------------
class Program
{
    static void Main(string[] args)
    {
        string code = @"
class Tester:
    public def TestMethod():
        print 1
        System.Diagnostics.Debugger.Break()
        print 2
        print 3
    end
end

System.Diagnostics.Debugger.Break()
print 2";

        var codeReader = new StringReader(code);
        File.WriteAllText("test.boo", code);

        var booc = new BooCompiler();
        booc.Parameters.GenerateInMemory = true;
        booc.Parameters.Input.Add(new ReaderInput("test.boo", codeReader));
        booc.Parameters.OutputType = CompilerOutputType.ConsoleApplication;
        booc.Parameters.Debug = true;
        booc.Parameters.WhiteSpaceAgnostic = true;
        booc.Parameters.Pipeline = new CompileToFile();
        booc.Parameters.OutputAssembly = "test.exe";
        booc.Parameters.Pipeline[0] = new WSABooParsingStep();

        CompilerContext context = booc.Run();

        if (context.Errors.Count == 0)
        {
            var asm = context.GeneratedAssembly;
            var type = asm.GetType("Tester");
            var o = Activator.CreateInstance(type);
            var method = type.GetMethod("TestMethod");
            method.Invoke(o, new object[] { });
        }
    }
}

> The white space agnostic parser is not preserving file names
> ------------------------------------------------------------
>
>                 Key: BOO-1262
>                 URL: http://jira.codehaus.org/browse/BOO-1262
>             Project: Boo
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 0.9.2
>            Reporter: Andre Van Der Merwe
>            Priority: Minor
>         Attachments: WSA.diff
>
>   Original Estimate: 30 minutes
>  Remaining Estimate: 30 minutes
>
> The white space agnostic parser is not preserving the source file names. This means that the generated assemblies can not be debugged as the PDB does not reference the source file.
> To fix
> In Boo.Lang.Parser.WSABooParser: in the CreateBooLexer method (line 77 for boo 0.9.2.3383)
> Change: lexer.Initialize(selector, tabSize, BooToken.Creator);
> To: lexer.Initialize(selector, tabSize, BooToken.TokenCreator);

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Closed: (BOO-1262) The white space agnostic parser is not preserving file names

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/BOO-1262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rodrigo B. de Oliveira closed BOO-1262.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.9.3
         Assignee: Rodrigo B. de Oliveira

Patch applied in revision 3437. Thanks!

> The white space agnostic parser is not preserving file names
> ------------------------------------------------------------
>
>                 Key: BOO-1262
>                 URL: http://jira.codehaus.org/browse/BOO-1262
>             Project: Boo
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 0.9.2
>            Reporter: Andre Van Der Merwe
>            Assignee: Rodrigo B. de Oliveira
>            Priority: Minor
>             Fix For: 0.9.3
>
>         Attachments: WSA.diff
>
>   Original Estimate: 30 minutes
>  Remaining Estimate: 30 minutes
>
> The white space agnostic parser is not preserving the source file names. This means that the generated assemblies can not be debugged as the PDB does not reference the source file.
> To fix
> In Boo.Lang.Parser.WSABooParser: in the CreateBooLexer method (line 77 for boo 0.9.2.3383)
> Change: lexer.Initialize(selector, tabSize, BooToken.Creator);
> To: lexer.Initialize(selector, tabSize, BooToken.TokenCreator);

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email