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
add tags and i options to go build #674
Conversation
This needs some work, the syntax is not being sent to |
@@ -6076,14 +6076,30 @@ See URL `http://golang.org/cmd/go/' and URL | |||
;; Fall back if `go build' or `go test' can be used | |||
go-errcheck)) | |||
|
|||
(flycheck-def-option-var flycheck-go-install-deps nil go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The argument is go-build
, not go
here.
@drewwells I'm not sure that I understand |
Say you're dependent on a package that takes 10mins to build.
|
@drewwells Sorry, but that doesn't really answer my question. So again, does |
No, |
any tips on fixing this? The expected output is |
@drewwells I still don't understand what we need |
Building packages can take a long time. This installs dependent package so they do not need to be rebuilt. It automatically tracks changes and invalidates cache intelligently as well. Since a lot of useful Go packages depend on C libs, this can dramatically speed up build times. |
@drewwells If you want to pass all tags as a single argument you need to use As for |
yes, it will install the top level package too. |
:command ("go" "build" "-o" temporary-file-name) | ||
;; We need to use `temporary-file-name' instead of `null-device', | ||
;; because Go can't write to the null device. | ||
;; See https://github.com/golang/go/issues/4851 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated for the new location of this issue.
@drewwells I have no idea what the “top level package” is supposed to be, but regardless I strongly dislike the idea of having an automatic background syntax check changing the global state of I'll merge the tags part of this PR, but I'm very skeptical about the |
When you are building code, the top level packages is the one being built. The underlying dependencies are dependencies (not top level packages). From the go build documentation: https://golang.org/cmd/go/
Let's break it down package a
Dev is editing package a. Package a depends on package b. Package b takes 10mins to build. Package a takes milliseconds to build itself. However, to build package a, To alleviate this very common problem,
|
@drewwells If it's that useful I wonder why none else needed this option hitherto, even though the Inviting @dougm, @gfrey, @ptrv, @yasuyk and @robert-zaremba for their feedback, as they have contributed to Go support in Flycheck. |
Well it has been so far magical how my code compiles in Go. And a On Thu, Jul 2, 2015 at 1:50 AM Sebastian Wiesner notifications@github.com
|
Okay, it's creating the correct string for tags |
@drewwells It's hard for me, too, if you don't show me any error messages or test runner output. |
@drewwells Are you still interested in this PR? I'd like to merge it, but there are still issues to be addressed. |
I've been using this branch for the last month. It works great so close if
|
@drewwells I would not like to close it, but there are still some minor issues that need to be corrected in the definitions of the options. Would you mind to fix them? |
What errors?
|
The tests are broken, I haven't figured out how those work and it's probably best to just delete the bad tests I wrote. The defintions match the description I understand it is your project, so do what you like. Though, I won't contribute code that I don't agree with, so I have no intention of removing |
@drewwells We did not disagree on I asked you to remove But there are still minor issues in the implementation. Please look at my comments in the diff, the arguments given to With regards to the test cases, we can fix them, but then I need to see the actual test errors. |
The test failures are in the CI https://travis-ci.org/flycheck/flycheck/builds/69250708 I tried refactoring def-option-var but it didn't work for what I needed. I'll take a look at that again. |
@drewwells I'm not sure what your problem with As for the tests, I just noticed that they ran on the old Travis CI setup, which was broken. Please just rebase on master and force push, that should fix the Travis failures. Just a last question, what is |
2c55ec0
to
fbe8652
Compare
Something is wrong in drewwells@8f3890b. I must have misinterpreted your comments. We did get a successful build finally! |
go-root-pkg) | ||
:checker go-build))))) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this blank line.
Please remove the redundant blank line as by my comment, and squash all commits. I'll merge this PR then. |
As mentioned here: #674 (comment) There's an issue with the PR comments. |
@drewwells That is expected. The PR lacks documentation in |
@drewwells But proper style and a squashed commit is a must for a clean merge, which is why I need to ask you to address these issues. |
8f3890b
to
6555418
Compare
Ahh I see, okay I squashed the commits. I'm getting errors with
|
6555418
to
f9d4eb7
Compare
Here's my guess at what needs to be added to the texi file:
|
f9d4eb7
to
e25ec4d
Compare
@lunaryorn I rebased and put some docs in for the options. Looks like travis finally likes this branch |
@drewwells Thank you, cherry-pick onto master 👍 😍 |
And sorry for the long delay! |
No problem glad this out now!! On Thu, Oct 22, 2015, 1:48 PM Sebastian Wiesner notifications@github.com
|
Adds some arguments to
go build
fixes #503go build
supported flags:Unsupported
These are useful, but highly project specific. It would be difficult to make these flags useful in a general case.