Commit Graph

77 Commits

Author SHA1 Message Date
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
Tim Chevalier
f945e57bd0 rustpkg: Correct directory structure in test scenarios 2013-04-24 17:51:31 -07:00
Tim Chevalier
6a3e26aa40 rustpkg: Make path searching work as described in the rustpkg doc
rustpkg now searches for package directories in ./src rather than
in . . I also added a rudimentary RUST_PATH that's currently
hard-wired to the current directory. rustpkg now uses src/, lib/,
and build/ directories as described in the manual.

Most of the existing test scenarios build now; the README file
(in a separate commit) explains which ones.
2013-04-24 17:51:30 -07:00
Tim Chevalier
c2af1de95b rustpkg: update README saying which tests pass 2013-04-24 17:51:30 -07:00
Huon Wilson
4a24f10ac6 libcore: unify gen_<type> methods on rand::RngUtil into the generic gen.
This moves all the basic random value generation into the Rand instances for
each type and then removes the `gen_int`, `gen_char` (etc) methods on RngUtil,
leaving only the generic `gen` and the more specialised methods.

Also, removes some imports that are redundant due to a `use core::prelude::*`
statement.
2013-04-24 22:34:19 +10:00
Huon Wilson
6c0a7c7b7d libcore: remove @Rng from rand, and use traits instead.
Also, rename RandRes -> IsaacRng, and make the constructors static
methods.
2013-04-24 22:34:10 +10:00
Tim Chevalier
d834c0d59d docs: Sketch out rustpkg manual 2013-04-22 18:17:32 -07:00
Alex Crichton
c97bee2696 Assorted fixes from de-modeing rustc/syntax (rusti, rustdoc, fuzzer, rustpkg) 2013-04-19 23:23:23 -04:00
bors
225d74f211 auto merge of #5914 : catamorphism/rust/copy-cops, r=catamorphism 2013-04-18 17:51:51 -07:00
Tim Chevalier
3d43af15d8 rustc: Anti-copy police
In this case, some copies are still necessary to convert from
a mutable to an immutable @-box. It's still an improvement,
I hope.
2013-04-18 17:40:42 -07:00
Tim Chevalier
1aebf30f72 Tidy 2013-04-18 15:24:25 -07:00
Tim Chevalier
128e95b89d rustpkg: Add more tests
These are examples of what *should* work, and probably don't
work yet.
2013-04-17 19:00:52 -07:00
Tim Chevalier
958189dba1 rustpkg: Add a list of rustpkg commands that should pass
This is a test file containing examples of commands that should
succeed. When we write the test runner, we will have to figure
out how to automate them.
2013-04-17 18:59:32 -07:00
Tim Chevalier
e2d947d72f rustpkg: Don't execute the standard build logic if there is a pkg.rs 2013-04-17 18:58:59 -07:00
Tim Chevalier
a2761ac7b5 rustpkg: Change this example to show how to do a custom build 2013-04-17 18:58:41 -07:00
Tim Chevalier
35f3b6324f rustpkg: Remove bogus .rc file 2013-04-17 18:58:12 -07:00
Tim Chevalier
82765a0b48 rustpkg: Implement clean; replace boolean result flags with fail!()
1. Implemented the `clean` command

2. The methods implementing rustpkg commands all returned `bool`.
Since most of not all of the error situations seem unrecoverable,
I changed the methods to return unit (and also stubbed out several
more methods that were assuming a package script existed, to be
re-implemented in the future)
2013-04-17 15:58:11 -07:00
Tim Chevalier
e6c3c371a5 rustpkg: Add a few tests
There's no test runner for rustpkg yet; just sketching out a few
basic test scenarios. pass/ contains packages that should compile
successfully, whereas fail/ contains packages that should fail
to build.
2013-04-17 14:32:40 -07:00
Tim Chevalier
c01c3d9fc6 rustpkg: Fail when crate inference fails; inject link attributes
1. Fail when there's no package script and no crates named
main.rs, lib.rs, bench.rs, or test.rs.

2. Inject the crate link_meta "name" and "vers" attributes, so
that the output file gets named correctly in the library case.

3. Normalize '-' to '_' in package names.
2013-04-17 14:32:34 -07:00
bors
f10cf26e25 auto merge of #5861 : catamorphism/rust/rustpkg, r=catamorphism
r? @graydon

Pulled out tests into their own modules inside the files they test,
as per the draft style guidelines.

Started a new module, path_util, for utility functions to do with
paths and directories.

Changed default_dest_dir to use a condition and return Path
instead of Option<Path>.
2013-04-15 14:48:55 -07:00
Tim Chevalier
7881bde027 Tidy 2013-04-15 11:52:38 -07:00
Tim Chevalier
884c7c9326 rustpkg: Factor out tests; use a condition instead of returning an option
Pulled out tests into their own modules inside the files they test,
as per the draft style guidelines.

Started a new module, path_util, for utility functions to do with
paths and directories.

Changed default_dest_dir to use a condition and return Path
instead of Option<Path>.
2013-04-12 16:15:40 -07:00
bors
5bb2e8f62c auto merge of #5847 : catamorphism/rust/rustpkg, r=catamorphism
r? @graydon This is preliminary work on bringing rustpkg up to conformance with #5679
and related issues.

