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

If GIMME_DEBUG >= 2 then make.bash -v #160

Merged
merged 2 commits into from
Aug 15, 2018
Merged

Conversation

philpennock
Copy link
Contributor

We already have logic to handle GIMME_DEBUG looking like a number and capturing more output here; just use one number higher to ask make.bash to be verbose.

Slightly repetitive, but cleaner and easier to understand than conditional arrays or stuff which would affect shellcheck if we relied upon empty unquoted args being dropped.

With this and without the #159 unset of GO111MODULE, invoking as GIMME_DEBUG=3 GO111MODULE=on gimme master reveals all the use of internal package complaints which show that building Go itself is incompatible with having GO111MODULE set in environ.

Copy link
Contributor

@AlekSi AlekSi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have logic to handle GIMME_DEBUG looking like a number and capturing more output here

Personally, I would like to see that logic simplified: if GIMME_DEBUG is set and not zero, enable debugging output. No need for different levels – it is already debug level.

@philpennock
Copy link
Contributor Author

There's a difference between "debugging gimme" and "debugging everything gimme runs". Stacked debugging levels can be helpful.

But really, I can't see a reason to want the output of make.bash captured but to not want it to be verbose, so I'll simplify back to "no more complex than before" and make it be "capture make.bash -v" vs "don't capture". Good call.

We already have logic to handle `GIMME_DEBUG` looking like a number and
capturing more output from `make.bash` here; adjust condition to make it
clearer which value triggers is, and also tell `make.bash` to be more
verbose and get more details in the captured log.

Having `make.bash -v`, before the the #159 unset of `GO111MODULE`, this
facility reveals all the `use of internal package` complaints which show
that building Go itself is incompatible with having `GO111MODULE` set in
environ.
@philpennock philpennock force-pushed the debug-make.bash-verbose branch from aa74f98 to 74baf6a Compare August 14, 2018 17:35
@philpennock philpennock changed the title If GIMME_DEBUG >= 3 then make.bash -v If GIMME_DEBUG >= 2 then make.bash -v Aug 14, 2018
@@ -327,8 +327,8 @@ _compile() {
export CC_FOR_TARGET="${GIMME_CC_FOR_TARGET}"

local make_log="${1}/make.${GOOS}.${GOARCH}.log"
if [[ "${GIMME_DEBUG}" -gt "1" ]]; then
./make.bash 2>&1 | tee "${make_log}" 1>&2 || return 1
if [[ "${GIMME_DEBUG}" -ge "2" ]]; then

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@Lyoness Lyoness mentioned this pull request Aug 15, 2018
@joepvd joepvd merged commit b8811b8 into master Aug 15, 2018
Copy link
Contributor

@joepvd joepvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@AlekSi AlekSi deleted the debug-make.bash-verbose branch August 15, 2018 17:45
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

Successfully merging this pull request may close these issues.

3 participants