RC-Paves3-build / plovr

Automatically exported from code.google.com/p/plovr
0 stars 0 forks source link

plovr serve on Windows broken in Nov release? #51

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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"></scrip
t>)
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"></scrip
t>
<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)

Original issue reported on code.google.com by jwfe...@gmail.com on 9 Nov 2011 at 1:25

GoogleCodeExporter commented 8 years ago
Note: Closure Library source links work OK (no errors for queue.js above, for 
instance), only links to my (non-jar) source are broken

Original comment by jwfe...@gmail.com on 9 Nov 2011 at 1:35

GoogleCodeExporter commented 8 years ago
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 http://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?

Original comment by mbo...@gmail.com on 9 Nov 2011 at 2:19

GoogleCodeExporter commented 8 years ago
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.

Original comment by Nicholas.J.Santos on 20 Nov 2011 at 5:52

Attachments:

GoogleCodeExporter commented 8 years ago
Nick, sorry, to be clear, are you talking about this test:

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

Original comment by bolinf...@gmail.com on 20 Nov 2011 at 2:58