Commit graph

223 commits

Author SHA1 Message Date
Alex Crichton
8552a74775 Bring compiletest/rustpkg/driver up to date on std vs core 2013-07-04 16:30:48 -07:00
Huon Wilson
de0d696561 Remove vec::{filter, filtered, filter_map, filter_mapped}, replaced by iterators. 2013-07-04 00:46:49 +10:00
bors
55f155521d auto merge of #7523 : huonw/rust/uppercase-statics-lint, r=cmr
Adds a lint for `static some_lowercase_name: uint = 1;`. Warning by default since it causes confusion, e.g. `static a: uint = 1; ... let a = 2;` => `error: only refutable patterns allowed here`.
2013-07-03 04:31:50 -07:00
bors
e482856d76 auto merge of #7409 : alexcrichton/rust/threadsafe, r=cmr
@catamorphism, this re-enables threadsafe rustpkg tests, @brson this will fail unless the bots have LLVM rebuilt, so this is a good indicator of whether that happened or not.
2013-07-01 11:29:24 -07:00
Alex Crichton
5183a6cc6c Turn on using LLVM threadsafely 2013-07-01 08:30:05 -07:00
Huon Wilson
c437a16c5d rustc: add a lint to enforce uppercase statics. 2013-07-01 17:52:57 +10:00
bors
07feeb95c5 auto merge of #7487 : huonw/rust/vec-kill, r=cmr
Continuation of #7430.

I haven't removed the `map` method, since the replacement `v.iter().transform(f).collect::<~[SomeType]>()` is a little ridiculous at the moment.
2013-06-30 21:14:13 -07:00
Brian Anderson
a766a955a9 Bump version from 0.7-pre to 0.7 2013-06-30 16:36:48 -07:00
Brian Anderson
ca835f482c rustpkg: Ignore a test that's failing on the dist-snap bot 2013-06-30 13:12:15 -07:00
Huon Wilson
a890c2cbf1 Convert vec::{rposition, rposition_elem, position_elem, contains} to methods. 2013-06-30 21:15:24 +10:00
Corey Richardson
1662bd371c Great renaming: propagate throughout the rest of the codebase 2013-06-29 11:20:02 -04:00
bors
a229c980c8 auto merge of #7439 : catamorphism/rust/cut-rustpkg-output, r=catamorphism
Closes #7250
2013-06-29 00:49:45 -07:00
Jordi Boggiano
a0c31ece9d Remove unused variable 2013-06-29 01:00:13 -04:00
Patrick Walton
f25f466afe librustc: Fix even *more* merge fallout! 2013-06-28 10:47:59 -04:00
Patrick Walton
bb830558d1 librustc: Fix merge fallout and test cases. 2013-06-28 10:44:17 -04:00
Patrick Walton
03ab6351cc librustc: Rewrite reachability and forbid duplicate methods in type implementations.
This should allow fewer symbols to be exported.
2013-06-28 10:44:16 -04:00
bors
887ae82382 auto merge of #7397 : catamorphism/rust/rustpkg_path, r=catamorphism
r? @brson Unfortunately, the main test for this is ignored due to #7071.

Closes #5682
2013-06-28 02:58:34 -07:00
Tim Chevalier
ea62fd1090 rustpkg: Implement RUST_PATH
Unfortunately, the main test for this is ignored due to #7071.

Closes #5682
2013-06-27 21:41:03 -07:00
Tim Chevalier
3dfbc5a9c4 rustpkg: Silence extra output from rustpkg tests
Closes #7250
2013-06-27 16:28:34 -07:00
bors
63afb8ccc8 auto merge of #7430 : huonw/rust/vec-kill, r=thestinger 2013-06-27 15:01:58 -07:00
bors
36527360a6 auto merge of #7429 : Blei/rust/delete-shared, r=huonw
Mostly just low-haning fruit, i.e. function arguments that were @ even
though & would work just as well.

Reduces librustc.so size by 200k when compiling without -O, by 100k when
compiling with -O.
2013-06-27 08:28:37 -07:00
Philipp Brüschweiler
7295a6da92 Remove many shared pointers
Mostly just low-haning fruit, i.e. function arguments that were @ even
though & would work just as well.

Reduces librustc.so size by 200k when compiling without -O, by 100k when
compiling with -O.
2013-06-27 15:06:19 +02:00
bors
c440743dcc auto merge of #7403 : catamorphism/rust/package-scripts, r=brson
r? @brson (or @graydon if available) rustpkg/api.rs provides functions intended for package scripts to call.
It will probably need more functionality added to it later, but this is
a start.

Added a test case checking that a package script can use the API.

Closes #6401
2013-06-27 06:01:30 -07:00
Huon Wilson
d0512b1055 Convert vec::[mut_]slice to methods, remove vec::const_slice. 2013-06-27 22:36:09 +10:00
bors
f1e09d6f1f auto merge of #7420 : mozilla/rust/rollup, r=thestinger 2013-06-26 23:07:41 -07:00
bors
32adc0e730 auto merge of #7382 : msullivan/rust/cleanup, r=bblum 2013-06-26 15:13:37 -07:00
Kevin Ballard
0ae203a779 Refactor extra::term a bit
Move all the colors into a nested mod named color instead of prefixing
with "color_".

Define a new type color::Color, and make this a u16 instead of a u8 (to
allow for easy comparisons against num_colors, which is a u16).

Remove color_supported and replace it with num_colors.

Teach fg() and bg() to "dim" bright colors down to the normal intensity
if num_colors isn't high enough.

Remove unnecessary copies, and fix a bug where a terminfo parse failure
would try to use the wrong error and end up failing.
2013-06-26 18:07:17 -04:00
Tim Chevalier
3789433b4f rustpkg: Begin allowing package scripts to call the default build logic
rustpkg/api.rs provides functions intended for package scripts to call.
It will probably need more functionality added to it later, but this is
a start.

Added a test case checking that a package script can use the API.

Closes #6401
2013-06-25 22:29:38 -07:00
Michael Sullivan
3c86711452 Fix some tests in rustpkg to not pollute the build directory. Closes #7278. 2013-06-25 10:17:33 -07:00
Alex Crichton
42b44b21b1 Rename all files with the 'rc' extension 2013-06-25 08:55:15 -07:00
Daniel Micay
d2e9912aea vec: remove BaseIter implementation
I removed the `static-method-test.rs` test because it was heavily based
on `BaseIter` and there are plenty of other more complex uses of static
methods anyway.
2013-06-23 02:05:20 -04:00
Daniel Micay
49c74524e2 vec: rm old_iter implementations, except BaseIter
The removed test for issue #2611 is well covered by the `std::iterator`
module itself.

This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-21 03:20:22 -04:00
James Miller
82ba030a4f Ignore rustpkg tests 2013-06-20 18:07:06 +12:00
bors
eac0200f18 auto merge of #7148 : catamorphism/rust/rustpkg_tests, r=graydon
r? @graydon Automate more tests described in the commands.txt file,
and add infrastructure for running them. Right now, tests shell
out to call rustpkg. This is not ideal.

Goes part of the way towards addressing #5683
2013-06-15 08:12:57 -07:00
bors
83d44f87e5 auto merge of #7125 : alexcrichton/rust/rusti-issues, r=brson
This un-reverts the reverts of the rusti commits made awhile back. These were reverted for an LLVM failure in rustpkg. I believe that this is not a problem with these commits, but rather that rustc is being used in parallel for rustpkg tests (in-process). This is not working yet (almost! see #7011), so I serialized all the tests to run one after another.

@brson, I'm mainly just guessing as to the cause of the LLVM failures in rustpkg tests. I'm confident that running tests in parallel is more likely to be the problem than those commits I made.

Additionally, this fixes two recently reported issues with rusti.
2013-06-15 01:04:05 -07:00
Tim Chevalier
e3c4104d74 rustpkg: Write more automated tests
Automate more tests described in the commands.txt file,
and add infrastructure for running them. Right now, tests shell
out to call rustpkg. This is not ideal.
2013-06-14 22:46:01 -07:00
Daniel Micay
585f5f7f79 add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
Alex Crichton
9c3b1cbc19 Resolve LLVM crashing in rustpkg tests 2013-06-13 22:53:30 -07:00
Huon Wilson
096f6f56a8 Use @str instead of @~str in libsyntax and librustc. Fixes #5048.
This almost removes the StringRef wrapper, since all strings are
Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts
several things to be &'static str (the lint table and the intrinsics
table).

