My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 51: plovr serve on Windows broken in Nov release?
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by jwfe...@gmail.com, Nov 8, 2011
What steps will reproduce the problem?
1. create an app with served js on Windows 7
2. switch from plovr-96feca4d303b.jar to plovr-d6db24beeb7f.jar
3. restart plovr serve
4. restart app
5. browse to app
6. open browser debugger, check 'elements' view for generated HTML and check 'console' view for errors

What is the expected output? What do you see instead?
EXPECTED: served js links should work (e.g., <script type="text/javascript" src="http://w7dtmjerhz5:9810/input/client_views_atlas_index/lb/array.js"></script>
ACTUAL: served ls links are broken (e.g., <script type="text/javascript" src="http://w7dtmjerhz5:9810/input/client_views_atlas_index/\array.js"></script>
Note the missing 'lb' and the incorrect backslash '\' in the actual link.

What version of the product are you using? On what operating system?
plovr-96feca4d303b.jar, Windows 7

Please provide any additional information below.
Here's some more detailed info from my Chrome debug windows (OLD=plovr-96feca4d303b.jar, NEW=plovr-d6db24beeb7f):

OLD ELEMENTS:
<script src="http://localhost:9810/compile?mode=RAW&amp;id=client_views_atlas_index type="text/javascript"></script>
...
<script type="text/javascript" src="http://w7dtmjerhz5:9810/input/client_views_atlas_index/closure/goog/structs/queue.js"></script>
<script type="text/javascript" src="http://w7dtmjerhz5:9810/input/client_views_atlas_index/lb/array.js"></script>
<script type="text/javascript" src="http://w7dtmjerhz5:9810/input/client_views_atlas_index/lb/sparsematrix.js"></script>
...

OLD CONSOLE:
[no errors]


NEW ELEMENTS:
<script src="http://localhost:9810/compile?mode=RAW&amp;id=client_views_atlas_index type="text/javascript"></script>
...
<script type="text/javascript" src="http://w7dtmjerhz5:9810/input/client_views_atlas_index/closure/goog/structs/queue.js"></script>
<script type="text/javascript" src="http://w7dtmjerhz5:9810/input/client_views_atlas_index/\array.js"></script>
<script type="text/javascript" src="http://w7dtmjerhz5:9810/input/client_views_atlas_index/\sparsematrix.js"></script>
...

NEW CONSOLE:
[Error] GET http://w7dtmjerhz5:9810/input/client_views_atlas_index//sparsematrix.js 400 (Bad Request)
[Error] GET http://w7dtmjerhz5:9810/input/client_views_atlas_index//array.js 400 (Bad Request)


Nov 8, 2011
#1 jwfe...@gmail.com
Note: Closure Library source links work OK (no errors for queue.js above, for instance), only links to my (non-jar) source are broken
Nov 9, 2011
#2 mbo...@gmail.com
Hi, sorry, I don't have a Windows machine to test on, but I have a pretty good guess where the bug is coming from.

In https://code.google.com/p/plovr/source/browse/src/org/plovr/Manifest.java there is a method getRelativePath():

When it gets the absolute path of a directory on Ubuntu Linux, it does not include the trailing slash. I am guessing that on Windows, it includes the trailing backslash.

If I check in a fix, could you build plovr and test it out? Or could someone with a Windows machine try supplying a patch?
Nov 19, 2011
#3 Nicholas.J.Santos
patch attached. thanks for writing the test; the existing test fails on windows and it made this easier. i haven't run the tests on unix.
issue51.diff
631 bytes   View   Download
Nov 20, 2011
Project Member #4 bolinf...@gmail.com
Nick, sorry, to be clear, are you talking about this test:

http://codereview.appspot.com/5373109/

Sign in to add a comment

Powered by Google Project Hosting