This change makes rustpkg infer a package ID from its containing directory,
instead of requiring name and vers attributes in the code. Many aspects of it
are incomplete; I've only tested one package (see README.txt) and one command,
"build". So far it only works for local packages.

I also removed code for several of the package commands other than "build",
replacing them with stubs that fail, since they used package IDs in ways that
didn't jibe well with the new scheme. I will re-implement the commands one
at a time.
2013-04-12 12:57:58 -07:00
Tim Chevalier
74fee15bc1 Tidy 2013-04-12 12:49:11 -07:00
Tim Chevalier
8158dd7e9a rustpkg: Use pkg IDs, remove old code for now that required packages to declare IDs explicitly
This is preliminary work on bringing rustpkg up to conformance with #5679
and related issues.

This change makes rustpkg infer a package ID from its containing directory,
instead of requiring name and vers attributes in the code. Many aspects of it
are incomplete; I've only tested one package (see README.txt) and one command,
"build". So far it only works for local packages.

I also removed code for several of the package commands other than "build",
replacing them with stubs that fail, since they used package IDs in ways that
didn't jibe well with the new scheme. I will re-implement the commands one
at a time.
2013-04-11 18:08:42 -07:00
Brian Anderson
23e44a529b Bump version to 0.7-pre 2013-04-10 13:12:53 -07:00
Brian Anderson
23251b2438 Bump version to 0.7-pre 2013-04-09 10:59:32 -07:00
Graydon Hoare
e0f72e2298 checkpoint 2013-04-05 17:37:05 -07:00
Daniel Micay
cc148b58ff rename Linear{Map,Set} => Hash{Map,Set} 2013-04-03 10:30:36 -04:00
Daniel Micay
44029a5bbc hashmap: rm linear namespace 2013-04-03 10:30:18 -04:00
Niko Matsakis
6965fe4bce Add AbiSet and integrate it into the AST.
I believe this patch incorporates all expected syntax changes from extern
function reform (#3678). You can now write things like:

    extern "<abi>" fn foo(s: S) -> T { ... }
    extern "<abi>" mod { ... }
    extern "<abi>" fn(S) -> T

The ABI for foreign functions is taken from this syntax (rather than from an
annotation).  We support the full ABI specification I described on the mailing
list.  The correct ABI is chosen based on the target architecture.

Calls by pointer to C functions are not yet supported, and the Rust type of
crust fns is still *u8.
2013-03-29 18:36:20 -07:00
Patrick Walton
1e91595520 librustc: Remove fail_unless! 2013-03-29 16:39:08 -07:00
Alex Crichton
be57d745d2 Removing unused imports 2013-03-28 23:56:46 -04:00
Patrick Walton
0a4d0f37ca librustc: Enforce that extern mod directives come first, then use directives, then items.
Resolve them in this order as well.
2013-03-26 21:30:17 -07:00
Marvin Löbel
06c371605b Fixed all use sites and tests 2013-03-26 14:59:17 +01:00
Huon Wilson
12df65470f Kill some warnings: unused imports and old #[deny(..)]s. 2013-03-25 01:17:23 +11:00
Patrick Walton
85c9fc6f8f librustc: Remove the const declaration form everywhere 2013-03-22 22:24:35 -07:00
Patrick Walton
fa70709e07 libsyntax: Stop parsing pure and static 2013-03-22 22:24:33 -07:00
Patrick Walton
e72d011f68 librustc: Remove debug code and add scary warnings for rusti/rustpkg 2013-03-20 11:44:01 -07:00
Patrick Walton
b1c699815d librustc: Don't accept as Trait anymore; fix all occurrences of it. 2013-03-13 20:07:09 -07:00
Patrick Walton
d18f785457 librustc: Replace all uses of fn() with &fn(). rs=defun 2013-03-11 09:35:58 -07:00
Ben Striegel
fdf69dd7b0 Finish de-implicit-selfing everything but the test suite 2013-03-08 19:34:39 -05:00
Patrick Walton
d7e74b5e91 librustc: Convert all uses of assert over to fail_unless! 2013-03-07 22:37:57 -08:00
bors
4b79a58d9d auto merge of #5252 : nikomatsakis/rust/issue-5087-make-trait-not-impl-self, r=pcwalton
Two changes:

- The first fixes an inconsistency in coherence whereby extension methods were added to the inherent methods table, but only in cross-crate scenarios.  This causes some minor fallout in tests and so forth.  In one case (comm) I added inherent and trait methods so as to avoid the need to import traits like `GenericPort` just to use a port.

- The second makes objects not implement the associated trait, as discussed in #5087.

r? @pcwalton
2013-03-06 09:27:59 -08:00
Niko Matsakis
6267339d68 Fix bug in coherence that causes all cross-crate impls to be regarded as
inherent impls, not just those of the `impl Type` variety.
2013-03-06 11:02:19 -05:00
Ben Striegel
12f06bb496 Finish de-implicit-selifizng libcore 2013-03-06 04:00:25 -05:00
Erick Tryzelaar
743cfce703 core: convert vec::{last,last_opt} to return references 2013-03-05 19:39:18 -08:00