Closed Bug 1394573 Opened 9 years ago Closed 9 years ago

Remove the footgun of having --objdir relative to the source checkout

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: sfink, Assigned: sfink)

Details

Attachments

(1 file)

Till was unfortunate enough to come across the enormous footgun I had in autospider.py, where it would delete your checkout if you did --objdir .
The issue is that it was expecting a simple name (eg "obj-spider" or whatever), not a path, and gluing it onto the source checkout path. Which is totally unexpected for the user, and totally unnecessary. This patch also adds in a sentinel file and will only delete directories marked with that file, for added safety. (I would have made it a dot file, but I'm not sure if it would work on the Windows filesystem.)
Attachment #8901986 - Flags: review?(till)
Comment on attachment 8901986 [details] [diff] [review] Remove the footgun of having --objdir relative to the source checkout Review of attachment 8901986 [details] [diff] [review]: ----------------------------------------------------------------- Thank you! ::: js/src/devtools/automation/autospider.py @@ +129,4 @@ > if clobber: > + marker = os.path.join(name, creation_marker_filename) > + if os.path.exists(name) and not os.path.exists(marker): > + raise Exception("Refusing to delete %s because creation marker %s is missing" % (name, marker)) Perhaps change this to "Refusing to delete targeted objdir %s because it wasn't created by autospider"? Using the marker to ensure this seems like an implementation detail.
Attachment #8901986 - Flags: review?(till) → review+
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4d8da479bdd0 Remove the footgun of having --objdir relative to the source checkout, r=till
Backout by sfink@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/5d34ea6f47ad Backed out changeset 4d8da479bdd0 on a CLOSED TREE
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4d06fa0b2908 Remove the footgun of having --objdir relative to the source checkout, r=till
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: