cargo script
usage?cfg(true)
and cfg(false)
- https://github.com/rust-lang/rfcs/pull/3695
target
and target
(build target, platform target)
[target.().dependencies]
for platform target + some additional cases--target <triple>
for platform target--all-targets
for build target--target-dir
for where to place build target output.crate
files and crates.iotarget
in terms of "platform", since it is used heavily in places like rustc's cfg
values, and [target]
tables in Cargo.--all-targets
, but we could potentially rename that CLI flag.main.rs
or whatever) the "source of the artifact".lib.rs
, it tries toCargo.toml
because that's how cargo-script communicates its behavior, and would be beneficial for consistency.josh: out
(latest: <VER>)
(yellow) if any newer deps are found(requires Rust <VER>)
(red) if MSRV of dependent workspace members violated(available: <VER>)
(yellow) if MSRV-compatible, SemVer-compatible upgrade available--verbose
)(available: <VER>)
(yellow if direct dep, plain if transitive) if MSRV-compatible, SemVer-incompatible upgrade available(available: <VER> requires Rust <VER>)
(plain) if Semver-compatible upgrade available(available: <VER> requires Rust <VER>)
(plain) if Semver-incompatible upgrade availablecargo-outdated
was in-tree?
cargo-upgrade
uses a table. Some concerns from people about using a table. But with distinct columns, it can be easier to scan.cargo metadata
, etc.RustConf
build.rs
features for build probes
cfg(accessible)
is probably mostly done, and just needs someone to stabilize it. cfg(version)
is mostly there, but Josh doesn't want to see cfg(version)
stabilized without cfg(accessible)
to avoid excessive version checks rather than feature checks, but would like to have both.cfg(version)
doesn't really help for nightly. Nightly there is nothing we can do about.build --all-targets
should build doctests (and likewise for other commands)
--all-targets
does not do doc tests). This is unfortunate.file!
and line!
are not updated.#line
: https://internals.rust-lang.org/t/pre-rfc-enable-setting-of-source-file-line-column/19156--all-targets
might break everyone, we could add a new flag that would (if we rename "target").
--all-targets
. Adding it could cause breakage they aren't expecting.--all-targets
, and do a crater run to see the impact.
check
or clippy
doctests.
--all-targets
.--doc
everywhere might be a blocker for --all-targets
meaning change--really-all-targets
and then figure out a new name later?
cargo test
?cargo build
and cargo check
and cargo clippy
and cargo fix
..cargo fix
is another one that could potentially work with doctests.
cargo check
.--all-targets
.cargo-udeps
works. I believe it currently uses depinfo. depinfo already lists only the things that were used.--all-targets
). Only makes sense in certain places. Would that be in cargo clippy
?
cargo build
or cargo check
could do this, since it is doing lib and bins. Just suppress it if you are doing a subset (--lib
or --bin
).--all-targets
, you enable it automatically. Only enable when you are building enough to avoid false-positives.
time
inference breakage
alloc
added new trait impl that broke "only one impl" inference, breaking time
time
specifically.is_crates_io
is true in that case.cargo update
. For example, a linux distribution (Nix) which can't just update (they are looking at improving that).time
?
cargo update
(like cargo update --dry-run --verbose
) that will show changed lines, red with MSRV incompatible, yellow is MSRV compatible but for some reason not picked.cargo-hack
and run each MSRV for each package.
--build-script
--compile-time-deps
, requiring separate invocationscargo build
--compile-time-deps
running build.rs but not proc macros seems specializedcargo build --build-script
cargo prepare
cargo build
with options on where to stopread_packages
Cargo.lock
Cargo.lock
existsCargo.lock
" complexity wouldn't go away<name>/<version>
is weird, be more specific like PATCH <name>/<version>/yank
jacob, ehuss out
cargo update --breaking
upgrade
?Somewhere between deferred and rejected (speaking for myself): Support in cargo update for writing to the manifest for non-breaking changes, like bulk compatible upgrades of version requirements (ie a -save flag) which was one of our lower priority workflows. A –save flag is more about updating versions for your dependents, which while important for having valid lower-bounds on version requirements, doesn't fit with the existing model of cargo update. Maybe in the future we can find a way to express this in cargo update that fits with how it works or maybe another command can take on this role. We just aren't wanting to distract our efforts for handling most of the use cases to handle this one'
--save
--no-save
?cargo fix
cargo update
cargo update -Zminimal-versions
cargo add
, cargo remove
, cargo update --breaking
(unstable) don'tcargo fix
would do this anyways
cargo update
auto-fixing is a gray area--save
should be the encouraged default, so version reqs are latest; if someone wants an older version of those dependencies, they can use an older version of your crateupdate --save
config-Zminimal-versions
is easy to describe at a high level-Zdirect-minimal-versions
is harder to describe at a high levelcargo update
logic could make -Zdirect-minimal-versions
less of a paincargo rustc --crate-type
doesn't allow binary
?
Cargo.toml
supdate_submodules
update_submodules
is slow (walking whole repo?)clone_into
with the existence of a .cargo-ok
, maybe we could write that after update_submodules
, allowing us to skip the call
update_submodules
then new cargo won't correctly re-checkout the repo.target/
target/
to this new directory--artifact-dir
(#6790), saying --target-dir
solves that need--artifact-dir
: no nested, harder to predict directories before getting to artifactsbuck2 analyze
, to print out the specific paths for a specific kind of build.-h
, maybe man as well; just have artifact dir optionfoo/bar
fail if foo
is not optional?
foo?/bar
if foo
isn't optional.a?/b
worked with non-optional, that makes the syntax a little strange since the ?
was to mean "maybe enabled". dep:foo/bar
could be foo?/bar
, at which point we could migrate both dep:foo
and dep:foo/bar
to a new syntax without dep:
, like deps = [...]
dep:namespace::pkg/feature
.--dry-run
will be a rare exception.build.warnings
?term.warnings
, felt weird since it isn't a terminal setting.[lints]
?
warnings="warn"
feels a little weird.-Z...
isn't specified.gc.auto.frequency
config option. Change the thresholds to 6 months, and then in 3 months lower them back to 3 months for downloaded content and 1 month for generated content (extracted files).cargo fetch
option, or a general registry command that makes it easier to work with registries).Rc
prevents that.Send
is what you really need?use Arc as Rc
.cargo metadata
cargo install
with a different lockfile./
syntax (over ?/
)?cargo add
or rust-analyzer or whatever would automatically switch to the structured form. Or switch it back to the DSL.
dep:
and dep/feature
. The shiny future is deps in one list, and features in the other. Eliminate the need for the ?
syntax, and just have a/b
.?/
syntax). Would like to see some demos of real-world features tables to see what it looks like. How would I interact with this, would we want to completely get rid of the DSL?
/
syntax, and give the ?/
syntax a single-character syntax?/
now, and remove in the next edition. Wouldn't want to swap ?/
to /
, since that could be confusing. Would want a transition period of one edition for that.[patch]
table entries are similar to a dependency, and we would probably need to either reject it, or do extra work to support it. Are we going to explicitly reject [patch]
for now?
[patch]
would be that hard. But fine if we don't block it.[patch]
should "just work". We would have to have extra work to not support it.[patch]
publish
?
out: epage
Cargo.toml
or just config.toml
? RFC author reverted the change to add it to Cargo.toml
. Does anyone have strong feelings about that?
base
path isn't found in the config?
config.toml
. It becomes invisible (in part since it it hidden and separate).
../workspace/.....
. Would be nicer to have base="workspace"
. Another is instead of having path="../common/...."
, would prefer to have that ../common
part be more explicitly written. There would be a split of client and server, with common parts. Some are public (open-source) repository, and other parts are closed.
git
deps work. Would be really nice if in intra-workspace that you could just refer to packages within the workspace.Cargo.toml
.