Closed Bug 1386916 Opened 2 years ago Closed 2 years ago

Port |Bug 1326520 - Rename nsIURI.path to something less confusing| to MailNews

Categories

(MailNews Core :: Build Config, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 57.0

People

(Reporter: ewong, Assigned: ewong)

Details

Attachments

(4 files, 1 obsolete file)

Getting this bustage:

/builds/slave/c-cen-t-lnx/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as: /lib64/libz.so.1: no version information available (required by /builds/slave/c-cen-t-lnx/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as)
/usr/bin/ccache /builds/slave/c-cen-t-lnx/build/gcc/bin/g++ -m32 -march=pentium-m -std=gnu++11 -o morkYarn.o -c -I/builds/slave/c-cen-t-lnx/build/objdir/dist/stl_wrappers -I/builds/slave/c-cen-t-lnx/build/objdir/dist/system_wrappers -include /builds/slave/c-cen-t-lnx/build/mozilla/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/slave/c-cen-t-lnx/build/db/mork/src -I/builds/slave/c-cen-t-lnx/build/objdir/db/mork/src  -I/builds/slave/c-cen-t-lnx/build/objdir/dist/include  -I/builds/slave/c-cen-t-lnx/build/objdir/dist/include/nspr -I/builds/slave/c-cen-t-lnx/build/objdir/dist/include/nss       -fPIC  -DMOZILLA_CLIENT -include /builds/slave/c-cen-t-lnx/build/objdir/mozilla-config.h -MD -MP -MF .deps/morkYarn.o.pp  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -msse -msse2 -mfpmath=sse -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -D_GLIBCXX_USE_CXX11_ABI=0 -pipe  -g -freorder-blocks -O2 -fno-omit-frame-pointer  -Werror   /builds/slave/c-cen-t-lnx/build/db/mork/src/morkYarn.cpp
/builds/slave/c-cen-t-lnx/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as: /lib64/libz.so.1: no version information available (required by /builds/slave/c-cen-t-lnx/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as)
/usr/bin/ccache /builds/slave/c-cen-t-lnx/build/gcc/bin/g++ -m32 -march=pentium-m -std=gnu++11 -o morkZone.o -c -I/builds/slave/c-cen-t-lnx/build/objdir/dist/stl_wrappers -I/builds/slave/c-cen-t-lnx/build/objdir/dist/system_wrappers -include /builds/slave/c-cen-t-lnx/build/mozilla/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/slave/c-cen-t-lnx/build/db/mork/src -I/builds/slave/c-cen-t-lnx/build/objdir/db/mork/src  -I/builds/slave/c-cen-t-lnx/build/objdir/dist/include  -I/builds/slave/c-cen-t-lnx/build/objdir/dist/include/nspr -I/builds/slave/c-cen-t-lnx/build/objdir/dist/include/nss       -fPIC  -DMOZILLA_CLIENT -include /builds/slave/c-cen-t-lnx/build/objdir/mozilla-config.h -MD -MP -MF .deps/morkZone.o.pp  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -msse -msse2 -mfpmath=sse -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -D_GLIBCXX_USE_CXX11_ABI=0 -pipe  -g -freorder-blocks -O2 -fno-omit-frame-pointer  -Werror   /builds/slave/c-cen-t-lnx/build/db/mork/src/morkZone.cpp
/builds/slave/c-cen-t-lnx/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as: /lib64/libz.so.1: no version information available (required by /builds/slave/c-cen-t-lnx/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as)
/usr/bin/ccache /builds/slave/c-cen-t-lnx/build/gcc/bin/g++ -m32 -march=pentium-m -std=gnu++11 -o orkinHeap.o -c -I/builds/slave/c-cen-t-lnx/build/objdir/dist/stl_wrappers -I/builds/slave/c-cen-t-lnx/build/objdir/dist/system_wrappers -include /builds/slave/c-cen-t-lnx/build/mozilla/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/slave/c-cen-t-lnx/build/db/mork/src -I/builds/slave/c-cen-t-lnx/build/objdir/db/mork/src  -I/builds/slave/c-cen-t-lnx/build/objdir/dist/include  -I/builds/slave/c-cen-t-lnx/build/objdir/dist/include/nspr -I/builds/slave/c-cen-t-lnx/build/objdir/dist/include/nss       -fPIC  -DMOZILLA_CLIENT -include /builds/slave/c-cen-t-lnx/build/objdir/mozilla-config.h -MD -MP -MF .deps/orkinHeap.o.pp  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -msse -msse2 -mfpmath=sse -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -D_GLIBCXX_USE_CXX11_ABI=0 -pipe  -g -freorder-blocks -O2 -fno-omit-frame-pointer  -Werror   /builds/slave/c-cen-t-lnx/build/db/mork/src/orkinHeap.cpp
/builds/slave/c-cen-t-lnx/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as: /lib64/libz.so.1: no version information available (required by /builds/slave/c-cen-t-lnx/build/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.4/../../../../x86_64-unknown-linux-gnu/bin/as)
../../../../mailnews/addrbook/src/nsAbContentHandler.cpp: In member function 'virtual nsresult nsAbContentHandler::HandleContent(const char*, nsIInterfaceRequestor*, nsIRequest*)':
../../../../mailnews/addrbook/src/nsAbContentHandler.cpp:57:19: error: 'class nsIURI' has no member named 'GetPath'
         rv = uri->GetPath(path);
                   ^
make[4]: *** [nsAbContentHandler.o] Error 1
make[4]: Leaving directory `/builds/slave/c-cen-t-lnx/build/objdir/mailnews/addrbook/src'
make[3]: *** [mailnews/addrbook/src/target] Error 2
make[3]: *** Waiting for unfinished jobs....
Summary: mailnews/addrbook/src/nsAbContentHandler.cpp: 'class nsIURI' has no member named 'GetPath' → Port |Bug 1326520 - Rename nsIURI.path to something less confusing| to MailNews
Attached patch proposed patch (obsolete) — Splinter Review
Attachment #8893202 - Flags: review?(rkent)
missed the LDAP stuff
Attachment #8893202 - Attachment is obsolete: true
Attachment #8893202 - Flags: review?(rkent)
Attachment #8893212 - Flags: review?(rkent)
Comment on attachment 8893212 [details] [diff] [review]
proposed patch (v2)

Please send all bustage fix reviews to me.
Attachment #8893212 - Flags: review?(rkent) → review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/ec72d5653abf
Port 1326520 to mailnews: Rename GetPath/SetPath to GetPathQueryRef/SetpathQueryRef. r=jorgk
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Thanks Edmund. I didn't have time to compile this, but I assume it works ;-)
Assignee: nobody → ewong
Target Milestone: --- → Thunderbird 57.0
(In reply to Jorg K (GMT+2) from comment #5)
> Thanks Edmund. I didn't have time to compile this, but I assume it works ;-)

Yes, I compiled it and it does build.
(In reply to Edmund Wong (:ewong) from comment #6)
> (In reply to Jorg K (GMT+2) from comment #5)
> > Thanks Edmund. I didn't have time to compile this, but I assume it works ;-)
> 
> Yes, I compiled it and it does build.

Oh.. do note.. I compiled it on a Win64 system.

I'm gonna get flak for this; but I really should've sent it to try first.  sorry.
No need for a try, but did you check js usage? I am afk for a few hours now.
Hmm, the JS bustage is much larger than the C++ bustage, here are heaps of url.path or uri.path or request.path. We'll be here for a while.
find calendar -name *.js -exec sed -i -e 's/url\.path/url.pathQueryRef/g' {} \;
find ldap -name *.js -exec sed -i -e 's/url\.path/url.pathQueryRef/g' {} \; plus manual fix
find mail/test/mozmill -name *.js -exec sed -i -e 's/aURL\.path/aURL.pathQueryRef/g' {} \;
find calendar -name *.js -exec sed -i -e 's/uri\.path/uri.pathQueryRef/g' {} \;
find calendar -name *.js -exec sed -i -e 's/Uri\.path/Uri.pathQueryRef/g' {} \;
find calendar -name *.js -exec sed -i -e 's/URI\.path/URI.pathQueryRef/g' {} \;
find mail/components -name *.js -exec sed -i -e 's/aURI\.path/aURI.pathQueryRef/g' {} \;

Looks like the request.path comes from nsIHttpRequest.path and doesn't need to be replaced.
Changes to JS. Let's see how many I've missed or gotten wrong.
I've missed two JSM files and got the LDAP stuff wrong. With this patch these tests now pass:

TEST-UNEXPECTED-FAIL | xpcshell-icaljs.ini:calendar/test/unit/test_gdata_provider.js | xpcshell return code: 0 [log…]
TEST-UNEXPECTED-FAIL | xpcshell-libical.ini:calendar/test/unit/test_gdata_provider.js | xpcshell return code: 0 [log…]
TEST-UNEXPECTED-FAIL | ldap/xpcom/tests/unit/test_nsLDAPURL.js | xpcshell return code: 0 [log…]
TEST-UNEXPECTED-FAIL | ldap/xpcom/tests/unit/test_nsLDAPURL.js | run_test - [run_test : 99] "undefined" == "/dc=test" [log…]
TEST-UNEXPECTED-FAIL | mailnews/jsaccount/test/unit/test_fooUrl.js | xpcshell return code: 0 [log…]

So I'll land this now and we see how far we get.
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/b0da77087a90
Port bug 1326520 to C-C: Rename nsIURI.path to nsIURI.pathQueryRef in JS files. rs=bustage-fix
Comment on attachment 8893412 [details] [diff] [review]
1386916-path.patch (v2)

Plenty of calendar stuff in here, so you might want to review this.
Attachment #8893412 - Flags: review?(makemyday)
Tests on the main platforms look green, so I think I'm done here.
Comment on attachment 8893412 [details] [diff] [review]
1386916-path.patch (v2)

Aceman, you might take a look here, too. This is a real pain since not only URIs have a path, but also files and HTTP requests. I hope I got it right, hit all the ones that needed hitting and nothing else. Tests are green but that doesn't mean that everything is working. When DXR has refreshed, it will be easier to see.
Attachment #8893412 - Flags: review?(acelists)
(In reply to Jorg K (GMT+2) from comment #10)
> Hmm, the JS bustage is much larger than the C++ bustage, here are heaps of
> url.path or uri.path or request.path. We'll be here for a while.

Sorry.. I missed the tests.  Should've really sent it to try.
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/83b7a39ad5d2
Port bug 1326520 to C-C: Rename nsIURI.path to nsIURI.pathQueryRef in JS files (follow-up). rs=bustage-fix DONTBUILD
Missed some.

BTW, that calendar change
let targetParts = request.URI.pathQueryRef.split("/");
is correct since request is a 
let request = nsIChannel which has a URI attribute which is a nsIURI:
aLoader.request.QueryInterface(Components.interfaces.nsIHttpChannel);

Too bad I missed the line just above.
Attachment #8893412 - Flags: review?(makemyday) → review+
Comment on attachment 8893412 [details] [diff] [review]
1386916-path.patch (v2)

Review of attachment 8893412 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me. I haven't found any more candidates by looking in dxr.
Attachment #8893412 - Flags: review?(acelists) → review+
You need to log in before you can comment on or make changes to this bug.