Commit Graph

2335 Commits

Author SHA1 Message Date
Ryan VanderMeulen
71d43e7c12 Merge inbound to m-c. a=merge 2016-08-30 09:52:55 -04:00
Axel Hecht
202629c54d bug 1291275, sys.stdout is utf-8 in mach, don't double-encode, r=glandium
MozReview-Commit-ID: ISozaWZZB1h

--HG--
extra : rebase_source : 4de8c46ac5db09cf85f2e13648ff030212c043c1
2016-08-29 15:07:19 +02:00
Wei-Cheng Pan
6b92f8c14a Bug 1298775 - Support mozilla::StyleSheetHandle::RefPtr in gdb pretty printer. r=tbsaunde
MozReview-Commit-ID: 77jCHNGbFZ4

--HG--
extra : rebase_source : 2c5b907c9bdd319a64df217825b105a077abe547
2016-08-29 18:27:42 +08:00
Ryan VanderMeulen
520acfd195 Merge inbound to m-c. a=merge 2016-08-25 08:10:52 -04:00
Andrew Halberstadt
ae1bcceeda Bug 1297699 - Mozlint tests should run with test directory as the "project root", r=smacleod
MozReview-Commit-ID: 9sbhlc11YF5

--HG--
extra : rebase_source : dee2bc4820374ca833f8351de72743f8d5a95aec
2016-08-24 09:55:04 -04:00
Mike Hommey
b65bccd9ce Bug 1276003 - Move --enable-necko-protocols to python configure. r=chmanchester
--HG--
extra : rebase_source : 6187c1a382b240e2fa01f38f4c739000d5f177ce
2016-08-18 09:57:06 +09:00
Andrew Halberstadt
ed73940aa9 Bug 1288425 - Make sure we skip invalid extensions when linting with --rev or --workdir, r=smacleod
Some linters, such as flake8, will lint invalid file extensions if you explicitly pass them in. E.g,
|flake8 foobar.js| will result in flake8 attempting to lint a JS file. This is a problem because passing
in files explicitly is exactly what the --rev/--workdir options do. If a developer modifies a JS file
then runs |mach lint -l flake8 -w|, that JS file will get linted.

To prevent this, mozlint needs to handle file extensions instead of relying on the underlying linter to
do it. This patch adds an "extensions" config option to the LINTER dict, and will filter these files out
as part of the 'filterpaths' steps.

MozReview-Commit-ID: KYhC6SEySC3

--HG--
extra : rebase_source : 6fea2942b2db1bea7deca1d6738546362b6ebd65
2016-08-09 16:24:04 -04:00
Andrew Halberstadt
797aa910b7 Bug 1294802 - Improve color handling in mozlint stylish formatter, r=jgraham
This will make specifying terminal colours cleaner and provide fallbacks for terminals
with only 8 colours. It also tweaks the 'grey' color to match an update to the eslint
stylish formatter.

MozReview-Commit-ID: KYhC6SEySC3

--HG--
extra : rebase_source : 8d3242edc54bf6505aa2e60cdb08cb0dd9743dd3
2016-07-19 11:54:04 -04:00
Mike Hommey
f97add6317 Bug 1296503 - Switch config.status to unicode literals. r=ted
Ironically, the first thing we do with those unicode literals is convert
them to byte strings because the build backends don't like them yet.
2016-08-24 07:32:52 +09:00
Mike Hommey
31a17a020e Bug 1296503 - Add an indented_repr function to mozbuild.util. r=ted 2016-08-24 07:32:51 +09:00
Myk Melez
3050b7932b Bug 1296798 - set depth to chrome_src for refs in common.gypi; r=ted
MozReview-Commit-ID: EJTQNk6dbJ1
2016-08-23 14:58:27 -07:00
Myk Melez
1895887f26 Bug 1296798 - specify root_targets; r=ted
MozReview-Commit-ID: 6Ip87xChI8o
2016-08-23 14:58:23 -07:00
Gregory Szorc
579fbb5cf2 Bug 1290201 - Don't clobber .mozbuild directory by default; r=ted
.mozbuild/last_log.json is opened by the process doing the deleting.
On Windows, you can't delete an opened file.

So stop clobbering the .mozbuild directory.

This directory only holds non-essential artifacts from mach/build
invocations. I don't think keeping it around will break anything.

MozReview-Commit-ID: 9b0AC2ywAAZ

--HG--
extra : rebase_source : 9236e3e282d1db2595e8b36353008bc98e2ae6cf
2016-08-19 11:11:48 -07:00
Mike Hommey
885b56f5f4 Bug 1296502 - Serialize lists when preparing a context for the preprocessor in build backends. r=gps
Some substs values are lists, and some CONFIGURE_SUBST_FILES use them,
and don't expect the substitution to use a pythonic expression of the
value. So serialize those lists.

--HG--
extra : rebase_source : 848962c326236607609bca2b92180c8f6f4ad079
2016-08-19 11:33:18 +09:00
Mike Hommey
ce060d48bf Bug 1257049 - Stop spawning a separate process for config.status from configure.py. r=gps
--HG--
extra : rebase_source : c3a76c32eaca7a9a192e239ac143174d599fb28c
2016-08-19 11:11:57 +09:00
Ryan VanderMeulen
01c4e8cc1b Merge inbound to m-c. a=merge 2016-08-19 09:52:53 -04:00
Wes Kocher
a58f8b89a0 Merge m-c to inbound, a=merge 2016-08-18 16:32:58 -07:00
Andrew Halberstadt
8c3bcff5a6 Bug 1289805 - Properly normalize all paths so they are absolute, r=smacleod
It's important to use absolute paths so lint errors for the same files don't show up in two
different places. For example, eslint will absolutize a relative path, whereas flake8 will
not.

This patch also makes sure all include/exclude paths are joined to the mozlint 'root' that
was previously calculated from vcs.

MozReview-Commit-ID: KYhC6SEySC3

--HG--
extra : rebase_source : 9b88ee70a997d3f7b6cc0eb849e47931d5726f20
2016-07-19 13:09:38 -04:00
Andrew Halberstadt
560ce6a254 Bug 1289805 - Resolve vcs arguments directly in LintRoller class, r=smacleod
Previously, vcs related stuff was resolved in the cli.py module. But it's possible
for consumers to bypass the cli and instantiate a LintRoller directly. In fact this
is what the mozlint tests do.

Now that we always try to find the vcs root, calling into vcs is no longer optional.
This patch moves the VCSFiles class to a new vcs.py module and makes LintRoller
responsible for instantiating it instead of cli.py.

MozReview-Commit-ID: 5yA3gDZ1UGM

--HG--
extra : rebase_source : 96adc0ca01e8220b0432b64c96c478fc526db756
extra : source : 709c1e521ad3eb466c3434000aed7f71ebf37365
2016-08-10 10:21:43 -04:00
Andrew Halberstadt
ce3f82ffbe Bug 1289805 - Ensure the VCSFiles class returns paths that have been absolutized to the repository root, r=smacleod
This makes sure we return absolute paths from the VCSFiles class. This is done so we don't accidentally normalize
the relative paths onto $CWD in the event the relative path is valid in both places.

MozReview-Commit-ID: 2QIuR2YqFos

--HG--
extra : rebase_source : 2e82b4a5cf9a18856bbcb8d04fdc916ff7e72deb
2016-08-09 14:49:41 -04:00
Andrew Halberstadt
64bfc88f52 Bug 1289805 - Refactor filterpaths to accept all lintargs, r=smacleod
This makes it easier to pass configuration to the filterpaths method. In
the future, 'root' and 'extensions' will both be used here.

MozReview-Commit-ID: KYhC6SEySC3

--HG--
extra : rebase_source : 19ddf511ebd24a1a6c21f7c06b67ab64e78e7903
2016-08-09 15:29:49 -04:00
Wes Kocher
45575a7f86 Merge m-c to autoland, a=merge
a=release for the webidl hook for a comment-only change

--HG--
extra : amend_source : e590e515ab273d097f88b35be0e5c999502ebdf4
2016-08-16 22:07:30 -07:00
Wes Kocher
48b8d407c8 Merge inbound to central, a=merge
a=release to get around the webidl hook for a comment-only change

--HG--
extra : amend_source : f7e57101e1a25d3cf3536a256898ec2a21c54b38
2016-08-16 17:05:30 -07:00
Gregory Szorc
2562138ede Bug 1291944 - Verify makensis binary is 32-bits; r=glandium
This required implementing a utility function to resolve the binary
type. I used GetBinaryTypeW via ctypes because this seems the fastest.
I arbitrarily limited the function to testing 32-bit and 64-bit Windows
executables because hopefully those are the only executables we'll
ever encounter. We can expand the binary detection later, if needed.
This includes support for running on non-Windows platforms.

MozReview-Commit-ID: CYwyDWQrePc

--HG--
extra : rebase_source : 8fd7ca7f253d9e9e18d64784652a5ff934ad2272
2016-08-15 18:11:48 -07:00
Towkir Ahmed
63867da04a Bug 1284887 - Replaced references to mxr.mozilla.org in the codebase with dxr.mozilla.org r=dolske
a=release to get around a hook that's catching these comment-only idl changes

