Commit Graph

1551 Commits

Author SHA1 Message Date
Max Moiseev
02006f20bc Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-09 16:05:03 -08:00
practicalswift
479d7929fd Merge pull request #1595 from practicalswift/py3k-compatible-except
[Python] Use Py3k compatible "except" format
2016-03-09 23:16:47 +01:00
practicalswift
f4e1e458a0 Merge pull request #1594 from practicalswift/fix-old-style-classes
[Python] Use new style class definitions: "class A" → "class A(object)"
2016-03-09 23:16:26 +01:00
Michael Gottesman
71c591b86e [lto] When determining the number of lto threads to use, take the minimum of ${BUILD_JOBS} and a heuristic that scales with the memory size of the machine.
This ensures that even if we have a machine with a huge amount of ram, we
respect ${BUILD_JOBS}.
2016-03-09 13:31:35 -08:00
Michael Gottesman
91f106e199 [leak-checker] Make sure to actually enable the leak checker when compiling with the leak checker presets.
Fixes refactoring error in 14c0a3e3f6fd61d36b795b4e7a9bf820d1aafb45...

*shakes head*.
2016-03-09 09:44:29 -08:00
practicalswift
6641eba4de [Python] Use Py3k compatible "except" format 2016-03-09 10:04:13 +01:00
Michael Gottesman
14c0a3e3f6 Refactor the leaks runner preset into stdlib-R and stdlib-RA presets. 2016-03-09 01:02:23 -08:00
Dmitri Gribenko
c267ec9f31 Merge pull request #1589 from apple/add-iphoneos-armv7s
Allow swift to be built for iphoneos-armv7s, a variation on armv7,
2016-03-09 00:55:24 -08:00
practicalswift
c69ffe4eb6 [Python] Use new style class definitions: "class A" → "class A(object)" 2016-03-09 09:42:42 +01:00
practicalswift
30b66ea036 Merge pull request #1584 from practicalswift/python-3-compatible-print
[Python] Use Py3k compatible print operator: print "foo" → print("foo")
2016-03-09 08:00:49 +01:00
Brian Gesiak
c9000af795 Merge pull request #1526 from practicalswift/fix-pep8-violations-ii
[Python] Fix five classes of PEP-8 violations (E101/E111/E128/E302/W191)
2016-03-08 23:55:46 -05:00
Jason Molenda
1f31fff611 Allow swift to be built for iphoneos-armv7s, a variation on armv7,
used with the Apple A6 and later 32-bit devices.
2016-03-08 16:49:31 -08:00
practicalswift
0fd0c48648 [Python] Use Py3k compatible print operator: print "foo" → print("foo") 2016-03-08 23:10:52 +01:00
Max Moiseev
1fae0d1325 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-08 12:48:48 -08:00
practicalswift
4b86ad2d9f Merge pull request #1571 from practicalswift/fix-blind-excepts
[Python] Fix blind "except:" statements
2016-03-08 20:29:56 +01:00
practicalswift
ebccd4f47b Merge pull request #1576 from practicalswift/not-implemented-error
[Python] NotImplemented → NotImplementedError
2016-03-08 20:12:44 +01:00
practicalswift
38a9ce18b7 Merge pull request #1577 from practicalswift/fix-bug-in-swift-build-support
[Python] Fix AttributeError: CalledProcessError.strerror does not exist
2016-03-08 20:03:53 +01:00
Brian Gesiak
792560fe5e [gardening][build-script] Fix XCTest comment typo 2016-03-08 13:16:10 -05:00
Brian Gesiak
b7973a99e5 Merge pull request #1556 from modocache/build-script-xctest-on-foundation
[build-script] Build Foundation before XCTest [AsyncXCTest 4/6]
2016-03-08 10:57:52 -05:00
practicalswift
faf6614d60 [Python] Fix AttributeError: CalledProcessError.strerror does not exist 2016-03-08 16:02:53 +01:00
practicalswift
e8c0600727 [Python] NotImplemented → NotImplementedError
From the Python documentation:
* NotImplemented: "Special value which can be returned by the 'rich comparison'
  special methods (__eq__(), __lt__(), and friends), to indicate that the
  comparison is not implemented with respect to the other type."
