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

@trace yields no visible output #9

Open
bit-player opened this issue Jul 6, 2018 · 3 comments
Open

@trace yields no visible output #9

bit-player opened this issue Jul 6, 2018 · 3 comments

Comments

@bit-player
Copy link

Traceur appears to install correctly, and I see no error messages either when using or when invoking the @trace macro, but I also see no trace output, just the returned value of the function.

ASTInterpreter2 seems to be working normally.

[Thanks for developing Traceur! Looks great. Hope to get it working.]

   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.3 (2018-05-28 20:20 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-apple-darwin14.5.0

julia> Pkg.status("Traceur")
 - Traceur                       0.1.1
julia> Pkg.status("ASTInterpreter2")
 - ASTInterpreter2               0.1.1

julia> using Traceur

julia> f(n) = n < 0 ? 0 : n
f (generic function with 1 method)

julia> f(8)
8

julia> @trace f(8)
8

julia> using ASTInterpreter2

julia> @enter f(8)
In f(n) at REPL[5]:1
1 f(n) = n < 0 ? 0 : n

About to run: (<)(8, 0)
1|debug > n
In f(n) at REPL[5]:1
1 f(n) = n < 0 ? 0 : n

About to run: return 8
1|debug > n
8
@pfitzseb
Copy link
Member

pfitzseb commented Jul 7, 2018

That function is type stable, so there's just nothing to display. Try f(8.0) instead.

@pfitzseb pfitzseb closed this as completed Jul 7, 2018
@pfitzseb pfitzseb reopened this Jul 7, 2018
@MikeInnes
Copy link
Member

Maybe we should just start off with a starting trace... done tracing... etc so it's clear that things are working.

@bit-player
Copy link
Author

A possibly less obtrusive alternative would be a message that appears only when the program has no other output. Not sure about the best wording for the message; maybe something like "Trace reports no issues."

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

No branches or pull requests

3 participants