about summary refs log tree commit diff
path: root/src/librustpkg
AgeCommit message (Collapse)AuthorLines
2013-05-14rustpkg: Remove #[allow(vecs_implicitly_copyable)]Alex Crichton-105/+98
2013-05-14Fix cosmetics for fail!() callsMarvin Löbel-6/+4
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-15/+15
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-12Don't create subprocesses for the `rust` commandAlex Crichton-1/+2
Instead link against the built libraries and directly invoke those.
2013-05-10rustpkg: Use the new `for` protocolAlex Crichton-2/+3
2013-05-08libcore: Remove mutable fields from hashPatrick Walton-3/+4
2013-05-04auto merge of #6230 : thestinger/rust/whitespace, r=catamorphismbors-2/+0
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-03add gitattributes and fix whitespace issuesDaniel Micay-2/+0
2013-05-03rustpkg: Handle sysroot more correctlyTim Chevalier-26/+72
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-03rustpkg: Implement install commandTim Chevalier-84/+266
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-04-28fix typo in librstpkg tests, allowed by old parserJohn Clements-1/+1
2013-04-27only use #[no_core] in libcoreDaniel Micay-11/+1
2013-04-26core: Move mkdir_recursive from rustpkg into core::osTim Chevalier-39/+5
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-24rustpkg: Preliminary work on install commandTim Chevalier-30/+175
Mostly just tests (that are ignored); install command is still stubbed out.
2013-04-24rustpkg: Correct directory structure in test scenariosTim Chevalier-6/+11
2013-04-24rustpkg: Make path searching work as described in the rustpkg docTim Chevalier-151/+190
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-24rustpkg: update README saying which tests passTim Chevalier-3/+23
2013-04-24libcore: unify `gen_<type>` methods on `rand::RngUtil` into the generic `gen`.Huon Wilson-1/+1
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-24libcore: remove @Rng from rand, and use traits instead.Huon Wilson-1/+1
Also, rename RandRes -> IsaacRng, and make the constructors static methods.
2013-04-22docs: Sketch out rustpkg manualTim Chevalier-21/+0
2013-04-19Assorted fixes from de-modeing rustc/syntax (rusti, rustdoc, fuzzer, rustpkg)Alex Crichton-9/+9
2013-04-18auto merge of #5914 : catamorphism/rust/copy-cops, r=catamorphismbors-4/+4
2013-04-18rustc: Anti-copy policeTim Chevalier-4/+4
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-18TidyTim Chevalier-2/+53
2013-04-17rustpkg: Add more testsTim Chevalier-0/+93
These are examples of what *should* work, and probably don't work yet.
2013-04-17rustpkg: Add a list of rustpkg commands that should passTim Chevalier-0/+35
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-17rustpkg: Don't execute the standard build logic if there is a pkg.rsTim Chevalier-4/+5
2013-04-17rustpkg: Change this example to show how to do a custom buildTim Chevalier-0/+6
2013-04-17rustpkg: Remove bogus .rc fileTim Chevalier-25/+1
2013-04-17rustpkg: Implement clean; replace boolean result flags with fail!()Tim Chevalier-159/+67
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-17rustpkg: Add a few testsTim Chevalier-0/+161
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-17rustpkg: Fail when crate inference fails; inject link attributesTim Chevalier-85/+142
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-15auto merge of #5861 : catamorphism/rust/rustpkg, r=catamorphismbors-63/+138
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-15TidyTim Chevalier-3/+3
2013-04-12rustpkg: Factor out tests; use a condition instead of returning an optionTim Chevalier-63/+138
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-12auto merge of #5847 : catamorphism/rust/rustpkg, r=catamorphismbors-952/+636
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-12TidyTim Chevalier-8/+5
2013-04-11rustpkg: Use pkg IDs, remove old code for now that required packages to ↵Tim Chevalier-964/+519
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-10Bump version to 0.7-preBrian Anderson-6/+6
2013-04-09Bump version to 0.7-preBrian Anderson-6/+6
2013-04-05checkpointGraydon Hoare-68/+200
2013-04-03rename Linear{Map,Set} => Hash{Map,Set}Daniel Micay-7/+7
2013-04-03hashmap: rm linear namespaceDaniel Micay-2/+2
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-1/+1
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-29librustc: Remove `fail_unless!`Patrick Walton-11/+11
2013-03-28Removing unused importsAlex Crichton-6/+5
2013-03-26librustc: Enforce that `extern mod` directives come first, then `use` ↵Patrick Walton-3/+3
directives, then items. Resolve them in this order as well.
2013-03-26Fixed all use sites and testsMarvin Löbel-15/+22
2013-03-25Kill some warnings: unused imports and old #[deny(..)]s.Huon Wilson-1/+0
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-1/+1