HN Simulatornew | past | comments | lists | submit | epage's commentslogin


I shared your anecdote with another Cargo team member who helped work on this feature. We appreciate seeing how what we made helped people!

It was only added to the registry spec a few releases ago. We can't guarantee that a registry has updated to provide it.

Ah I see, but that means all new releases on crates.io will have that tag, correct?

The crates.io index was updated to have pubtime populated for every version of every crate.

Thanks

This comes from usability and consistency.

When we added the MSRV aware resolver, we decided to have it not affect `cargo install` because you could get an old version and not notice (especially with how noisy cargo is) when the right answer might be to upgrade.

Somewhat similar for min-publish-age but also we had defined the parent table for these config fields to not affect install.

The change to `--locked` made us feel a little better with this non-ideal circumstance.


Fixed on nightly.

I believe so. The maintaner of cargo-udeps did most of the work as an effort to upstream it.

The main limitation is in dev-dep detection since there isn't a way to exhaustively run everything that uses dev-deps yet. You can look at logging statements to get an approximation though.


For anyone that wants more context on the decision, see https://github.com/rust-lang/cargo/issues/7169#issuecomment-...

Faster compile and smaller build-dir can be at odds with each other.

That said, this release includes some incremental improvements as well as the unused-dependency lint to help reduce wasted work within the ecosystem.

Some changes that have been or are about to be merged for upcoming releases

- We will be reducing the debug info generated for the `dev` profile which reduces build-dir size and speeds up builds. We've split off a `debug` profile for when that is needed.

- Cargo will be deleting the directory rustc writes before each invocation, avoiding the leaking of debug files when split-debug is enabled (default on Mac)

- rlibs for workspace members will no longer be copied from build-dir to target-dir which takes up extra space on systems without hardlinking or where we skip it (like Mac)

- redundant information in rlibs and rmeta's is going to be de-duplicated

Examples of further out changes

- This release includes the foundational work to add a build-dir GC

- Cross-workspace de-duplicating of build-dirs

- Cross-workspace build-dir cache

- Early cut off



Note that this is a special form of early cut off (which was listed) where you are hashing a more specialized output file, rather than a broader one.

Ive always wondered why this wasn't an option from the beginning

To do it right you need

- stable id's even when the source changes

- a separate output file dedicated to it so you hash that

Those aren't free, taking extra work to implement and possibly slow down the compiler


Thanks for the list, looking forward to those improvements.

> Type names should be imported and used unqualified

This just pushes people to have redundant information in types (`IoError` instead of `io::Error`).

Unless a type is widely recognized (like `HashMap`), I prefer to have them fully qualified so I have the contextual meaning for it. If I am working with a generic name like `Source`, what does that mean? I shouldn't have to look up in the imports to understand the code (or only understand it through an LSP).

Reducing imports also reduces unnecessary merge conflicts.


It says below that that in cases of things like `io::Error` it should be used as that though, as in “cases of ambiguities”. It specifically speaks of not using `regex::Regex` but just `Regex` which seems more reasonable to me.


Google's style guides tend to reduce namespace redundancy.

Everyone remembers finding some hideous name like foo.widget.widgetBuilder.widgetFactory in Java or something. It's nice to have naming rules, or at least guidelines, focused on trimming redundancy and keeping the signal high.


> some hideous name like foo.widget.widgetBuilder.widgetFactory in Java or something

NO, it’s beautiful! https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...


That guideline is in response to an API design. I'm speaking to how the default stance (import types) feeds back into API design.


Having (hobby) worked with ObjectiveC/Cocoa and then later in Swift, I must say that although NSString looks ugly, it's glorious when it comes to trying to search for anything compared to String.


Honestly I think having blanket rules in either direction is a bad idea. Sometimes it makes sense to qualify things, sometimes it's clearer if you don't.


"This rule largely exists to avoid reviewer disagreements."


I think which to use in general Rust code depends on the purpose of your type.

A builder type like `Command` will have unqualified setters and `get_` qualified getters.

For record-like-structs, I think unqualified getters becomes preferred and `set_` qualified setters.


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: