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
cmd/trace: the trace command should not contain hardcoded javascript #16377
Comments
There is a significant advantage to having a single file contain everything, including data, javascript, etc. A standalone file can easily be shared and does not require any special tools to open. If anything, I'd like to see the trace viewer go the other direction—rather than generate a file with the data but still require 'go tool trace' to be running to serve js and assets, I think go tool trace should spit out standalone output. I plan to add a -trace flag to cmd/go for 1.8, and in that context, a standalone file is even more important for usability. The bitrot vs the upstream trace viewer code is unfortunate and should be fixed. That's just something we have to maintain. |
But maybe I misunderstand the issue. |
Indeed, it'd be great to have a different mode for |
We could have In case it's helpful, here's the crud I hacked together when I was last working on this (unstable url): josharian@a5a9f75. I'd love to see it done better. I look forward to the gerrit CL. Just advance warning, we're in a code freeze, so nothing will go into the tree until it opens for 1.8 (in a few weeks, I think). |
go tool trace
command should not contain hardcoded javascript.
Okay got the gerrit cl submitted: https://go-review.googlesource.com/#/c/24916/ ; this is exciting as it's my first rodeo with a gerrit instance, looking forward to learning how this thing works :-) |
CL https://golang.org/cl/24916 mentions this issue. |
I can't tell from the discussion here what the actual plan is. Sounds like it is not CL 24916. Leaving for Go 1.9. |
Please answer these questions before submitting your issue. Thanks!
go version
)?Latest master 1.7.
go env
)?n/a, but darwin/linux amd64.
I originally tried to use
go tool trace
in 1.6:misc/trace/README.md
From there I started hacking on my copy of the go 1.6 source, eventually I got a hold of the 1.7 source and found that at least all of the assets had already been upgraded (now including a polyfill for the ill-fated Object.observe).
However the future surface area fur such drift had only increased since 1.6; compare:
This is truly unfortunate since the only dynamic part of that entire "template" is a URL parameter for the XHR request to load data.
Principled separation between frontend code and server-side code.
A hardcoded html+javascript "template" (not even an html/template
I have a proposed change that I'm working to get into Gerrit now.
The text was updated successfully, but these errors were encountered: