about summary refs log tree commit diff
path: root/src/librustpkg
AgeCommit message (Collapse)AuthorLines
2013-11-26Support multiple item macrosSteven Fackler-2/+3
Closes #4375
2013-11-26librustc: Fix merge fallout.Patrick Walton-2/+2
2013-11-26librustc: Make `||` lambdas not infer to `proc`sPatrick Walton-3/+3
2013-11-26test: Remove all remaining non-procedure uses of `do`.Patrick Walton-1/+1
2013-11-26librustc: Remove non-procedure uses of `do` from librustc, librustdoc,Patrick Walton-83/+64
and librustpkg.
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-10/+13
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-19/+19
2013-11-26rustc: Update obsolete attribute listklutzy-2/+0
2013-11-24libextra: Remove @mut from term.Luqman Aden-14/+11
2013-11-17auto merge of #10526 : itdaniher/rust/master, r=pcwaltonbors-7/+10
This commit fixes issue #10468. It propagate optimization level from PkgSrc to compile_crate as a rustc::driver::session::OptLevel enum. The 'opt' argument to compile_crate was previously hardcoded as boolean false, such that calls to session::options would always result in the session::No flag being used.
2013-11-16auto merge of #10454 : z0w0/rust/issue-9944, r=cmrbors-2/+12
Allows you to provide explicit `--cfg` flags when building certain packages through the rustpkg API.
2013-11-16fix 10468, propagate optimization level as rustc::driver::session::OptLevelIan Daniher-7/+10
2013-11-14rustpkg: Disable test suite on windowsklutzy-1/+1
sha1, version, util tests are still alive and they pass on win32.
2013-11-13Add build_lib_with_cfgs, build_bin_with_cfgs to rustpkg API. Closes #9944.Zack Corr-2/+12
2013-11-12rustpkg: Eliminate the spurious ↵Tim Chevalier-22/+71
`os::path_exists(&pkg_src.start_dir.join(p))` assertion failure This addresses the problem reported in #10253 and possibly elsewhere. Closes #10253
2013-11-11Move std::rt::io to std::ioAlex Crichton-24/+24
2013-11-12Implemented a ProcessExit enum and helper methods to std::rt::io::process ↵Matthew Iselin-38/+46
for getting process termination status, or the signal that terminated a process. A test has been added to rtio-processes.rs to ensure signal termination is picked up correctly.
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-5/+3
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-11-09auto merge of #10372 : catamorphism/rust/rustpkg-issue-9311, r=catamorphismbors-2/+2
and use opt_str instead of opt_val in rustpkg Closes #9311
2013-11-09auto merge of #10371 : catamorphism/rust/rustpkg-issue-9482, r=catamorphismbors-0/+18
This bug was already fixed, just needed a test. Closes #9569
2013-11-08extra / rustpkg: Make getopts::opt_val private againTim Chevalier-2/+2
and use opt_str instead of opt_val in rustpkg Closes #9311
2013-11-08rustpkg: Add a test that `rustpkg install` doesn't copy a non-changed fileTim Chevalier-0/+18
This bug was already fixed, just needed a test. Closes #9569
2013-11-08Specify package_id for rust libs, to avoid spurious warningsAndrei Formiga-0/+1
2013-11-04Allow --cfg on rustpkg testSteven Fackler-2/+15
Closes #10238
2013-11-04auto merge of #10179 : alexcrichton/rust/rt-improvements, r=cmrbors-247/+208
This fleshes out the io::file module a fair bit more, adding all of the functionality that I can think of that we would want. Some questions about the representation which I'm curious about: * I modified `FileStat` to be a little less platform-agnostic, but it's still fairly platform-specific. I don't want to hide information that we have, but I don't want to depend on this information being available. One possible route is to have an `extra` field which has all this os-dependent stuff which is clearly documented as it should be avoided. * Does it make sense for directory functions to be top-level functions instead of static methods? It seems silly to import `std::rt::io::file` and `std::rt::io::File` at the top of files that need to deal with directories and files.
2013-11-04Move io::file to io::fs and fns out of FileAlex Crichton-73/+70
This renames the `file` module to `fs` because that more accurately describes its current purpose (manipulating the filesystem, not just files). Additionally, this adds an UnstableFileStat structure as a nested structure of FileStat to signify that the fields should not be depended on. The structure is currently flagged with #[unstable], but it's unlikely that it has much meaning. Closes #10241
2013-11-03Ensure rustpkg test fails if tests failedSteven Fackler-1/+18
It previously set the exit status, but the main wrapper paved over that with an exit code of 0. Closes #9761
2013-11-03Fill out the remaining functionality in io::fileAlex Crichton-46/+35
This adds bindings to the remaining functions provided by libuv, all of which are useful operations on files which need to get exposed somehow. Some highlights: * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type * Moved all file-related methods to be static methods under `File` * All directory related methods are still top-level functions * Created `io::FilePermission` types (backed by u32) that are what you'd expect * Created `io::FileType` and refactored `FileStat` to use FileType and FilePermission * Removed the expanding matrix of `FileMode` operations. The mode of reading a file will not have the O_CREAT flag, but a write mode will always have the O_CREAT flag. Closes #10130 Closes #10131 Closes #10121
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-229/+204
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057
2013-11-03Rename files to match current recommendations.Chris Morgan-0/+0
New standards have arisen in recent months, mostly for the use of rustpkg, but the main Rust codebase has not been altered to match these new specifications. This changeset rectifies most of these issues. - Renamed the crate source files `src/libX/X.rs` to `lib.rs`, for consistency with current styles; this affects extra, rustc, rustdoc, rustpkg, rustuv, std, syntax. - Renamed `X/X.rs` to `X/mod.rs,` as is now recommended style, for `std::num` and `std::terminfo`. - Shifted `src/libstd/str/ascii.rs` out of the otherwise unused `str` directory, to be consistent with its import path of `std::ascii`; libstd is flat at present so it's more appropriate thus. While this removes some `#[path = "..."]` directives, it does not remove all of them, and leaves certain other inconsistencies, such as `std::u8` et al. which are actually stored in `src/libstd/num/` (one subdirectory down). No quorum has been reached on this issue, so I felt it best to leave them all alone at present. #9208 deals with the possibility of making libstd more hierarchical (such as changing the crate to match the current filesystem structure, which would make the module path `std::num::u8`). There is one thing remaining in which this repository is not rustpkg-compliant: rustpkg would have `src/std/` et al. rather than `src/libstd/` et al. I have not endeavoured to change that at this point as it would guarantee prompt bitrot and confusion. A change of that magnitude needs to be discussed first.
2013-10-28auto merge of #10110 : catamorphism/rust/rustpkg-dependency-build-dir, ↵bors-12/+45
r=metajack r? @metajack When invoked with the --rust-path-hack flag, rustpkg was correctly building the package into the default workspace (and not into the build/ subdirectory of the parent directory of the source directory), but not correctly putting the output for any dependencies into the default workspace as well. Spotted by Jack.
2013-10-28auto merge of #10079 : alexcrichton/rust/no-reader-util, r=brsonbors-1/+1
These methods are all excellent candidates for default methods, so there's no need to require extra imports of various traits. Additionally, this was able to remove all the weird underscores after the method names. Yay!
2013-10-28Remove the extension traits for Readers/WritersAlex Crichton-1/+1
These methods are all excellent candidates for default methods, so there's no need to require extra imports of various traits.
2013-10-28auto merge of #10089 : pythonesque/rust/issue-7718, r=catamorphismbors-11/+11
Seems pretty straightforward, but please let me know if I'm doing something wrong or the test needs to be rewritten.
2013-10-28Allow fail messages to be caught, and introduce the Any traitMarvin Löbel-3/+2
Some code cleanup, sorting of import blocks Removed std::unstable::UnsafeArc's use of Either Added run-fail tests for the new FailWithCause impls Changed future_result and try to return Result<(), ~Any>. - Internally, there is an enum of possible fail messages passend around. - In case of linked failure or a string message, the ~Any gets lazyly allocated in future_results recv method. - For that, future result now returns a wrapper around a Port. - Moved and renamed task::TaskResult into rt::task::UnwindResult and made it an internal enum. - Introduced a replacement typedef `type TaskResult = Result<(), ~Any>`.
2013-10-27Integrate the code in the digest and cryptoutil modules directly into the ↵Palmer Cox-365/+315
sha1 module.
2013-10-27Remove dead code from cryptoutil.rs and remove macro_rules feature flag.Palmer Cox-230/+73
2013-10-27Add a comment to Sha1 that its not suitable for cryptogrpahic uses.Palmer Cox-0/+4
2013-10-27Remove MD5 and Sha2. Move Sha1 and support code into librustpkg.Palmer Cox-4/+847
2013-10-27rustpkg: Build dependencies into the correct workspace when using ↵Tim Chevalier-12/+45
--rust-path-hack When invoked with the --rust-path-hack flag, rustpkg was correctly building the package into the default workspace (and not into the build/ subdirectory of the parent directory of the source directory), but not correctly putting the output for any dependencies into the default workspace as well. Spotted by Jack.
2013-10-26Make addl_lib_search_paths a HashSet (Closes #7718).Joshua Yanovski-11/+11
2013-10-24Another round of test fixes and merge conflictsAlex Crichton-13/+21
2013-10-24Remove even more of std::ioAlex Crichton-55/+60
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-23auto merge of #10032 : thestinger/rust/snapshot, r=huonwbors-1/+1
2013-10-23register snapshotsDaniel Micay-1/+1
2013-10-23Merge remote-tracking branch 'upstream/master'Ziad Hatahet-104/+513
2013-10-22rustpkg: Support arbitrary dependencies in the install APITim Chevalier-104/+513
api::install_pkg now accepts an argument that's a list of (kind, path) dependency pairs. This allows custom package scripts to declare C dependencies, as is demonstrated in rustpkg::tests::test_c_dependency_ok. Closes #6403
2013-10-22Remove thread-blocking call to `libc::stat` in `Path::stat`Ziad Hatahet-12/+11
Fixes #9958
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-239/+239
Who doesn't like a massive renaming?
2013-10-21rustpkg: Search for crates in the current directoryTim Chevalier-18/+89
As per #8520, find crates in the current working directory even if it's not a workspace. Closes #8520