Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template.go:115: undefined: template.MustParseFile #1

Closed
tjyang opened this issue Aug 25, 2011 · 15 comments
Closed

template.go:115: undefined: template.MustParseFile #1

tjyang opened this issue Aug 25, 2011 · 15 comments

Comments

@tjyang
Copy link

tjyang commented Aug 25, 2011

Hi, I am using latest weekly go release and like to try out gonew but it failed the compilation.

[go@t-fedora15-64 gonew]$ pwd
/home/go/go/src/pkg/github.com/bmatsuo/gonew
[go@t-fedora15-64 gonew]$ make
6g -o go.6 config.go template.go repository.go hosts.go license.go file.go project.go gonew_main.go
template.go:115: undefined: template.MustParseFile
template.go:132: undefined: template.MustParseFile
make: *** [go.6] Error 1
[go@t-fedora15-64 gonew]$

[go@t-fedora15-64 gonew]$ hg id
6eb2b9dbe489 weekly/weekly.2011-08-17
[go@t-fedora15-64 gonew]$

@bmatsuo
Copy link
Owner

bmatsuo commented Aug 26, 2011

Oh interesting. I am on the release version. I'll look into this.

Edit: By the way, thank you for your interest in gonew and for reporting this :)

@bmatsuo
Copy link
Owner

bmatsuo commented Aug 26, 2011

That was more work than I expected. Gofix didn't help me out at all :(

But things should compile now.

The template package just went though a pretty big overhaul it seems. It will take me a day or to finish reading the documentation and polish up the new versions of the templates.

But things are totally usable now. This issue is closed.

@bmatsuo bmatsuo closed this as completed Aug 26, 2011
@tjyang
Copy link
Author

tjyang commented Aug 26, 2011

  1. I use following command to check out your latest version.

    git clone git://github.com/bmatsuo/gonew.git

Am I using right command ?
Following two version go all failed with same issue.

  1. go version 2011-08-17

[tjyang@t-fedora15-64 gonew]$ make
6g -o go.6 config.go template.go repository.go hosts.go license.go file.go project.go gonew_main.go
template.go:115: undefined: template.Must
template.go:115: not enough arguments in call to template.ParseFile
template.go:132: undefined: template.Must
template.go:132: not enough arguments in call to template.ParseFile
make: *** [go.6] Error 1
[tjyang@t-fedora15-64 gonew]$ hg id
6eb2b9dbe489 weekly/weekly.2011-08-17
[tjyang@t-fedora15-64 gonew]$

  1. Go version release-branch.r59

[go@t-fedora15-64 gonew]$ make
6g -o go.6 config.go template.go repository.go hosts.go license.go file.go project.go gonew_main.go
template.go:115: undefined: template.Must
template.go:115: not enough arguments in call to template.ParseFile
template.go:132: undefined: template.Must
template.go:132: not enough arguments in call to template.ParseFile
make: *** [go.6] Error 1
[go@t-fedora15-64 gonew]$ hg id
d5785050f61d+ (release-branch.r59) tip
[go@t-fedora15-64 gonew]$

@tjyang
Copy link
Author

tjyang commented Aug 26, 2011

Compilation issue fixed by reverse the change here, aa62887#template.go

@bmatsuo
Copy link
Owner

bmatsuo commented Aug 26, 2011

It looks like you're on the release version of Go. If so, you should try using goinstall.

goinstall -u github.com/bmatsuo/gonew

Otherwise, it is a good deal more intensive.

You should pull the release branch and compile that.

git pull origin release:release
git checkout release
gomake install

Then you have to set the "templates" path in the ~/.gonewrc file to point to your cloned repository's templates. I just wrote some instructions up for people on the weekly branch https://github.com/bmatsuo/gonew/tree/weekly

Goinstall is by far the easiest solution for people on the release branch.

@bmatsuo
Copy link
Owner

bmatsuo commented Aug 26, 2011

oh, i think i misunderstood you... You were on the weekly branch supposedly.

@tjyang
Copy link
Author

tjyang commented Aug 26, 2011

On Fri, Aug 26, 2011 at 3:53 PM, bmatsuo
reply@reply.github.com
wrote:

oh, i think i misunderstood you...

Thank you a lot for this helpful build utility.
This is useful and also a good mentoring program for me to learn go.

tj

Reply to this email directly or view it on GitHub:
#1 (comment)

T.J. Yang

@bmatsuo
Copy link
Owner

bmatsuo commented Aug 26, 2011

However, I don't get these errors on the weekly branch.

gonew bryan$ gomake clean && gomake
rm -rf *.o *.a *.[568vq] [568vq].out gonew _test _testmain.go test.out build.out
6g  -o _go_.6 config.go template.go repository.go hosts.go license.go file.go project.go gonew_main.go 
6l  -o gonew _go_.6
gonew bryan$ cd ~/Archive/src_bin/go/src/
src bryan$ hg id
6eb2b9dbe489 weekly/weekly.2011-08-17
src bryan$ 

I'm really not trying to be patronizing. But are you the weekly version was compiled? Just because the repository is checked out to the weekly branch, doesn't necessarily mean your executables are up to date.

@tjyang
Copy link
Author

tjyang commented Aug 26, 2011

On Fri, Aug 26, 2011 at 4:00 PM, bmatsuo
reply@reply.github.com
wrote:

However, I don't get these errors on the weekly branch.

gonew bryan$ gomake clean && gomake
rm -rf *.o *.a *.[568vq] [568vq].out gonew _test _testmain.go test.out build.out
6g  -o _go_.6 config.go template.go repository.go hosts.go license.go file.go project.go gonew_main.go
6l  -o gonew _go_.6
gonew bryan$ cd ~/Archive/src_bin/go/src/
src bryan$ hg id
6eb2b9dbe489 weekly/weekly.2011-08-17
src bryan$