* NotImplementedError: "This exception is derived from RuntimeError. In user
  defined base classes, abstract methods should raise this exception when they
  require derived classes to override the method."
2016-03-08 13:56:01 +01:00
practicalswift
e2de5c2202 [Python] Fix blind except: statements
Make sure all Python code in the repo specifies which exceptions to
catch when using `except:`.

Regressions can be catched using `flake8-blind-except` going forward.
2016-03-08 11:08:28 +01:00
practicalswift
265835fdfc [Python] Use consistent import ordering for Python code
Ordering used:
1.) standard library imports
2.) third party imports
3.) local package imports

Each group is individually alphabetized.
2016-03-07 23:25:16 +01:00
practicalswift
183da818df [Python] Fix five classes of PEP-8 violations (E101/E111/E128/E302/W191)
* E101: indentation contains mixed spaces and tabs
* E111: indentation is not a multiple of four
* E128: continuation line under-indented for visual indent
* E302: expected 2 blank lines, found 1
* W191: indentation contains tabs
2016-03-07 22:36:23 +01:00
practicalswift
f72f4a4831 Merge pull request #1551 from practicalswift/fix-comment-pep8
[Python] Improve block comment consistency
2016-03-07 21:59:28 +01:00
Max Moiseev
7fe6916bf6 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-07 12:10:47 -08:00
practicalswift
50f8abe6f5 Merge pull request #1555 from kevinwcyu/fix-typos-whitespaces
[gardening] Fix typos "cant" → "can't", "dont" → "don't".
2016-03-06 20:18:18 +01:00
Brian Gesiak
453f8e6626 [build-script] Build Foundation before XCTest
https://github.com/apple/swift-corelibs-xctest/pull/43 introduces
a dependency between XCTest and Foundation. Modify the build script
in order to properly build all products:

- Build Foundation before XCTest, then link Foundation when building
  XCTest by using new '--foundation-build-dir' option.
- Link Foundation when testing SwiftPM by using new '--foundation'
  option.
- On Linux, ensure Foundation is built when XCTest is.
2016-03-06 01:12:15 -05:00
Kevin Yu
8f193c856e [gardening] Fix typos "cant" -> "can't", "dont" -> "don't" 2016-03-06 00:25:14 +00:00
practicalswift
04afd6e640 [Python] Improve consistency: "block comment should start with '# '" (PEP-8) 2016-03-05 14:03:16 +01:00
Brian Gesiak
612d6aca0e [build-script] Remove obsolete PM --build-tests
The `swiftpm/Utilities/bootstrap --build-tests` parameter was deprecated in ae9121960e and is no longer used. Remove it to reduce confusion.
2016-03-04 23:42:32 -08:00
Dmitri Gribenko
80db9fb1f3 Merge pull request #1506 from modocache/build-script-xctest-fixmes
[build-script] Only build XCTest once
2016-03-04 21:51:55 -08:00
Brian Gesiak
25f9489a4e [build-presets] Add corelibs-xctest CI preset
This preset will be used to test swift-corelibs-xctest on Apple CI.
It's also pretty handy for contributors to swift-corelibs-xctest.
2016-03-03 14:47:53 -08:00
Max Moiseev
cf4bafe9e3 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-03 13:22:03 -08:00
Slava Pestov
1fef536d62 resilient-test-helper: Add --no-backward-deployment flag
This is used when the application changes in an incompatible way.
2016-03-03 07:37:00 -08:00
Brian Gesiak
73cccadd3e Merge pull request #1396 from modocache/build-script-host-test
[SR-237] Move SKIP_TEST_* arguments to Python
2016-03-03 00:02:36 -08:00
Brian Gesiak
5bc27497d8 Merge pull request #1512 from practicalswift/snake-case-local-variables
[Python] Improve Python consistency: "variable in function should be lowercase" (N806)
2016-03-02 14:23:03 -08:00
Michael Gottesman
abdd14f718 Merge pull request #1508 from practicalswift/usr-bin-env-bash
[scripts] Use "#!/usr/bin/env bash" instead of "#!/bin/bash"
2016-03-02 13:03:18 -08:00
practicalswift
e33f1747a9 [Python] Improve Python consistency: "variable in function should be lowercase" (N806)
The repo contains roughly 80 Python scripts. "snake_case" naming is used for
local variables in all those scripts. This is the form recommended by the PEP 8
naming recommendations (Python Software Foundation) and typically associated
with idiomatic Python code.

However, in nine of the 80 scripts there were at least one instance of
"camelCase" naming prior to this commit.

This commit improves consistency in the Python code base by making sure that
these nine remaining files follow the variable naming convention used for
Python code in the project.

References:
* PEP 8: https://www.python.org/dev/peps/pep-0008/
* pep8-naming: https://pypi.python.org/pypi/pep8-naming
2016-03-02 18:56:47 +01:00
Brian Gesiak
729e54f347 [build-script] Only build XCTest once
Prior to https://github.com/apple/swift-corelibs-xctest/pull/57 and
https://github.com/apple/swift-corelibs-xctest/pull/58, the
swift-corelibs-xctest build script did not provide a way an already
built XCTest.so to be tested or installed. As a result, the Swift
build script would build XCTest several times.

For example, the following invocation would build XCTest three separate
times:

```
$ utils/build-script --xctest --test -- --install-xctest
```

Modifications to the XCTest build script now allow a prebuilt XCTest to
be tested (via the `build_script.py test` subcommmand) and installed
(via the `build_script.py install` subcommand). Use these in the Swift
build script to build XCTest only once, then test and install the built
version.

Also, explicitly disable XCTest installation on OS X. XCTest's
`build_script.py` only supports non-Darwin platforms, so running
`utils/build-script --xctest -- --install-xctest` on OS X used to cause
the build script to fail because of how that script invokes `swiftc`.
It now fails with an explicit error indicating `--install-xctest` is
unsupported.
2016-03-02 03:52:45 -05:00
practicalswift
621bb365e7 [scripts] Use "#!/usr/bin/env bash" instead of "#!/bin/bash" 2016-03-02 09:44:23 +01:00
Daniel Duan
f14182a2b7 [Utils] replace #line with #setline in utils/line-directive 2016-03-01 23:08:54 -08:00
Daniel Duan
0f53348304 Merge pull request #1501 from dduan/SE-0034-pr
[Parser][SE-0034] Replace line directive #line with #setline
2016-03-01 19:44:05 -08:00
Daniel Duan
742c2cf1f3 [gyb] replace #line with #setline in default arguments and examples 2016-03-01 19:12:31 -08:00
Michael Gottesman
da77ba5e68 On the flto bot enable using full LTO instead of just swift only LTO. 2016-03-01 16:39:51 -08:00
Michael Gottesman
11c8a7c674 [cmake] Add support for specifying the number of parallel link jobs for swift.
I am going to use the link job for limiting swift lto compile time.

The reason not to use the same variables as LLVM (i.e. LLVM_PARALLEL_LINK_JOBS)
is that Swift since it is compiling more IR may have a larger memory
representation implying less parallel linking jobs than LLVM can be used on
bots.
2016-03-01 16:33:53 -08:00
Michael Gottesman
9d85904c18 [cmake] Work around lto cmake bug in cmake 3.4.0.
http://public.kitware.com/pipermail/cmake-developers/2015-November/026993.html

We check for this in build-script-impl and if you are running such a version,
special flags are passed in to work around the issue. If you do not have this verison of cmake, this change should not affect you in any way.

This will be fixed in cmake 3.4.1.
2016-03-01 15:01:19 -08:00
Michael Gottesman
d2a26879a7 [pgo] Add a script for gathering up *.profraw files from a swift run. 2016-03-01 14:22:12 -08:00
Max Moiseev
859db53d87 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-01 12:56:26 -08:00
Dmitri Gribenko
c814676cb8 Merge pull request #1431 from practicalswift/cmake-fixes
[CMakeLists] Remove unused SWIFT_INCLUDE_OUTPUT_INTDIR + comment out unnecessary logic
2016-03-01 11:32:36 -08:00