ktship / liteide

Automatically exported from code.google.com/p/liteide
0 stars 0 forks source link

Error in source builds and runs hello world. #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use this code (error filled code from the codelab wiki example):
package main

import (
    "fmt"
    "io/ioutil"
    "os"
)

type Page struct {
    Title string
    Body  []byte
}

func (p *Page) Save() os.Error {
    filename = p.Title + ".txt"
    return ioutil.WriteFile(filename, p.Body, 0600)
}

func loadPage(title string) (*Page, os.Error) {
    filename := titel + ".txt"
    body, err := ioutil.ReadFile(filename)
    if err != nil {
        return nil, err
    }
    return &Page{ Title: title, Body: body}
}

func main() {
    p1 := *Page{Title: "TestPage", Body: []byte("This is a sample Page.")}
    p1.save()
    p2, _ : loadPage("TestPage")
    fmt.Println(string(p2.Body))
}

2. run build.... build succeeds. )

3. run project... output is "Hello World"

What is the expected output? What do you see instead?

The expected out is the errors and line numbers, optionally the line(s) with 
the error should also be highlighted and brought to focus.

The build should not succeed and the resulting app should not run.

Note: running gofmt picks up the error on line 31. But again, I think the gofmt 
errors should highlight the first error and bring it to focus.

What I get is a "Hello World!" output.

Build tab output:

GoproMake parser files...
build package main:
     [C:/Go/bin\8g.exe -o codelab-wiki_go_.8 codelab-wiki.go]
     [C:/Go/bin\8l.exe -o codelab-wiki.exe codelab-wiki_go_.8]

link target : codelab-wiki.exe

build exit normal !

Run tab output:
Starting C:/Users/$USER/bin/liteide/bin/../codelab-wiki/codelab-wiki.exe ...
Hello World!

C:/Users/$USER/bin/liteide/bin/../codelab-wiki/codelab-wiki.exe exited with 
code 0

What version of the product are you using? On what operating system?
 latest 0.1.8 on windows.

Please provide any additional information below.

Optionally, an option to clear/reset the output tabs would be appreciated.

Thanks.

Original issue reported on code.google.com by GufyM...@gmail.com on 16 Feb 2011 at 4:53

GoogleCodeExporter commented 9 years ago
Update: Hello world! appears even if the code is fixed.  Also, the name of the 
file I'm saving is "wiki.go", the project name is used instead in the 
Makefile... see above, so it's not even seeing my actual code for the build 
part.  The errors appear when changing/fixing the Makefile. 

So I would say the problem is in project generation, unless I'm missing 
something. 

Original comment by GufyM...@gmail.com on 16 Feb 2011 at 4:59

GoogleCodeExporter commented 9 years ago
You know what, when I started a new project named it codelab-wiki, the editor 
didn't open the automatically created "codelab-wiki.go" file. I just went and 
created a new file and named that "wiki.go" and did not know of the existence 
of "codelab-wiki.go", most of this probably could have been avoided if I had 
checked the makefile first or looked heavily at the Projects dock widget. 

Original comment by GufyM...@gmail.com on 16 Feb 2011 at 5:31

GoogleCodeExporter commented 9 years ago
Manually change the codelab-wiki.pro on liteide editor and save to auto reload 
project.

Original comment by Visua...@gmail.com on 26 Feb 2011 at 12:24