Zack Corr
3f983ca084
Fix cargo to install from archives correctly
2012-06-02 20:54:39 -07:00
Zack Corr
ce2719a4d9
Correct cargo usage line going over 78 chars
2012-06-02 20:54:39 -07:00
Zack Corr
54b8d5f1ab
Cargo revamp: root in home directory, automatic init & sync for first time usage, uninstallation, improved installation usage and other usage changes. Closes #2475 . Closes #1353 .
2012-06-02 20:54:38 -07:00
Brian Anderson
736ff34e8a
rustc: Move filesearch into metadata mod
...
It's not that related to metadata, but metadata needs it and it will
probably be useful for doing dynamic loading.
2012-05-29 20:38:49 -07:00
Erick Tryzelaar
7b36d66049
Allow installing arbitrary git cargos
2012-05-28 18:58:01 -07:00
Kevin Cantu
b7393ecdf2
(cargo) fix old typo for installation to libdir
2012-05-28 17:54:47 -07:00
Kevin Cantu
1aa0804637
(cargo) added a rough fix for installed exe permissions
...
Since `os::copy_file` wasn't preserving the executable permissions,
this reverts back to `run::run_program` and `cp` to install
the packages.
2012-05-27 10:48:19 -07:00
Kevin Cantu
50423e9545
(cargo) fixed a package installation bug, cleaned up usage
...
This fixes a bug where os::copy_file was called with a directory name, and
updates the command line options and usage messages for clarity.
2012-05-27 01:29:04 -07:00
Michael Sullivan
8668d06400
Get rid of many implicit copies as a preliminary to Issue #2448 .
2012-05-25 16:39:35 -07:00
Erick Tryzelaar
047f629b31
Remove some dead code.
2012-05-19 10:08:43 -07:00
Eric Holk
0eed37da29
Using const vector slices for more vec functions.
2012-05-18 16:55:42 -07:00
Brian Anderson
1f52652a06
rustc: Eliminate some indirection to the syntax crate
2012-05-13 17:33:29 -07:00
Graydon Hoare
929c3dd710
Workarounds for bug #2280 : add some temporaries for borrowing.
2012-04-24 15:19:01 -07:00
Marijn Haverbeke
9053f54498
Move map iface over to more for
-friendly iteration methods
2012-04-23 15:18:19 +02:00
Brian Anderson
e3961df78d
cargo: Discover crates in subdirectories
2012-04-21 15:46:05 -07:00
Brian Anderson
9a8a04629e
syntax: Put the main parser interface in mod parse
2012-04-18 10:50:50 -07:00
Marijn Haverbeke
c902eafa14
Convert old-style for loops to new-style
...
Most could use the each method, but because of the hack used to
disambiguate old- and new-style loops, some had to use vec::each.
(This hack will go away soon.)
Issue #1619
2012-04-06 20:38:23 +02:00
Brian Anderson
d13c0c77a2
Explicitly use version 0.2 of crates
2012-04-05 20:29:42 -07:00
Graydon Hoare
0cf6b613d1
Mention --test in cargo usage string. Close #1452 .
2012-04-04 18:40:41 -07:00
Tim Chevalier
fabd49bc2d
Use os::copy_file in cargo
2012-04-02 22:57:28 -07:00
Jonathan Sternberg
3a0477c398
Fixing issue 1919. list_dir is the more general version that returns a vector with the contents of the directory. list_dir_path contains the old behavior (as a convenience function).
2012-04-01 11:39:17 -04:00
Graydon Hoare
6e6798c4e1
Bulk-edit mutable -> mut.
2012-03-26 18:35:18 -07:00
Marijn Haverbeke
a00538b3b3
Fix return-in-block in cargo
...
Which is apparently not built as part of make check
2012-03-26 13:16:29 +02:00
Niko Matsakis
dc07280b08
make --enforce-mut-vars always on, add mut annotations to remaining files
2012-03-22 09:58:19 -07:00
Niko Matsakis
cfcbec3cc3
Implement an initial version of placement new.
2012-03-20 20:39:40 -07:00
Tim Chevalier
b3dada0017
cargo FIXMEs
2012-03-15 17:50:21 -07:00
Brian Anderson
3864d6d845
std: Rename the hashmap constructors to conform to new standards
...
Instead of using the new_ prefix just name them after their type
2012-03-14 18:19:08 -07:00
Graydon Hoare
6f5853f5a1
Libc/os/run/rand/io reorganization. Close #1373 . Close #1638 .
...
- Move io, run and rand to core.
- Remove incorrect ctypes module (use libc).
- Remove os-specific modules for os and fs.
- Split fs between core::path and core::os.
2012-03-12 20:08:29 -07:00
Brian Anderson
e5eea72677
cargo: Don't bail when signature verification fails
2012-03-10 19:33:09 -08:00
Patrick Walton
c9375fed8d
stdlib: Stop incurring vtable dispatch costs when hashmaps are used
...
This required changing almost all users of hashmaps to import the hashmap interface first.
The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-07 17:35:13 -08:00
Patrick Walton
c245d9e980
Revert "stdlib: Stop incurring vtable dispatch costs when hashmaps are used"
...
This reverts commit f0250a23d3
.
2012-03-07 16:56:45 -08:00
Patrick Walton
f0250a23d3
stdlib: Stop incurring vtable dispatch costs when hashmaps are used
...
This required changing almost all users of hashmaps to import the hashmap interface first.
The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-07 16:51:31 -08:00
Erick Tryzelaar
012dec5e57
std: rewrite json.rs to fix bugs and use readers/writers
...
Our json implementation did not conform to the spec, and
was missing support for escpaed characters and exponental
numbers. This fixes it, and adds support for reading/writing
json directly from/to a stream.
There are two things left unimplemented. We could use a
"to_json" iface/impl, but that really needs traits to cut
down on code duplication. The other is it wouldn't be that
not that hard to turn this implementation into a event driven
parser like YAJL, but I ran into some type-inference bugs,
so I cut that out. It'd be nice to revisit this in the future
though.
2012-02-28 18:00:50 -08:00
Marijn Haverbeke
0f00d9a797
Adjust fuzzer and cargo to changes in core::str API
2012-02-23 17:11:21 +01:00
Kevin Cantu
7782f5d692
(core::str) remove len_bytes alias
2012-02-23 17:00:19 +01:00
Kevin Cantu
6ea3d7935e
(core::str) replace byte_index[_from] with index[_from]
2012-02-23 17:00:19 +01:00
Kevin Cantu
454b53a7c2
(core::char) rename slice -> slice_chars
2012-02-23 17:00:19 +01:00
Kevin Cantu
969fdf419c
(core::str) rename index -> index_chars
2012-02-23 17:00:19 +01:00
Kevin Cantu
98447f5236
(core::str) mostly rename len -> len_chars
2012-02-23 17:00:19 +01:00
Tycho Sci
b06cb0df5a
cargo: Install blobs to $sysroot/(bin|lib) on system-mode
...
Issue #1795
2012-02-20 17:55:36 +09:00
Tycho Sci
ff0ab6b7ee
cargo: Use system-mode by default except "install"
...
I think it is confused that you need to "cargo init"
and "cargo sync" every time to setup local-level .cargo
2012-02-20 17:55:35 +09:00
Tycho Sci
60b80fa6df
cargo: Warn if "gpg" is not available
...
Closes #1643
2012-02-14 10:08:35 +09:00
Tycho Sci
d014edcb1c
cargo: Use $sysroot/bin/rustc to compile crate
...
Closes #1806
2012-02-14 09:44:39 +09:00
Kevin Cantu
2b4f5136a5
(core::str) rename byte_len -> len_bytes and rename char_len -> len
2012-02-12 15:30:20 -08:00
Brian Anderson
d2debed605
core: Change the argument order for vec::contains, vec::count
2012-02-11 18:00:52 -08:00
Brian Anderson
1040b47078
core: Rename vec::member to vec::contains to match str mod
2012-02-11 18:00:52 -08:00
Kevin Cantu
27161f4415
using str::index...
2012-02-11 16:39:39 -08:00
Kevin Cantu
a131b430a0
core::str rename [r]index -> [r]index_bytes
2012-02-11 16:39:39 -08:00
Brian Anderson
1ccbba3341
cargo: Disable system mode per discussion on #1760
2012-02-09 13:42:59 -08:00
Tycho Sci
d846169b15
cargo: 2 modes -> 3 modes, and clarify them
...
* -g or --mode=user to create/use .cargo under $HOME
* -G or --mode=system to create/use .cargo under sysroot
* by default, `cargo` uses .cargo under current working directory
2012-02-09 12:15:30 -08:00
Tycho Sci
48e206ee81
cargo: Add local mode and use it by default
2012-02-09 12:15:30 -08:00
Kevin Cantu
ae0d49aa06
Rename str::char_slice -> str::slice
2012-02-01 21:56:53 -08:00
Kevin Cantu
8f367ebfeb
Rename (again) str::unsafe::slice -> str::unsafe::slice_bytes and
...
str::unsafe::safe_slice -> str::unsafe::slice_bytes_safe_range
2012-02-01 21:56:53 -08:00
Kevin Cantu
47c57a17dc
Propagating unsafe::slice 1
2012-02-01 21:56:53 -08:00
Tim Chevalier
e5d095d67e
Change option::t to option
...
Now that core exports "option" as a synonym for option::t, search-and-
replace option::t with option.
The only place that still refers to option::t are the modules in libcore
that use option, because fixing this requires a new snapshot
(forthcoming).
2012-01-31 17:05:20 -08:00
Tim Chevalier
fba35e1a3c
Require alts to be exhaustive
...
middle::check_alt does the work. Lots of changes to add default cases
into alts that were previously inexhaustive.
2012-01-31 10:08:24 -08:00
Patrick Walton
9ecd5ee81d
rustc: Split diagnostics into "span diagnostics" and "diagnostics".
...
The former contain a codemap (which is per-crate), and the latter don't. This
will be useful in order to allow more than one crate to be compiled in one run
of the compiler.
2012-01-24 21:42:54 -08:00
Grahame Bowland
fe70212f5a
suggest sync/init to user as appropriate
2012-01-25 00:08:58 +08:00
Brian Anderson
6766d0ead0
cargo: Long lines
2012-01-23 21:14:48 -08:00
Brian Anderson
5e9ca11c8d
cargo: Remove unused imports - work around mystery resolve failure
2012-01-23 21:08:13 -08:00
Brian Anderson
3d08840f34
Merge pull request #1628 from startling/cargo-descriptions
...
Implemented package descriptions for cargo
2012-01-23 20:46:33 -08:00
tim
2c3cd1749e
Added a newline after each description.
...
`<@graydon> maybe an extra newline to make the grouping clearer?`
2012-01-23 21:50:32 -06:00
tim
65840f3625
Get description
attribute for packages from json.
2012-01-23 21:42:29 -06:00
Niko Matsakis
5e13d19cc0
s/block()/fn()/g
2012-01-23 19:06:33 -08:00
tim
dfae48736f
Steps towards package descriptions.
...
I added a description field for `package` objects (it's read from
a literal string for now) and `print_pkg` now prints descriptions if
they're there.
2012-01-23 20:23:31 -06:00
Kevin Atkinson
ad21d9c64a
Don't reset the chpos/byte_pos to 0 in new_parser_from_source_str.
...
This correctly fixes issue #1362 .
chpos/byte_pos are now the offsets within a particular file, but
rather the offsets within a virtual file with is formed by combing all
of the modules within a crate. Thus, resetting them to 0 causes an
overlap and hence, bogus source locations.
Fix #1362 by moving chpos/byte_pos to parse_sess so that
new_parser_from_source_str has access to them and hence can chose an
initial value that is not already been used in the crate.
Note that the trigger for bug 1361 was that syntax/ext/expand.rs calls
parse_expr_from_source_str (which calls new_parser_from_source_str)
using the same codemap as the current crate (and hence causing overlap
with files in the crate as new_parser_from_source_str resets the
chpos/byte_pos to 0).
2012-01-23 17:37:15 -08:00
Elly Fong-Jones
6c7fbd27c9
[cargo] detect libs properly
...
The change to do build and test in different directories broke library
detection.
2012-01-21 14:59:10 -05:00
Tycho Sci
35cbcbe0c2
Fix cargo install *
fails at assertion.
2012-01-20 14:50:33 +09:00
Patrick Walton
d1fe582040
misc: ';' to ',' in enums in cargo, compiletest, and fuzzer
2012-01-19 18:47:30 -08:00
Patrick Walton
035b56d8aa
misc: "tag" -> "enum" for cargo, compiletest, fuzzer, rustdoc
2012-01-19 16:21:33 -08:00
Brian Anderson
e6a7383a5f
cargo: Fix unused argument warning
2012-01-19 13:46:28 -08:00
Tim Chevalier
04a2887f87
Remove '.' after nullary tags in patterns
...
Does what it says on the tin.
The next commit will remove support for this syntax.
2012-01-18 23:17:34 -08:00
Elly Jones
eafc9854bd
[cargo] argh
2012-01-18 22:52:00 -05:00
Elly Jones
4bd713bb84
[cargo] refactor test_one_crate
2012-01-18 22:36:57 -05:00
Graydon Hoare
1ce288d5aa
fix long line
2012-01-18 19:26:19 -08:00
Elly Jones
ad0065fe83
[cargo] add --test flag to install
2012-01-18 22:16:14 -05:00
Brian Anderson
8f57be5bff
rustc: Rename mk_codemap_handler to mk_handler
2012-01-14 15:14:43 -08:00
Brian Anderson
e4849d5e5d
rustc: Allow a custom diagnostic emitter when building the handler
2012-01-14 15:14:43 -08:00
Brian Anderson
eb41fd9021
Update tools for new parser API
2012-01-13 22:07:55 -08:00
Marijn Haverbeke
34d7f05292
Major clean-up of std::io
...
Use ifaces instead of objs, stop wrapping everything in two (or three)
layers of no-value-added indirection, and remove some of the more
pointless/outdated idioms from the code.
2012-01-11 21:00:11 +01:00
Brian Anderson
be565a1a7a
cargo: Print rustc's stdout when compilation fails
...
stdout is where all the useful info is, not stderr.
2012-01-06 18:04:25 -08:00
Brian Anderson
e746ed6880
rustc: Add cargo's lib directory to search paths
2012-01-05 16:03:31 -08:00
Graydon Hoare
f0dfbe7b1b
Register new snapshots, purge log_err and log_full in favour of log(...).
2011-12-22 17:53:53 -08:00
Graydon Hoare
8b580954fe
Register snapshots and switch logging over to use of log_full or #error / #debug.
2011-12-22 14:42:52 -08:00
Elly Jones
bbc534bccc
cargo: allow 'ref' package key for git packages.
...
This lets you specify e.g. a tag or a branch name to be checked out for that
package.
Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-12-20 23:41:22 -05:00
Elly Jones
2bdb0b6d40
cargo: syntax fixes
2011-12-20 21:52:50 -05:00
Elly Jones
9834321615
cargo: Add list and search.
...
In aid of search, add a new field to the packages.json format, called "tags",
whose value is a list of strings. Search accepts a list of tags, all of which
must match for the package to be shown.
Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-12-20 20:41:23 -05:00
Elly Jones
af564caff7
cargo: support optional signing of packages.json files.
2011-12-20 20:10:21 -05:00
Elly Jones
bb2c1f7613
cargo: complain if rustc fails
2011-12-16 20:40:10 -08:00
Elly Jones
648b69d692
cargo: shorten a line
2011-12-16 23:15:13 -05:00
Elly Jones
c8427e4ffd
cargo: fix lib detection logic
2011-12-16 22:39:33 -05:00
Elly Jones
b7e30bc4c5
cargo: fix remaining warnings
2011-12-16 22:31:49 -05:00
Elly Jones
7bd003a1d0
cargo: remove obsolete rust-pkg-index lookup code
2011-12-16 22:27:47 -05:00
Elly Jones
9a0b89b534
cargo: fix some warnings
2011-12-16 22:27:04 -05:00
Elly Jones
327af5b9f3
cargo: flesh out usage
2011-12-16 22:24:01 -05:00
Elly Jones
8b7a41f23d
cargo: Support distributed package indexes.
...
Indexes are listed in ~/.cargo/sources.json and ~/.cargo/local-sources.json, the
former of which is stored in the rust source tree in src/cargo. Each entry in
either of these files is a source, which is a dictionary with (currently) a
single key, "url". The supplied url should point to a json list, each element of
which should be a dictionary with four keys: "name", "uuid", "url", and
"method". The name and uuid serve to identify the package; the method describes
how to fetch the package; the url describes where to fetch it from. Currently
supported methods are "git", "http", and "file".
Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-12-16 22:08:25 -05:00
Elly Jones
10cf4a1b0a
cargo: wip
2011-12-16 20:33:39 -05:00
Elly Jones
89e880d613
std: file_is_dir -> path_is_dir, add path_exists
2011-12-16 17:37:21 -05:00
Graydon Hoare
1bf078f988
Remove hopefully-now-redundant chops of ./ at the beginning of filenames in cargo.
2011-12-16 12:28:39 -08:00
Niko Matsakis
2833ca478c
reorder args to the various vec, option fns so blk comes last
2011-12-16 07:17:23 -08:00