There are many instances of .to_managed(), unfortunately.
2013-06-13 10:20:52 +10:00
Huon Wilson
eecbe5556b Silence some warnings. 2013-06-12 12:21:05 +10:00
Huon Wilson
9e60e2e297 std: convert str::replace to a method. 2013-06-12 12:21:04 +10:00
Huon Wilson
efc71a8bdb std: unify the str -> [u8] functions as 3 methods: .as_bytes() and .as_bytes_with_null[_consume]().
The first acts on &str and is not nul-terminated, the last two act on strings
that are always null terminated (&'static str, ~str and @str).
2013-06-12 12:21:04 +10:00
bors
e06579bc09 auto merge of #7056 : alexcrichton/rust/issue-4727, r=catamorphism
Closes #4727
2013-06-11 17:22:46 -07:00
Alex Crichton
78404af882 Ignore the test_package_request_version test for now 2013-06-11 12:40:53 -07:00
Daniel Micay
004816f4c6 option: remove redundant old_iter impls 2013-06-11 14:06:12 -04:00
Huon Wilson
e8782eeb63 fix tests, remove some warnings 2013-06-11 02:34:14 +10:00
Huon Wilson
ebefe425b9 std: remove str::to_chars 2013-06-11 00:49:19 +10:00
Huon Wilson
ccd0ac59e9 std: remove str::{connect,concat}*. 2013-06-10 23:57:03 +10:00
Huon Wilson
0cfc08d81e std: convert character-based str::find_* to methods. Add .slice_{to,from} methods. 2013-06-10 23:02:54 +10:00
Huon Wilson
ee41ad4168 std: fix compile & test 2013-06-10 23:02:54 +10:00
Huon Wilson
1e8982bdb2 std: replace str::each_split* with an iterator 2013-06-10 23:02:54 +10:00
Tim Chevalier
d92b4358d2 rustpkg: Accept package IDs like github.com/foo/bar#0.3
If the package ID is of the form s#v, where v is a valid version
string, fetch tag v of that package.
2013-06-09 13:05:52 -07:00
Tim Chevalier
53b8352552 rustpkg: Extract version number from git, as per #5684
For now, the test I added just checks that PkgId::new parses the
version number out of a git repo's tags list, where relevant.
2013-06-08 11:59:03 -07:00
Michael Sullivan
8bbf83b62a Clean up a handful of build warnings. 2013-06-06 12:14:41 -07:00
Patrick Walton
16086ecff7 libsyntax: Remove pub impl from the language 2013-06-04 21:45:42 -07:00
bors
8a43b318bf auto merge of #6826 : cmr/rust/terminfo, r=thestinger
This will let *everyone* (non-windows, at least) who can see colors see the glorious colors rustc produces.
2013-06-03 13:34:56 -07:00
Tim Chevalier
c120464be0 rustc/rusti/rustpkg: Infer packages from extern mod directives
This commit won't be quite as useful until I implement RUST_PATH and
until we change `extern mod` to take a general string instead of
an identifier (#5682 and #6407).

With that said, now if you're using rustpkg and a program contains:

extern mod foo;

rustpkg will attempt to search for `foo`, so that you don't have to
provide a -L directory explicitly. In addition, rustpkg will
actually try to build and install `foo`, unless it's already
installed (specifically, I tested that `extern mod extra;` would
not cause it to try to find source for `extra` and compile it
again).

This is as per #5681.

Incidentally, I changed some driver code to infer the link name
from the crate link_meta attributes. If that change isn't ok, say
something. Also, I changed the addl_lib_search_paths field in the
session options to be an @mut ~[Path] so that it can be modified
after expansion but before later phases.
2013-06-01 18:48:07 -07:00
Patrick Walton
5fb254695b Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
Corey Richardson
5311d59023 extra::term: better error handling and win32 compat 2013-05-31 20:02:49 -04:00
Corey Richardson
1f27c6306d rustpkg borrowed pointers 2013-05-31 20:02:49 -04:00
Corey Richardson
cf64324e19 extra::term overhaul 2013-05-31 20:02:49 -04:00
Patrick Walton
206ab89629 librustc: Stop reexporting the standard modules from prelude. 2013-05-29 19:04:53 -07:00
bors
d2957091c4 auto merge of #6733 : alexcrichton/rust/issue-2400, r=brson
Most of the relevant information can be found in the commit messages.

r? @brson - I just wanted to make sure the make changes aren't completely bogus

This would close #2400, #6517, and #6489 (although a run through incoming-full on linux would have to confirm the latter two)
2013-05-29 12:13:49 -07:00
bors
e3e55c5c04 auto merge of #6793 : graydon/rust/drop-ast-before-llvm, r=Aatch 2013-05-29 00:52:47 -07:00
Alex Crichton
ba33472f9f Un-ignore rusti/rustpkg tests on i686 2013-05-28 21:23:42 -05:00
Graydon Hoare
b4a3fe25c6 librustc: drop AST before running LLVM, frees 400mb on a librustc build 2013-05-28 15:31:32 -07:00
Alex Crichton
b04c40bb1c Silence various warnings throughout test modules 2013-05-28 15:27:35 -05:00
gareth
76c31217be Refactor core::run in order to address many of the issues
mentioned in #2625.

This change makes the module more oriented around
Process values instead of having to deal with process ids
directly.

Apart from issues mentioned in #2625, other changes include:
- Changing the naming to be more consistent - Process/process
  is now used instead of a mixture of Program/program and
  Process/process.
- More docs/tests.

Some io/scheduler related issues remain (mentioned in #2625).
2013-05-27 13:50:33 +01:00
Erick Tryzelaar
21c3cf02f0 cleanup warnings from librustpkg 2013-05-23 17:57:08 -07:00
Ted Horst
34cfd2183b more testing fallout from core->std/std->extra move 2013-05-23 15:06:29 -05:00
Patrick Walton
f3723cf7c4 libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra 2013-05-22 21:57:07 -07:00
Patrick Walton
ca9bb2d9ac librustc: Disallow use from reaching into impls or traits.
This can perhaps be restored in the future. For now this is a precursor to
making typedefs work as expected.
2013-05-22 21:57:02 -07:00
bors
73597a5bd5 auto merge of #6657 : sanxiyn/rust/allocation, r=thestinger 2013-05-21 11:40:41 -07:00
Huon Wilson
4045da9f4f syntax/ext: modernise ext_ctxt to be CamelCase and use new. 2013-05-22 00:04:10 +10:00
Seo Sanghyeon
d4724c1a17 Remove unnecessary allocations flagged by lint from rustpkg 2013-05-21 23:00:34 +09:00
Steve Klabnik
d3f70b141a Fix many warnings. 2013-05-19 21:32:32 -07:00
Corey Richardson
cc57ca012a Use assert_eq! rather than assert! where possible 2013-05-19 08:16:02 -04:00
bors
99c7750ca6 auto merge of #6603 : thestinger/rust/whitespace, r=thestinger 2013-05-18 22:55:34 -07:00
Daniel Micay
20ef4238bb reduce the usage of explicit version markers 2013-05-19 00:21:41 -04:00
Daniel Micay
1789174541 minor automated whitespace fixes 2013-05-18 22:40:12 -04:00
Tim Chevalier
e732912954 rustpkg: ignore tests on i686, since they fail 2013-05-15 16:17:13 -07:00
Tim Chevalier
5421bc2942 rustpkg: Reorganize test files 2013-05-15 16:03:45 -07:00
Tim Chevalier
80a7e2644c rustpkg: Tests for well-formed and ill-formed package IDs...
...and cleanup, making how we handle version numbers more rational
(specifically, not passing in a versioned name to rustc
with the -o flag), and removing unused code.
2013-05-14 18:13:45 -07:00
Tim Chevalier
c3875e8c70 rustpkg: Implement URL-like package IDs
This patch implements package IDs like
github.com/catamorphism/test-pkg.

To support such package IDs, I changed the PkgId struct to contain
a LocalPath and a RemotePath field, where the RemotePath reflects
the actual URL and the LocalPath reflects the file name of the cached
copy. Right now, the only difference is that the local path doesn't
contain dashes, but this will change when we implement #6407.

Also, PkgIds now have a short_name field -- though the short name
can be derived from the LocalPath, I thought it was cleaner not to
call option::get() wantonly.
2013-05-14 17:47:39 -07:00
Alex Crichton
2ab1da5b01 Fix rustpkg tests now that they're in a different location 2013-05-14 14:11:30 -04:00
Alex Crichton
ffcc680f9c Fix test fallout from removing vecs_implicitly_copyable 2013-05-14 12:25:19 -04:00
Alex Crichton
9f104d4213 rustpkg: Remove #[allow(vecs_implicitly_copyable)] 2013-05-14 12:23:46 -04:00
Marvin Löbel
04de8f852c Fix cosmetics for fail!() calls 2013-05-14 16:36:24 +02:00
Björn Steinbrink
bdc182cc41 Use static string with fail!() and remove fail!(fmt!())
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
2013-05-14 16:36:23 +02:00
Alex Crichton
2a9a4a81e1 Don't create subprocesses for the rust command
Instead link against the built libraries and directly invoke those.
2013-05-12 17:48:01 -04:00
Alex Crichton
b01a40d459 rustpkg: Use the new for protocol 2013-05-10 02:46:19 -04:00
Patrick Walton
4dc1c2976d libcore: Remove mutable fields from hash 2013-05-08 17:03:58 -07:00
bors
1f65e4a1d5 auto merge of #6230 : thestinger/rust/whitespace, r=catamorphism
I just had `git apply` fix most of them and then did a quick skim over the diff to fix a few cases where it did the wrong thing (mostly replacing tabs with 4 spaces, when someone's editor had them at 8 spaces).
2013-05-04 00:48:37 -07:00
Daniel Micay
86efd97a10 add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
Tim Chevalier
c42f1218a0 rustpkg: Handle sysroot more correctly
In rustpkg, pass around sysroot; in rustpkg tests, set the sysroot
manually so that tests can find libcore and such.

With bonus metadata::filesearch refactoring to avoid copies.
2013-05-03 16:48:44 -07:00
Tim Chevalier
4d4cabff9e rustpkg: Implement install command
The install command should work now, though it only installs
    in-place (anything else has to wait until I implement RUST_PATH).

Also including:
    core: Add remove_directory_recursive, change copy_file

    Make copy_file preserve permissions, and add a remove_directory_recursive
    function.
2013-05-03 16:06:07 -07:00
John Clements
cdf4d4bcdd fix typo in librstpkg tests, allowed by old parser 2013-04-28 23:01:41 -07:00
Daniel Micay
f792baba42 only use #[no_core] in libcore 2013-04-27 21:34:24 -04:00
Tim Chevalier
848641fcb5 core: Move mkdir_recursive from rustpkg into core::os
mkdir_recursive creates a directory as well as any of its
parent directories that don't exist already. Seems like a useful
thing to have in core.
2013-04-26 15:51:22 -07:00
Tim Chevalier
4e2c8f422a rustpkg: Preliminary work on install command
Mostly just tests (that are ignored); install command is still
stubbed out.
2013-04-24 17:51:31 -07:00