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

Bambam is not generating all of the files #7

Closed
jgoodall opened this issue Jan 29, 2015 · 1 comment
Closed

Bambam is not generating all of the files #7

jgoodall opened this issue Jan 29, 2015 · 1 comment

Comments

@jgoodall
Copy link

I assume I am doing something incorrectly, but I cant figure out what it is....

In the current directory I have one file in a separate package that describes a struct. I run:

$ bambam -o=../eventcapnp -p=eventcapnp event.go
[bambam -o=../eventcapnp -p=eventcapnp event.go]
generated files in '../eventcapnp'

$ ls ../eventcapnp
event.go          schema.capnp      translateCapn.go

From looking at the documentation, I am missing schema.capnp.go and go.capnp. When I build the project, it fails:

$ go build
eventcapnp/translateCapn.go:26: undefined: eventcapnp
eventcapnp/translateCapn.go:33: undefined: ContextCapn
eventcapnp/translateCapn.go:44: undefined: ContextCapn
eventcapnp/translateCapn.go:45: undefined: AutoNewContextCapn
eventcapnp/translateCapn.go:68: undefined: eventcapnp
eventcapnp/translateCapn.go:75: undefined: EventCapn
eventcapnp/translateCapn.go:106: undefined: EventCapn
eventcapnp/translateCapn.go:107: undefined: AutoNewEventCapn
eventcapnp/translateCapn.go:137: undefined: ContextCapn_List
eventcapnp/translateCapn.go:147: undefined: ContextCapn_List
eventcapnp/translateCapn.go:107: too many errors
@glycerine
Copy link
Owner

Hi John,

schema.capnp.go is generated when you run "capnpc -ogo schema.capnp" on the schema.capnp file generated by bambam.

go.capnp is just copied into your build directory from the bambam/ directory.

I added additional notes to the README to hopefully make this clearer. If you have further questions, let me know.

schema.capnp.go   # generated by `capnpc -ogo schema.capnp` <- you have to do this yourself or in your Makefile.
go.capnp          # always necessary boilerplate to let capnpc work, just copy it from bambam/go.capnp to your build dir.

The easiest way to understand how to build a project is: run "go test -v -run 003" and then to look in the generated testdir_X directory (where X is a randomly generated number). You should be able to run "go build" inside that test directory (as that is what the test suite does).

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