Closed Bug 1319854 Opened 8 years ago Closed 8 years ago

Unused resource://gre/modules/osfile/osfile_{unix,win}_{back,front}.jsm files

Categories

(Toolkit Graveyard :: OS.File, defect)

defect
Not set
normal

Tracking

(firefox53 fixed)

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(2 files)

The test I'm working on in bug 1316187 reports: File Unreferenced on: resource://gre/modules/osfile/osfile_unix_back.jsm windows resource://gre/modules/osfile/osfile_unix_front.jsm windows resource://gre/modules/osfile/osfile_win_back.jsm linux,mac resource://gre/modules/osfile/osfile_win_front.jsm linux,mac
Attached patch FixSplinter Review
This does the straightforward moz.build change. I do wonder if we still need the ospath.jsm file and couldn't instead package the _win and _unix variants of each of these files in a way that would make them end up at the same url so that we could import them without OS.Constants checks.
Attachment #8813763 - Flags: review?(dteller)
Assignee: nobody → florian
Status: NEW → ASSIGNED
(In reply to Florian Quèze [:florian] [:flo] from comment #1) > Created attachment 8813763 [details] [diff] [review] > Fix > > This does the straightforward moz.build change. I do wonder if we still need > the ospath.jsm file and couldn't instead package the _win and _unix variants > of each of these files in a way that would make them end up at the same url > so that we could import them without OS.Constants checks. Could do this by using subdirs, I think? So if you had win/foo.jsm and unix/foo.jsm, you could add the path to EXTRA_JS_MODULES.osfile thing, which I'm reasonably sure strips off the extra subdirs?
Comment on attachment 8813763 [details] [diff] [review] Fix Review of attachment 8813763 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. Note that I'd like to find time to rewrite OS.File in Rust, one of these days :)
Attachment #8813763 - Flags: review?(dteller) → review+
(In reply to :Gijs Kruitbosch from comment #2) > (In reply to Florian Quèze [:florian] [:flo] from comment #1) > > Created attachment 8813763 [details] [diff] [review] > > Fix > > > > This does the straightforward moz.build change. I do wonder if we still need > > the ospath.jsm file and couldn't instead package the _win and _unix variants > > of each of these files in a way that would make them end up at the same url > > so that we could import them without OS.Constants checks. > > Could do this by using subdirs, I think? So if you had win/foo.jsm and > unix/foo.jsm, you could add the path to EXTRA_JS_MODULES.osfile thing, which > I'm reasonably sure strips off the extra subdirs? Using subdirs in this way is also what I had in mind. David, would you prefer this?
Flags: needinfo?(dteller)
https://hg.mozilla.org/integration/mozilla-inbound/rev/bdbcf49b3359dbcad12de40de0a25148cdf1804b Bug 1319854 - Unused resource://gre/modules/osfile/osfile_{unix,win}_{back,front}.jsm files, r=Yoric.
https://hg.mozilla.org/integration/mozilla-inbound/rev/d6ec40f470fced56227e005c08ee40a0f5a47b5b Bug 1319854 - Follow-up to make the test_path.js xpcshell test not depend on files from other platforms, rs=bustage-fix.
Backout by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f62ce5db4ee2 Backed out changeset d6ec40f470fc https://hg.mozilla.org/integration/mozilla-inbound/rev/670ad168fb70 Backed out changeset bdbcf49b3359 for continued various test failures
Flags: needinfo?(florian)
Importing resource://gre/modules/osfile/ospath_unix.jsm on Windows is what caused my patch to be backed out.
Attachment #8815030 - Flags: review?(poirot.alex)
Comment on attachment 8815030 [details] [diff] [review] make loader.js use ospath.jsm instead of ospath_unix.jsm Review of attachment 8815030 [details] [diff] [review]: ----------------------------------------------------------------- Unfortunately, SDK loader expects unix paths, with / and not \. So I imagine it will break with this change. `join` should return path seperated and we will pass paths with / as seperator to `normalize` and `dirname`... You could keep just this file, or inline some simplified versions (I'm not sure it depends on very complex implementation?).
Attachment #8815030 - Flags: review?(poirot.alex)
(In reply to Florian Quèze [:florian] [:flo] from comment #4) > Using subdirs in this way is also what I had in mind. David, would you > prefer this? I have no preference here.
Flags: needinfo?(dteller)
https://hg.mozilla.org/integration/mozilla-inbound/rev/d03852230a32f2eaba331655823c3c814bdac179 Bug 1319854 - Unused resource://gre/modules/osfile/osfile_{unix,win}_{back,front}.jsm files, r=Yoric.
Flags: needinfo?(florian)
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: