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

Add gradualizer_tracer for efficient troubleshooting #454

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

erszcz
Copy link
Collaborator

@erszcz erszcz commented Sep 14, 2022

This is some machinery I'm keeping on the git stash for when it's needed, but I think it doesn't hurt to share it here.

Copy link
Collaborator

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

I'm fine that you add this if you think it's useful.

@@ -24,6 +26,8 @@ start_application(Opts) ->
%% If gradualizer is run as an escript this should not be necessary, but better safe than sorry.
ok = application:load(gradualizer),
application:set_env(gradualizer, options, Opts),
%% We could start the tracer based on a CLI flag, but it's config is compile-time anyway.
%gradualizer_tracer:start(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this tracing enabled by un-commenting this line?

It doesn't seem very convenient to me...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Given the tracer has to be customised in code to make it useful for a practical test case / found bug, I think that uncommenting this single line is a minor detail :) Seriously, debugging the infinite loops, for example, took me literally hours of working with different examples, reading the code, comparing against hypothetical fixes on various branches, etc. Uncommenting this line IMO is not a blocker.

@erszcz erszcz merged commit 494358b into josefs:master Sep 14, 2022
@erszcz erszcz deleted the add-tracer branch September 14, 2022 19:18
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.

2 participants