--HG--
extra : rebase_source : a7353680777fd2eeea24c9993f9937bbbcfb9e4f
2016-08-15 17:28:05 -07:00
Mike Hommey
c6d1e73834 Bug 1294585 - Move --with-*-keyfile options to python configure. r=chmanchester 2016-08-16 08:32:51 +09:00
Wes Kocher
d602abb016 Merge inbound to central, a=merge 2016-08-15 14:20:38 -07:00
Gregory Szorc
46ad65f8b8 Bug 1293868 - Write mozinfo.json deterministically; r=glandium
And with indentation so it is easier for humans to read.

MozReview-Commit-ID: Kkd6vmfLNUf

--HG--
extra : rebase_source : 9f2b4ad2223f361dd6dd1ec9cdda71bd5a8560e3
2016-08-09 19:11:54 -07:00
Nathan Hakkakzadeh
6e14fdc87d Bug 1292715 - Added installer source code for MSYS2 and ConEmu. r=gps
Also, is a ConEmu preferences file which automatically points a newly installed ConEmu to the newly installed MSYS2.

MozReview-Commit-ID: FBeMat4SYjK

--HG--
extra : rebase_source : 83d8f03a6cc011215fe58745c93afdf90162dc58
2016-08-10 15:30:07 -07:00
Wes Kocher
88bc8189f9 Merge m-c to autoland, a=merge 2016-08-15 14:54:25 -07:00
Mike Shal
355501af0c Bug 1294510 - cleanup CompileDB backend; r=glandium
MozReview-Commit-ID: Lj4ahLzZJh9

--HG--
extra : rebase_source : 3a2ce98147327094b2a65429a64ee03b67ef0580
2016-08-11 15:50:31 -04:00
Gregory Szorc
4a0f2d02bc Bug 974281 - Do not clobber msvc directory by default; r=ted
The "remove_objdir" method has been rewritten to support partial
clobber. It still defaults to full clobber. But the "full" argument
can be passed as False to limit to a partial clobber where currently
the "msvc" directory (contains Visual Studio files) is not clobbered.

On Windows, there might be a regression with this change because
we'll be invoking N winrm.exe processes and new processes have
a non-trivial overhead on Windows. However, it is hopefully unlikely
that new processes are more overhead than deleting hundreds of thousands
of files.

MozReview-Commit-ID: 7yeMttztwic

--HG--
extra : rebase_source : 646992be199e1059f0b09cf8bed3334085293fe0
2016-03-11 15:11:33 -08:00
Gregory Szorc
303d2ef97a Bug 974281 - Use mozfile.remove since rmtree is deprecated; r=ted
My Python editor told me rmtree has been marked as deprecated. Use
mozfile.remove instead.

MozReview-Commit-ID: FYkXk1fnxvC

--HG--
extra : rebase_source : df392e8832e52501950f09acda208943c9e3d707
2016-03-11 15:08:54 -08:00
Wes Kocher
b1e2d2ad52 Merge m-c to inbound, a=merge 2016-08-12 16:29:24 -07:00
Andrew Sutherland
e921d069dd Bug 1294633 - Implement gdb pretty-printer for mozilla::LinkedList, recognize StaticAutoPtr/StaticRefPtr in smartptr.py. r=tromey 2016-08-12 14:39:02 -04:00
Andrew Sutherland
bca1376ac5 Bug 1294627 - Enhance gdb pretty printer for nsTHashtable to pierce alias templates and handle when it's used as a hashset, like for ManagedTemplate. r=tromey 2016-08-12 14:38:56 -04:00
Elias Probst
fa561f244a Bug 1293234 - Use octal notation for permission modes in the build system; r=gps
As of Python 3, decimal notations of octal values for permission modes
are no longer permitted and will result in a `SyntaxError` exception
(`invalid token`).

Using the proper octal notation which is also Python 2.7 compatible will
fix this issue.

--HG--
extra : rebase_source : 2e897c51f04ad0ee69071f84b98df224f3af72d3
2016-08-08 13:45:17 +02:00
Mike Hommey
77ee4f3ce4 Bug 1292463 - Move MOZ_C{,XX}_SUPPORTS_WARNING to python configure. r=chmanchester 2016-08-10 10:50:01 +09:00
Mike Hommey
7a80b4e7ee Bug 1292463 - Rename compilechecks.configure and test_header_checks.py. r=chmanchester
to, respectively, compile-checks.configure and test_compile_checks.py.


--HG--
rename : build/moz.configure/compilechecks.configure => build/moz.configure/compile-checks.configure
2016-08-10 10:49:59 +09:00
Timothy Guan-tin Chien
20b7d72944 Bug 1252976 - Follow up, Update Note on Artifact Mode, r=nalexander
Contains a few sentences copied from MDN.

MozReview-Commit-ID: 2wgcCNiWkWw

--HG--
extra : transplant_source : %7B%A2%10%88%83k%AC%AE%D3%A4H/pL%E6%B9%BE-9%5E
2016-08-08 17:54:24 +08:00
Sambuddha Basu
76f610476a Bug 1252976 - Offer |mach artifact| builds in |mach bootstrap| for non-Fennec builds r=nalexander
MozReview-Commit-ID: 2lbrORiTjwH

--HG--
extra : transplant_source : %97%1C%12N%1D%B8eQ%94%F2%A1%26%AA%3F%24X%AA2%AC%12
2016-08-08 17:30:37 +08:00
Carsten "Tomcat" Book
d9e0b4c565 merge mozilla-inbound to mozilla-central a=merge 2016-08-09 15:44:51 +02:00
Mike Hommey
afa6c4d5f3 Bug 1292046 - Add a check that the compiler works with -c out of the box. r=chmanchester
The base compiler check in python configure does some preprocessing,
which ensures the compiler works to some extent. Autoconf used to have
a more complete test, doing a compile/link. We do have plenty of tests
afterwards that do that anyways, but it's better if we fail early if
the toolchain fails somehow.

This refactors try_compile such that the *_compiler variable themselves
can be used to trigger compiler tests. Eventually, we'll want something
similar for preprocessing and possibly other invocations.

This also removes similar tests from build/autoconf/toolchain.m4.

--HG--
extra : rebase_source : c60d1d6e39b6bd2a377516687affd9b8932ebc12
2016-08-04 15:51:47 +09:00
Mike Hommey
6bdf5756ec Bug 1292046 - Add language to the compiler namespace. r=chmanchester
--HG--
extra : rebase_source : c258416a1cec59627e27d4f59e40f1425464f9c5
2016-08-04 16:24:29 +09:00
Mike Hommey
69e768cba4 Bug 1292439 - Use a fake _winreg module during tests. r=chmanchester
While on automation, there is no MSVC to find through the registry, the
story is different on local builds, and that can interfere with tests.

Specifically, it breaks test_toolchain_configure.py because it's not
expecting the registry to provide a valid path to an almost valid
compiler, and then fails because that compiler doesn't match the
expected target CPU.

And because build/moz.configure/toolchain.configure also affects the PATH
environment variable, subsequent tests end up failing even earlier
because executing the empty mozconfig with the modified environment then
fails because of the unicode value of PATH.

This change implements enough of _winreg to make the get_registry_values
function return nothing.

--HG--
extra : rebase_source : f70e40ddabaed1197f6cddce67832bb112f1969d
2016-08-05 14:16:35 +09:00
Mike Shal
035d0ca1a0 Bug 1293385 - Remove idls attribute from BackendMakeFile; r=gps
MozReview-Commit-ID: 4X9iIJArkYg

--HG--
extra : rebase_source : e31ff98109e0f25fadc6f17c685302a2252b214a
2016-08-05 13:23:44 -04:00
Mike Hommey
50a4467ec3 Bug 1282256 - Make MozbuildObject.resolve_config_guess an instance method. r=gps
The last use that didn't have an existing instance was just removed.

--HG--
extra : rebase_source : 81f99e8a8d8046c9741e8a27072a6c4773fa7292
2016-08-04 13:43:47 +09:00
Mike Hommey
e6fb85ebb3 Bug 1282256 - Make MozbuildObject.resolve_mozconfig_topobjdir an instance method. r=gps
The only use that didn't have an existing instance was just removed.

--HG--
extra : rebase_source : 47891a9bd5c6ecef31d8a2c7053c1ae8efe36fa5
2016-08-04 13:41:57 +09:00
Mike Hommey
ad5e3fa4c4 Bug 1282256 - Remove MozbuildObject._config_guess. r=gps
Back when it was added, it was used, but it is not anymore, outside
test_base.py.

--HG--
extra : rebase_source : f0b9a4dab2985e89e9950eda774ae853c7de764c
2016-08-04 10:07:56 +09:00
Mike Hommey
6168f0df5b Bug 1282256 - Avoid loading mozconfig in MozbuildObject.from_environment. r=gps
We've been reading the mozconfig in MozbuildObject.from_environment to
check whether the mozconfig topobjdir matches the detected topobjdir.

Since bug 1278415, everything using the buildconfig python module now
calls MozbuildObject.from_environment, which reads the mozconfig. A lot
of things to that during the build. But none of them actually need the
data from the mozconfig, and the topobjdir match test has been breaking
things randomly on multiple occasions.

The topobjdir match test, however, really only needs to happen once:
when a mach command starts. So we can move the test to MachCommandBase,
where it belongs, and anything actively using MozbuildObject.mozconfig
will have the mozconfig read, but everything else won't.

On a Linux64 opt build, this brings down the number of times the
mozconfig is read during `mach build` from 979 to 9.

--HG--
extra : rebase_source : 6b340f1fcf73a3c3987033c37f8f14ef06a44f04
2016-08-04 11:17:41 +09:00