-
Notifications
You must be signed in to change notification settings - Fork 2.6k
docs(contrib): Pull impl info out of architecture #11869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,3 @@ | ||
# Files | ||
|
||
See [nightly docs](https://doc.rust-lang.org/nightly/nightly-rustc/cargo/index.html) | ||
|
||
## Filesystems | ||
|
||
Cargo tends to get run on a very wide array of file systems. Different file | ||
systems can have a wide range of capabilities, and Cargo should strive to do | ||
its best to handle them. Some examples of issues to deal with: | ||
|
||
* Not all file systems support locking. Cargo tries to detect if locking is | ||
supported, and if not, will ignore lock errors. This isn't ideal, but it is | ||
difficult to deal with. | ||
* The [`fs::canonicalize`] function doesn't work on all file systems | ||
(particularly some Windows file systems). If that function is used, there | ||
should be a fallback if it fails. This function will also return `\\?\` | ||
style paths on Windows, which can have some issues (such as some tools not | ||
supporting them, or having issues with relative paths). | ||
* Timestamps can be unreliable. The [`fingerprint`] module has a deeper | ||
discussion of this. One example is that Docker cache layers will erase the | ||
fractional part of the time stamp. | ||
* Symlinks are not always supported, particularly on Windows. | ||
|
||
[`fingerprint`]: https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/fingerprint.rs | ||
[`fs::canonicalize`]: https://doc.rust-lang.org/std/fs/fn.canonicalize.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Filesystem | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Architecture Overview | ||
|
||
See the | ||
[nightly docs](https://doc.rust-lang.org/nightly/nightly-rustc/cargo/index.html) | ||
for an overview of `cargo`s architecture and links out to further details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Debugging | ||
|
||
## Logging | ||
|
||
Cargo uses the [`env_logger`] crate to display debug log messages. The | ||
`CARGO_LOG` environment variable can be set to enable debug logging, with a | ||
value such as `trace`, `debug`, or `warn`. It also supports filtering for | ||
specific modules. Feel free to use the standard [`log`] macros to help with | ||
diagnosing problems. | ||
|
||
```sh | ||
# Outputs all logs with levels debug and higher | ||
CARGO_LOG=debug cargo generate-lockfile | ||
|
||
# Don't forget that you can filter by module as well | ||
CARGO_LOG=cargo::core::resolver=trace cargo generate-lockfile | ||
|
||
# This will print lots of info about the download process. `trace` prints even more. | ||
CARGO_HTTP_DEBUG=true CARGO_LOG=cargo::ops::registry=debug cargo fetch | ||
|
||
# This is an important command for diagnosing fingerprint issues. | ||
CARGO_LOG=cargo::core::compiler::fingerprint=trace cargo build | ||
``` | ||
|
||
[`env_logger`]: https://docs.rs/env_logger | ||
[`log`]: https://docs.rs/log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Filesystem | ||
|
||
Cargo tends to get run on a very wide array of file systems. Different file | ||
systems can have a wide range of capabilities, and Cargo should strive to do | ||
its best to handle them. Some examples of issues to deal with: | ||
|
||
* Not all file systems support locking. Cargo tries to detect if locking is | ||
supported, and if not, will ignore lock errors. This isn't ideal, but it is | ||
difficult to deal with. | ||
* The [`fs::canonicalize`] function doesn't work on all file systems | ||
(particularly some Windows file systems). If that function is used, there | ||
should be a fallback if it fails. This function will also return `\\?\` | ||
style paths on Windows, which can have some issues (such as some tools not | ||
supporting them, or having issues with relative paths). | ||
* Timestamps can be unreliable. The [`fingerprint`] module has a deeper | ||
discussion of this. One example is that Docker cache layers will erase the | ||
fractional part of the time stamp. | ||
* Symlinks are not always supported, particularly on Windows. | ||
|
||
[`fingerprint`]: https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/fingerprint.rs | ||
[`fs::canonicalize`]: https://doc.rust-lang.org/std/fs/fn.canonicalize.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Implementing a Change | ||
|
||
This chapter gives an overview of what you need to know in making a change to cargo. | ||
|
||
If you feel something is missing that would help you, feel free to ask on | ||
[Zulip](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo). |
2 changes: 1 addition & 1 deletion
2
...c/contrib/src/architecture/subcommands.md → ...contrib/src/implementation/subcommands.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.