-
Notifications
You must be signed in to change notification settings - Fork 44
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
Build using gb #28
Comments
Hi Thank you for your suggestion! |
I will do my best to work on it this week :) |
Started work on this, it not compiles via GB and I confirm that the resulting binary starts :) I have to go get ready for a dinner date, but I'll play some more tonight or tomorrow and get a pull request up for review! |
👍 |
Hey @nati could you create a new branch against master that I can create a pull request to? This is a fairly invasive change, and while it works right now, there is still work to be done on the documentation, wercker.yml and such. In order to do this in steps, it would be great to have a development or separate "implements_issue_28" branch or something. That way I can open the pull request against that rather than master for now. Thanks! |
Thanks. please use this one |
Thanks! Pull request 29 (#29) is now open for this issue. |
…_build Issue #28: Convert build to using gb
ok three commits get merged TODO (1) how to get code coverage |
@nati do you have the source of the Dockerfile for the But there is no |
@nati I found something about Go 1.5 that has experimental vendoring now. I'm wondering if that actually makes a lot more sense to use, as
I'm playing around now, and might make a separate pull request if I get it all going. It seems to be pretty straight forward. |
Hi! [1] Docker file You need build this image in your local because of issue #30. Because of we are using sqlite3, it is little bit hard to cross compile rather than pure go project. [2] Vendoring Note that xgo isn't supporting it yet. we may need modify xgo shell script by ourselves. |
@nati I spent all afternoon on the built in vendoring tool, and I'm highly annoyed by it :) Basically you use glide, but the way glide works, is that you have a glide.yaml file, which is fine (similar to Godeps) and then it imports into the vendor/ directory. All is fine there. But the issue is that you can't add the vendor/ contents into your git repo (like you can with gb) because they are all git clones. This means that we now have to rely on an external tool like glide to get all the deps. |
@nati per [1], do you think you could update the Docker image then to have 'gb' installed and made available in the $PATH? It should just require you to load the image, run:
and then make sure Once you do that, I assume previously you just applied your change to the image, and pushed it up. Maybe you could do the same, and then I can start working on the So far I have |
I got it! I found a way to use existing tool also.
I'll try this way |
@nati disregard for now on the Docker image update. I have an idea! |
Thanks. |
@nati yea I'm working through getting I'm getting this issue: 2015-11-12 03:26:26.534211 N | etcdserver: added local member ce2a822cea30bfca [http://localhost:2380 http://localhost:7001] to cluster 7e27652122e8b2ae
FATAL: command "test" failed: failed to resolve import path "../../../go/src/github.com/cloudwan/gohan/src/db": "../../../go/src/github.com/cloudwan/gohan/src/db" is not a valid import path
2015-11-12 03:26:26.538940 N | osutil: received terminated signal, shutting down...
2015-11-12 03:26:26.539021 I | etcdserver: aborting publish because server is stopped
make: *** [test] Error 1 I'm not really sure why the import path is being pulled in like that. I have to work on something else for a bit, but when my co-worker gets back in later this morning we're going to see if we can fix that. Otherwise, we're getting pretty close I think. |
Of course I'll submit documentation updates once everything is working so that we can get this merged down. I'll just leave those for the last PR. |
I faced that issue too. like GOPATH=$GOPATH:$PROJECT:$PROJECT/vendor |
@nati thanks, going to try again with just the standard |
@nati ok latest change to my PR has wercker mostly working, but it's failing on the actual tests being run. I'm not sure if this is because the Can you look at the result of this run and see if you have any ideas? |
Thanks! I'll fix that issue |
OK build works. |
@nati NICE! Where does the cross-compiling happen? |
yeah. xgo is highly depends on "go get" ... |
@nati you can do cross compile with |
BTW, when I say
|
I found where the script lives; it's on the Docker image directly. Just going through it, and it looks like we might be able to tweak that build.sh perhaps and then push the changes back up to hub.docker.com. |
Thanks! |
Aha.. I found we don't need xgo cross compile. gb simply takes care of it! I'll push another code soon. |
it looks like example app stop working with this change. Let me find a way to use gohan as library |
hmm it looks like there is no nice way to use gb project as a library. We would like to keep support to go based extension without modifying gohan mainline.. @leifmadsen do you have any good idea? |
@nati can you elaborate on what you're looking for? I'm not sure I quite follow where gohan is getting used as a library? I tried out the native vendor support but wasn't really all that impressed. Perhaps we could do experimental vendor support in combination with the Godeps stuff you already had. If Thoughts? |
This is a example for lib mode. Could you also let us what problems you faced? |
I've opened a PR for documentation updates, and I can continue to refine the documentation there. For me, simply running a I'm going to close this out and will continue to work against master with documentation updates, and file any other bugs against the recommended build method. Thanks! |
This is a feature request / enhancement (and I do plan to look into it and see about submitting a pull request), but the current way of building is slightly awkward. I think it might be better to install this through the gb tool to handle dependency gathering.
https://github.com/constabulary/gb
The text was updated successfully, but these errors were encountered: