code review 9679044: go.talks: inline the reader package in each main, (issue 9679044)

72 views
Skip to first unread message

sam...@golang.org

unread,
May 22, 2013, 9:29:22 PM5/22/13
to a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reviewers: adg,

Message:
Hello adg (cc: golan...@googlegroups.com),

I'd like you to review this change to
https://code.google.com/p/go.talks


Description:
go.talks: inline the reader package in each main,
since playground doesn't currently handle packages
in other directories.

Please review this at https://codereview.appspot.com/9679044/

Affected files:
M 2013/advconc.slide
M 2013/advconc/dedupermain.go
M 2013/advconc/fakemain.go
M 2013/advconc/naivemain.go
M 2013/advconc/reader/reader.go


a...@golang.org

unread,
May 22, 2013, 9:43:31 PM5/22/13
to sam...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com

https://codereview.appspot.com/9679044/diff/5001/2013/advconc/reader/reader.go
File 2013/advconc/reader/reader.go (right):

https://codereview.appspot.com/9679044/diff/5001/2013/advconc/reader/reader.go#newcode1
2013/advconc/reader/reader.go:1: import rss
"github.com/jteeuwen/go-pkg-rss"
this is no longer a valid go source file. is that what you intended? i
think it should just be removed

https://codereview.appspot.com/9679044/

sam...@golang.org

unread,
May 22, 2013, 10:32:50 PM5/22/13
to a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
On 2013/05/23 01:43:31, adg wrote:
> this is no longer a valid go source file. is that what you intended? i
think it
> should just be removed

It's still used from the slides, and this is the canonical version
that's copied to the three *main.go files. I can restore the package
and imports here to make it valid.

But I realize now that the playground won't have access to this import,
either, will it? So the build still won't work. I believe this means I
need to remove the "realFetcher" below and this import entirely,
correct?

It would be good to make the real fetcher available separately for
people who want to play with this code offline, though. Can you
recommend an organization for this?

https://codereview.appspot.com/9679044/

Andrew Gerrand

unread,
May 22, 2013, 10:37:12 PM5/22/13
to Sameer Ajmani, Andrew Gerrand, golang-dev, re...@codereview-hr.appspotmail.com

On 23 May 2013 12:32, <sam...@golang.org> wrote:
But I realize now that the playground won't have access to this import,
either, will it?  So the build still won't work.  I believe this means I
need to remove the "realFetcher" below and this import entirely,
correct?

It would be good to make the real fetcher available separately for
people who want to play with this code offline, though.  Can you
recommend an organization for this?

Just put the full working example in a subdirectory of advconc, and make each of the slide-included files use the fakeFetcher and run independently.

Andrew

sam...@golang.org

unread,
May 22, 2013, 10:55:08 PM5/22/13
to a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
Done, thanks.

On 2013/05/23 02:37:43, adg wrote:
https://codereview.appspot.com/9679044/

a...@golang.org

unread,
May 22, 2013, 11:24:09 PM5/22/13
to sam...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
Looking good. Now you can fix the build by putting each .go program in a
separate directory.

Ie, 2013/advconc/fakemain.go -> 2013/advconc/fakemain/main.go



https://codereview.appspot.com/9679044/

sam...@golang.org

unread,
May 23, 2013, 11:43:40 AM5/23/13
to a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
Done.

a...@golang.org

unread,
May 23, 2013, 7:32:20 PM5/23/13
to sam...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com

a...@golang.org

unread,
May 23, 2013, 7:33:07 PM5/23/13
to sam...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
*** Submitted as
https://code.google.com/p/go/source/detail?r=9b0d52b06893&repo=talks ***

go.talks: inline the reader package in each main,
since playground doesn't currently handle packages
in other directories. Move the real implementation
to a separate realmain.go, so that the talk examples
don't depend on the external rss package. Update
the slides to reference fakemain.go.

R=adg
CC=golang-dev
https://codereview.appspot.com/9679044

Committer: Andrew Gerrand <a...@golang.org>


https://codereview.appspot.com/9679044/

g...@golang.org

unread,
May 25, 2013, 1:26:44 PM5/25/13
to sam...@golang.org, a...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
This CL appears to have broken the go.talks build.

https://codereview.appspot.com/9679044/

Andrew Gerrand

unread,
May 25, 2013, 7:18:34 PM5/25/13
to Sameer Ajmani, Robert Griesemer, Andrew Gerrand, golang-dev, re...@codereview-hr.appspotmail.com

On 26 May 2013 03:26, <g...@golang.org> wrote:
This CL appears to have broken the go.talks build.

It was already broken.
Reply all
Reply to author
Forward
0 new messages