Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

generate_standalone_timeline_view.py is broken #483

Closed
natduca opened this issue Sep 22, 2014 · 4 comments
Closed

generate_standalone_timeline_view.py is broken #483

natduca opened this issue Sep 22, 2014 · 4 comments
Labels

Comments

@natduca
Copy link
Contributor

natduca commented Sep 22, 2014

From bolinf...@gmail.com on October 09, 2013 15:03:37

What steps will reproduce the problem? 1. ./build/generate_standalone_timeline_view.py --js=trace_viewer.js
2. grep 'var vec2' trace_viewer.js What is the expected output? What do you see instead? Expected: 'var vec2' should be in the generated trace_viewer.js file as a side effect of creating the standalone timeline view.
Observed: 'var vec2' is not there, so trace_viewer.js fails when used in a web page. What version of the product are you using? On what operating system? r1026

Original issue: http://code.google.com/p/trace-viewer/issues/detail?id=478

@natduca
Copy link
Contributor Author

natduca commented Sep 22, 2014

From bolinf...@gmail.com on October 09, 2013 15:22:10

As a workaround, I added the following snippet to generate_js() in build/generate_standalone_timeline_view.py to get it to work again:

raw_scripts = set()
for module in load_sequence:
for raw_script in module.dependent_raw_script_names:
if raw_script in raw_scripts:
continue
path = "src/" + raw_script
contents = open(path).read()
js_chunks.append(contents)
js_chunks.append("\n")

js_chunks.append(module.contents)
js_chunks.append("\n")

return ''.join(js_chunks)

Presumably this is not the best way to fix this, but it works for my purposes.

Also, the instructions on https://code.google.com/p/trace-viewer/wiki/Embedding are out of date. This line no longer works:

var model = Model();

it appears that this type has been renamed to tracing.TraceModel.

@natduca
Copy link
Contributor Author

natduca commented Sep 22, 2014

From nd...@chromium.org on April 08, 2014 12:39:27

I think this is fixed. We have smoketests now for this stuff.

Status: Fixed

@natduca
Copy link
Contributor Author

natduca commented Sep 22, 2014

From bolinf...@gmail.com on May 13, 2014 12:36:50

This is not working, so maybe you need to fix your smoke tests? When I do the following (which is based on the instructions at https://code.google.com/p/trace-viewer/wiki/Embedding ):

svn checkout -r 1273 http://trace-viewer.googlecode.com/svn/trunk/ trace-viewer-read-only
cd trace-viewer-read-only/trace_viewer
python build/generate_standalone_timeline_view.py --js=trace_viewer.js --css=trace_viewer.css

I get the following failure:

Traceback (most recent call last):
File "build/generate_standalone_timeline_view.py", line 11, in
import tvcm
ImportError: No module named tvcm

Please reopen this issue.

@natduca
Copy link
Contributor Author

natduca commented Sep 22, 2014

From bolinf...@gmail.com on May 13, 2014 12:46:59

From the root of the repository, I can run:

PYTHONPATH=third_party/tvcm:. python trace_viewer/build/generate_standalone_timeline_view.py --js=trace_viewer.js --css=trace_viewer.css

That has an exit code of 0, but does not generate any files.

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

No branches or pull requests

1 participant