Open Bug 661944 Opened 15 years ago Updated 3 years ago

Script duplication & enhancements: build/unix -vs- js/src/build/unix

Categories

(Firefox Build System :: General, defect)

x86_64
All
defect

Tracking

(Not tracked)

People

(Reporter: joey, Unassigned)

Details

Duplicate copies of mddepend.pl, print-failed-commands.sh and uniq.pl exist in the sandbox. One copy should be obsoleted and scripts/makefiles updated to launch the tool using a common path: ./build/unix/mddepend.pl ./js/src/build/unix/mddepend.pl ./build/unix/print-failed-commands.sh ./js/src/build/unix/print-failed-commands.sh ./build/unix/uniq.pl ./js/src/build/unix/uniq.pl Enhancements: o perl scripts can be updated to "use strict; use warnings;" (replace perl -w) o unit tests should be written for the tools
There are two copies of these files because js/src is buildable as a standalone project separate from the rest of the Mozilla client. We should be able to remove js/src/build/unix/uniq.pl since js/src doesn't actually use it, but the others will have to stay.
(In reply to comment #0) > o unit tests should be written for the tools This is a fantastic idea. I've been trying to write unit tests as we touch some of our existing tools, but there are a lot of scripts in there.
(In reply to comment #2) > (In reply to comment #0) > > o unit tests should be written for the tools > > This is a fantastic idea. I've been trying to write unit tests as we touch > some of our existing tools, but there are a lot of scripts in there. https://bugzilla.mozilla.org/show_bug.cgi?id=661855 [fyi] patch bundled with related bug 661855 contains a unit test for uniq.pl
(In reply to comment #1) > There are two copies of these files because js/src is buildable as a > standalone project separate from the rest of the Mozilla client. > > We should be able to remove js/src/build/unix/uniq.pl since js/src doesn't > actually use it, but the others will have to stay. Do you know if mercurial has support for a concept similar to "external repositories" found in other revision control systems ? One game that can be played for a scenario like this is to check sources/tests into a central directory/repository then add an external directive within any directories that need to use it. This allows for central maintenance w/o the chance of any checked in copies going stale.
(In reply to comment #1) > There are two copies of these files because js/src is buildable as a > standalone project separate from the rest of the Mozilla client. > > We should be able to remove js/src/build/unix/uniq.pl since js/src doesn't > actually use it, but the others will have to stay. Would it make any sense to setup an isolated tools directory in the sandbox for scripts like these so they could be shared across multiple directories w/o having to be copied or duplicated ?
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.