★ wanayoo — archive 1999 https://github.com/codeclimate/codeclimate/issues/562Nouvelle recherche | Portail wanayoo
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

Stderr isn't dumped if any JSON issue fails to parse/typecheck #562

Open
zenspider opened this issue Feb 9, 2017 · 0 comments
Open

Stderr isn't dumped if any JSON issue fails to parse/typecheck #562

zenspider opened this issue Feb 9, 2017 · 0 comments

Comments

@zenspider
Copy link
Contributor

@zenspider zenspider commented Feb 9, 2017

Basically a transcript from slack, me unless specified:

for some reason my stderr output isn’t being displayed when I have CODECLIMATE_DEBUG set… is there something I’m forgetting? I am running with —dev

it USED to print out.... I swear.

ooooh… ok. I think I get it. If I print an incorrect issue, {} in this case, then CC blows up and I don’t see any of stderr. If I bypass that error, then I do see it.

I’m doing the equiv of CODECLIMATE_DEBUG=1 codeclimate analyze --dev | cat

Pat Brisbin: cool, so it seems an ordering problem with the printing of the stderr and the validation-triggered exception?

yeah, I think so. might be designed that way… but it’d help a dev if stderr was dumped out at the point of aborting

Pat Brisbin: probably not intentional, but it's tough to think of it that way because it's the engine's stderr not codeclimate's

          unless output.valid?
            stdout_io.failed("#{qualified_name} produced invalid output: #{output.error[:message]}")
            container.stop
          end

Pat Brisbin: so when an engine completes (success or fail) you dump its stderr. i thought we tried to dump it as it ran, but there might be buffering issues

vs 2 paragraphs below:

        container.run(container_options).tap do |result|
          CLI.debug("#{qualified_name} engine stderr: #{result.stderr}")
        end

so, not sure HOW you’d capture the stderr at the point above

Pat Brisbin: yeah. ideally that'd be re-oriented such that it's line-bufferred directly out instead of pushed into result.stderr for later (edited)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.