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

Emit named functions in DEV mode for easier profiling #2129

Open
gampleman opened this issue Aug 3, 2020 · 1 comment
Open

Emit named functions in DEV mode for easier profiling #2129

gampleman opened this issue Aug 3, 2020 · 1 comment

Comments

@gampleman
Copy link
Contributor

Quick Summary: (anonymous) functions are hard to work with in the browsers Dev tools when profiling code. Having something like user$module$function would be much easier to understand.

Elm functions are currently defined something like this in JS:

var user$project$module$function = F2(function(arg1, arg2) {
   ...
});

However, the F2 call means that the JS engine doesn't infer that the name of the function is actually user$project$module$function, but considers it (anonymous). However, if we had the following output:

var user$project$module$function = F2(function user$project$module$function(arg1, arg2) {
   ...
});

then the dev tools could print much nicer stack frames.

@github-actions
Copy link

github-actions bot commented Aug 3, 2020

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

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

No branches or pull requests

2 participants