I'm really not trying to be patronizing. But are you the weekly version was compiled? Just because the repository is checked out to the weekly branch, doesn't necessarily mean your executables are up to date.

You are correct, my 6g binary wasn't in sync with 2011-08-17 src tree.

[tjyang@t-fedora15-64 gonew]$ hg id
6eb2b9dbe489 weekly/weekly.2011-08-17
[tjyang@t-fedora15-64 gonew]$ 6g -V
6g version release.r59 8979
[tjyang@t-fedora15-64 gonew]$

Reply to this email directly or view it on GitHub:
#1 (comment)

T.J. Yang

@bmatsuo
Copy link
Owner

bmatsuo commented Aug 26, 2011

Ok, great! Glad to hear its resolved :)

@tjyang
Copy link
Author

tjyang commented Aug 26, 2011

[tjyang@t-fedora15-64 src]$ goinstall -v github.com/bmatsuo/gonew
goinstall: open /home/tjyang/go/goinstall.log: no such file or directory
goinstall: github.com/bmatsuo/gonew: download
goinstall: /: /usr/bin/git clone http://github.com/bmatsuo/gonew.git
/home/tjyang/go/src/pkg/github.com/bmatsuo/gonew
goinstall: /home/tjyang/go/src/pkg/github.com/bmatsuo/gonew:
/usr/bin/git show-ref release
goinstall: /home/tjyang/go/src/pkg/github.com/bmatsuo/gonew:
/usr/bin/git checkout release

                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

goinstall: path/filepath: skipping standard library

I am not familiar with hg, looks like you need to make the changes
today populate to "release" branch.
Otherwise, goinstall will only pull out the old code in "release" branch.

tj
On Fri, Aug 26, 2011 at 4:20 PM, TJ Yang tjyang2001@gmail.com wrote:

On Fri, Aug 26, 2011 at 4:00 PM, bmatsuo
reply@reply.github.com
wrote:

However, I don't get these errors on the weekly branch.

gonew bryan$ gomake clean && gomake
rm -rf *.o *.a *.[568vq] [568vq].out gonew _test _testmain.go test.out build.out
6g  -o _go_.6 config.go template.go repository.go hosts.go license.go file.go project.go gonew_main.go
6l  -o gonew _go_.6
gonew bryan$ cd ~/Archive/src_bin/go/src/
src bryan$ hg id
6eb2b9dbe489 weekly/weekly.2011-08-17
src bryan$

I'm really not trying to be patronizing. But are you the weekly version was compiled? Just because the repository is checked out to the weekly branch, doesn't necessarily mean your executables are up to date.

You are correct, my 6g binary wasn't in sync with 2011-08-17 src tree.

[tjyang@t-fedora15-64 gonew]$ hg id
6eb2b9dbe489 weekly/weekly.2011-08-17
[tjyang@t-fedora15-64 gonew]$ 6g -V
6g version release.r59 8979
[tjyang@t-fedora15-64 gonew]$

Reply to this email directly or view it on GitHub:
#1 (comment)

T.J. Yang

T.J. Yang

@bmatsuo
Copy link
Owner

bmatsuo commented Aug 26, 2011

Yea, I was trying to set it up so people using the release branch could Goinstall the program, as well as cater to people on the weekly branch. Currently, its impossible to set up a repository to Goinstall on both the release and weekly branches (to the best of my knowledge). It's a really messed up situation that the Go developers need to fix.

They recommend the release branch, but so many people are actually on the weekly branch. And the number of API differences between the two makes about half of the available go libraries uninstallable on what ever branch the user wants to run on. And it gets worse the longer the release branch has been out, and subsequent weekly releases pile up.

If Goinstall actually knew what branch the user is on, it could handle this weekly/release branch situation that Go has now. But it doesn't know, or more appropriately, doesn't check what branch your on and will always check out the "release", or the "master" branch if there is no "release". It's messed up. /end rant

As I said, for now I'm mainly supporting the release branch of Go. So I don't intend on changing the release branch situation. But, I do want people on the weekly branch to be able to install (as I said their are a lot of them). So I wrote some instructions in the README.md file on the weekly branch https://github.com/bmatsuo/gonew/tree/weekly I'm going to merge that into the master branch soon. But again, the weekly/master branches won't install with Goinstall because it is so dumb =/

@bmatsuo
Copy link
Owner

bmatsuo commented Sep 9, 2011

So I've found out how goinstall is now release aware. And implemented the tag system it uses. People on both weekly and release branches of Go should now be able to install gonew with the command

goinstall github.com/bmatsuo/gonew

@tjyang
Copy link
Author

tjyang commented Sep 9, 2011

Besides this, It also have support git repository project on
googlecode ;), I will verify it myself later.

tj

On Fri, Sep 9, 2011 at 3:04 AM, Bryan Matsuo
reply@reply.github.com
wrote:

So I've found out how goinstall is now release aware. And implemented the tag system it uses. People on both weekly and release branches of Go should now be able to install gonew with the command

goinstall github.com/bmatsuo/gonew

Reply to this email directly or view it on GitHub:
#1 (comment)

T.J. Yang

@bmatsuo
Copy link
Owner

bmatsuo commented Sep 9, 2011

Oh, I hadn't noticed that GoogleCode now allows Git repos http://google-opensource.blogspot.com/2011/07/announcing-git-support-for-google-code.html

It may not work right away. I'll have to do some investigation of my own.

Thanks for pointing this out, @tjyang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants