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

Compile-time AST logging disabled by default #2

Closed
wants to merge 1 commit into from

Conversation

bsl-zcs
Copy link

@bsl-zcs bsl-zcs commented Jul 4, 2013

Can be enabled explicitly for recorder instance:

val expect = new Expecty() with CompileTimeLogging

Or, which is more convenient, per usage:

expect.logged { 1 == 2 }

Fixes #1

@buildhive
Copy link

Peter Niederwieser » expecty #20 SUCCESS
This pull request looks good
(what's this?)

@hrj
Copy link

hrj commented Oct 8, 2013

Looks like a good PR.

@emchristiansen
Copy link

Ping. Could you pull and publish this?

@pniederw
Copy link
Owner

I didn't pull this because I couldn't reproduce the issue.

@emchristiansen
Copy link

It looks to me like this disables by default the verbose AST dumping Expecty does at compile time, but provides a way to turn it back on.
I'm not sure what you mean by "couldn't reproduce the issue".

@pniederw
Copy link
Owner

From what I remember, I only got verbose AST logging when I turned on debug logging for the compiler, which seems fine.

@emchristiansen
Copy link

Using the currently published jar, I'm getting verbose AST logging, and I do not believe I've enabled debug logging for the compiler.
Here's a project which demonstrates the issue: https://github.com/emchristiansen/Sundry

The Expecty bits are in ExpectyOverrides.scala and Logging.scala.

Running "sbt test:compile" in this project produces verbose AST logging for me.
You can click on the Travis CI link to see the build log which contains the AST dumps.

@pniederw pniederw closed this in 9a28591 Nov 12, 2013
@pniederw
Copy link
Owner

Apparently, some environments show compiler info logging by default, and there is no compiler debug log level (at least not for macros). To solve this problem, I've introduced an org.expecty.debug system property, which needs to be set to true for AST logging to occur. This is now available in the fresh Expecty 0.10 release. Anyway, thanks for the pull request!

som-snytt pushed a commit to som-snytt/expecty that referenced this pull request May 15, 2024
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.

Reduce compiler verbosity when compiling code with Expecty
5 participants