| Age | Commit message (Collapse) | Author | Lines |
|
I'm sorry :'(
Closes #11859
|
|
Right now the bots are all injecting a libstd version, so all the rustpkg tests
are passing. All rustpkg compilations will fail unless the version number is
explicitly given because rustpkg attempts to exactly guess the target file name.
Switch back to using a pattern match in order to unbreak tests.
Closes #11852
|
|
There is no significant difference between `rustpkg::crate_id::CrateId`
and `syntax::crateid::CrateId`. rustpkg's one is replaced by syntax's
one.
|
|
Previously rustpkg tried to parse filenames to find crate. Now ue use
deterministic hashes, so it becomes possible to directly construct
filename and check if the file exists.
|
|
Currently rustpkg doesn't use SemanticVersion or Tagged, so they are
removed. Remaining variants are replaced by `Option<~str>`.
|
|
|
|
|
|
|
|
|
|
|
|
This prevents usage of the win32 utf-16 helper functions from outside of libstd.
Closes #9053
|
|
|
|
cells.
|
|
|
|
and librustpkg.
|
|
|
|
|
|
`os::path_exists(&pkg_src.start_dir.join(p))` assertion failure
This addresses the problem reported in #10253 and possibly elsewhere.
Closes #10253
|
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Who doesn't like a massive renaming?
|
|
As per #8520, find crates in the current working directory even
if it's not a workspace.
Closes #8520
|
|
Also fix some issues that crept into earlier commits during the conflict
resoution for the rebase.
|
|
Delete the following API functions:
- set_dirname()
- with_dirname()
- set_filestem()
- with_filestem()
- add_extension()
- file_path()
Also change pop() to return a boolean instead of an owned copy of the
old filename.
|
|
Standardize the is_sep() functions to be the same in both posix and
windows, and re-export from path. Update extra::glob to use this.
Remove the usage of either, as it's going away.
Move the WindowsPath-specific methods out of WindowsPath and make them
top-level functions of path::windows instead. This way you cannot
accidentally write code that will fail to compile on non-windows
architectures without typing ::windows anywhere.
Remove GenericPath::from_c_str() and just impl BytesContainer for
CString instead.
Remove .join_path() and .push_path() and just implement BytesContainer
for Path instead.
Remove FilenameDisplay and add a boolean flag to Display instead.
Remove .each_parent(). It only had one caller, so just inline its
definition there.
|
|
Add a new trait BytesContainer that is implemented for both byte vectors
and strings.
Convert Path::from_vec and ::from_str to one function, Path::new().
Remove all the _str-suffixed mutation methods (push, join, with_*,
set_*) and modify the non-suffixed versions to use BytesContainer.
|
|
Remove the old path.
Rename path2 to path.
Update all clients for the new path.
Also make some miscellaneous changes to the Path APIs to help the
adoption process.
|
|
temporary files are stored
rustpkg now makes source files that it checks out automatically read-only, and stores
them under build/.
Also, refactored the `PkgSrc` type to keep track of separate source and destination
workspaces, as well as to have a `build_workspace` method that returns the workspace
to put temporary files in (usually the source, sometimes the destination -- see
comments for more details).
Closes #6480
|
|
|
|
Closes #9467
|
|
|
|
Previously, any package would match any other package ID when searching
using the rust_path_hack, so long as the directory had one or more crate
files in it. Now, rustpkg checks that the parent directory matches the
package ID.
Closes #9273
|
|
as per #9112
Closes #9112
|
|
As per rustpkg.md, rustpkg now builds in a target-specific
subdirectory of build/, and installs libraries into a target-specific
subdirectory of lib.
Closes #8672
|
|
Testing this is a little tricky as an intermediate temporary directory is only used for remote git repositories and therefore that path cannot be reliably exercised in the tests.
|
|
Install to the first directory in the RUST_PATH if the user set a
RUST_PATH. In the case where RUST_PATH isn't set, the behavior
remains unchanged.
Closes #7402
|
|
recursive dependencies
Closes #8524
|
|
|
|
Package IDs can now refer to a subdirectory of a particular source
tree, and not just a top-level directory with a src/ directory as its
parent.
For example, referring to the package ID a/b/c/d , in workspace W,
if W/src/a is a package, will build the sources for the package in
a/b/c/d (and not other crates in W/src/a).
Closes #6408
|
|
|
|
rustpkg now uses the workcache library to avoid recompilation.
Hooray!
|
|
In most cases this involved removing a ~str allocations or clones
(yay), or coercing a ~str to a slice. In a few places, I had to bind
an intermediate Path (e.g. path.pop() return values), so that it would
live long enough to support the borrowed &str.
And in a few places, where the code was actively using the property
that the old API returned ~str's, I had to put in to_owned() or
clone(); but in those cases, we're trading an allocation within the
path.rs code for one in the client code, so they neutralize each
other.
|
|
This commit adds a rustpkg flag, --rust-path-hack, that allows
rustpkg to *search* inside package directories if they appear in
the RUST_PATH, while *building* libraries and executables into a
different target directory.
This behavior is hidden behind a flag because I believe we only
want to support it temporarily, to make it easier to port servo to
rustpkg.
This commit also includes a fix for how rustpkg fetches sources
from git repositories -- it uses a temporary directory as the target
when invoking `git clone`, then moves that directory into the workspace
if the clone was successful. (The old behavior was that when the
`git clone` failed, the empty target directory would be left lying
around anyway.)
|
|
multiple workspaces
The test checks that rustpkg uses the first one, rather than complaining
about multiple matches.
Closes #7241
|
|
This necessitated some cleanup to how we parse library filenames
when searching for libraries, since rustpkg may now create filenames
that contain '-' characters. Also cleaned up how rustpkg passes the
sysroot to a custom build script.
|
|
Mostly I did simple transformations from imperative style loops to
more functional iterator based transformations.
|