Update all dependencies #13

Merged
kjuulh merged 1 commits from renovate/all into main 2022-11-15 18:26:39 +01:00
Owner

This PR contains the following updates:

Package Type Update Change
anyhow dependencies patch 1.0.60 -> 1.0.66
async-graphql dependencies patch 4.0.6 -> 4.0.16
axum dependencies patch 0.5.13 -> 0.5.17
axum dependencies patch 0.5.1 -> 0.5.17
clap dependencies major 3 -> 4
mockall dependencies patch 0.11.1 -> 0.11.3
postgres final major 14-alpine -> 15-alpine
serde (source) dependencies patch 1.0.136 -> 1.0.147
serde_json dependencies patch 1.0.68 -> 1.0.87
serde_json dependencies patch 1.0.81 -> 1.0.87
sqlx dependencies minor 0.5 -> 0.6
time (source) dependencies minor 0.2 -> 0.3
tokio (source) dependencies minor 1.20.1 -> 1.21.2
tracing (source) dependencies patch 0.1.36 -> 0.1.37
tracing-subscriber (source) dependencies patch 0.3.15 -> 0.3.16
uuid dependencies minor 1.1.2 -> 1.2.2
validator dependencies minor 0.15 -> 0.16

Release Notes

dtolnay/anyhow

v1.0.66

Compare Source

  • Reduce unhelpful backtrace frames in backtraces captured during a context call (#​279)

v1.0.65

Compare Source

v1.0.64

Compare Source

  • Correctly propagate Backtrace when using #[source] anyhow::Error with thiserror crate (#​231)

v1.0.63

Compare Source

v1.0.62

Compare Source

  • Fix extra rebuilding when interleaving command-line cargo invocations with IDE builds (#​261)

v1.0.61

Compare Source

  • Work around rust-analyzer builds poisoning all subsequent command-line cargo builds (#​252)
async-graphql/async-graphql

v4.0.16

  • Add credentials to GraphiQL 2 #​1105
  • Add TypeName support for InputObject #​1110
  • Fix error message #​1058
  • Add TypeName support for Enum, Union, OneofInputObject, Subscription, MergedObject, MergedSubscription, Scalar, Interface, Directive
  • Fixes #​1052
  • Implement CustomValidator<T> for F: Fn(&T) -> Result<(), E: Into<String>>
  • Add validator attribute to InputObject macro #​1072

v4.0.15

  • Dynamic Document Title for GraphiQL v2 and GraphQL Playground #​1099
  • Skip tracing for introspection queries. #​841
  • Add SchemaBuilder::disable_suggestions method to disable field suggestions. #​1101

v4.0.14

  • Implement a simple approach to using the link directive. #​1060
  • docs: Update federation docs with examples of each directive. #​1080
  • Add support for parse request from query string. #​1085

v4.0.13

  • Compare to expected schema #​1048
  • docs: readme flair #​1054
  • Remove bson-uuid feature #​1032
  • Add no_cache for cache_control attribute #​1051
  • Resurrect code generation through tests #​1062
  • Support for primitive type in CursorType #​1049
  • Add SDLExportOptions::include_specified_by method to enable specifiedBy directive #​1065

v4.0.12

  • Update MSRV to 1.59.0
  • Support @specifiedBy directive in SDL export #​1041
  • Add GraphiQL v2 #​1044
  • Export SDL: consistently avoid trailing spaces #​1043

v4.0.11

v4.0.10

  • Fixes extension request.data(X) being lost in the resolver #​1018
  • Add Apollo federation @shareable directive support #​1025
  • Add Apollo Federation @inaccessible directive support #​1026

v4.0.9

  • on_connection_init takes FnOnce instead of Fn #​1022

v4.0.8

  • Add tracing to dataloader methods when the tracing feature is enabled. #​996

v4.0.7

  • Limit parser recursion depth to 64.
tokio-rs/axum

v0.5.17: axum - v0.5.17

Compare Source

  • fixed: Annotate panicking functions with #[track_caller] so the error
    message points to where the user added the invalid router, rather than
    somewhere internally in axum (#​1248)
  • fixed: Make Multipart extractor work with RequestBodyLimit middleware (#​1379)
  • added: Add DefaultBodyLimit::max for changing the default body limit (#​1397)
  • added: Various documentation improvements

v0.5.16: axum - v0.5.16

Compare Source

Security

  • breaking: Added default limit to how much data Bytes::from_request will
    consume. Previously it would attempt to consume the entire request body
    without checking its length. This meant if a malicious peer sent an large (or
    infinite) request body your server might run out of memory and crash.

    The default limit is at 2 MB and can be disabled by adding the new
    DefaultBodyLimit::disable() middleware. See its documentation for more
    details.

    This also applies to these extractors which used Bytes::from_request
    internally:

    • Form
    • Json
    • String

    Thanks to Shachar Menashe for reporting this vulnerability.

    (#​1346)

v0.5.15: axum - v0.5.15

Compare Source

Note: This is a re-release of 0.5.14 that fixes an accidental breaking change.

  • fixed: Don't expose internal type names in QueryRejection response. (#​1171)
  • fixed: Improve performance of JSON serialization (#​1178)
  • fixed: Improve build times by generating less IR (#​1192)

v0.5.14: axum - v0.5.14

Compare Source

Yanked, as it contained an accidental breaking change.

clap-rs/clap

v4.0.25

Compare Source

Features
  • (error) Report available subcommands when required subcommand is missing

v4.0.24

Compare Source

Fixes
  • Avoid panic when printing an argument that isn't built

v4.0.23

Compare Source

Fixes
  • Don't panic on reporting invalid-long errors when followed by invalid UTF8
  • (help) Clarified argument to help subcommand

v4.0.22

Compare Source

Fixes
  • (help) Don't overflow into next-line-help early due to stale (pre-v4) padding calculations

v4.0.21

Compare Source

Features
  • (derive) long_about and long_help attributes, without a value, force using doc comment (before it wouldn't be set if there wasn't anything different than the short help)

v4.0.20

Compare Source

Fixes
  • (derive) Allow defaulted value parser for '()' fields

v4.0.19

Compare Source

Features
  • ColorChoice now implements ValueEnum

v4.0.18

Compare Source

Fixes
  • (derive) Allow #[command(skip)] to also work with enum variants with a value

v4.0.17

Compare Source

Fixes
  • Allow using Arg::last(true) with Arg::value_hint(ValueHint::CommandWithArguments)

v4.0.16

Compare Source

Fixes
  • Arg::exclusive(true) should not be exclusive with the argument's own ArgGroup

v4.0.15

Compare Source

Fixes
  • (error) Don't suggest -- when it doesn't help
  • (error) Be more consistent in quoting, punctuation, and indentation in errors

v4.0.14

Compare Source

Fixes
  • Only put ArgGroup in ArgMatches when explicitly specified, fixing derives handling of option-flattened fields (#​4375)

v4.0.13

Compare Source

Features
  • (derive) Allow () for fields to mean "don't read" (#​4371)

v4.0.12

Compare Source

Features
  • Added TypedValueParser::try_map for when adapting an existing TypedValueParser can fail
  • (error) Create errors like clap with Error::new, Error::with_cmd, and Error::insert

v4.0.11

Compare Source

Fixes
  • (help) Fix wrapping calculations with ANSI escape codes

v4.0.10

Compare Source

Features

v4.0.9

Compare Source

Fixes
  • (derive) Process doc comments for #[command(subcommand)] like in clap v3

v4.0.8

Compare Source

Fixes
  • (derive) Remove a low-value assert preventing defaulting Help and Version actions

v4.0.7

Compare Source

Features
  • (derive) Populate implicit ArgGroup (#​3165)
Fixes
  • (derive) Support #[group(skip)] on Parser derive
  • (derive) Tell users about implicit arg groups when running into group name conflicts
  • (error) Don't report unrelated groups in conflict or requires errors

v4.0.6

Compare Source

Features

v4.0.5

Compare Source

v4.0.4

Compare Source

Fixes
  • (error) Specialize the self-conflict error to look like clap v3

v4.0.3

Compare Source

Fixes
  • (error) Quote literals consistently
  • (error) Stylize escape (--) suggestions
  • (error) Format help flag as a literal

v4.0.2

Compare Source

Features
  • (error) Report available subcommands when required subcommand is missing

v4.0.1

Compare Source

Features
  • ColorChoice now implements ValueEnum

v4.0.0

Compare Source

Highlights

Arg::num_args(range)

Clap has had several ways for controlling how many values will be captured without always being clear on how they interacted, including

  • Arg::multiple_values(true)
  • Arg::number_of_values(4)
  • Arg::min_values(2)
  • Arg::max_values(20)
  • Arg::takes_value(true)

These have now all been collapsed into Arg::num_args which accepts both
single values and ranges of values. num_args controls how many raw arguments
on the command line will be captured as values per occurrence and independent
of value delimiters.

See Issue 2688 for more background.

Polishing Help

Clap strives to give a polished CLI experience out of the box with little
ceremony. With some feedback that has accumulated over time, we took this
release as an opportunity to re-evaluate our --help output to make sure it is
meeting that goal.

In doing this evaluation, we wanted to keep in mind:

  • Whether other CLIs had ideas that make sense to apply
  • Providing an experience that fits within the rest of applications and works across all shells

Before:

git
A fictional versioning CLI

USAGE:
    git <SUBCOMMAND>

OPTIONS:
    -h, --help    Print help information

SUBCOMMANDS:
    add      adds things
    clone    Clones repos
    help     Print this message or the help of the given subcommand(s)
    push     pushes things
    stash

After:

A fictional versioning CLI

Usage: git <COMMAND>

Commands:
  clone  Clones repos
  push   pushes things
  add    adds things
  stash
  help   Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help information
  • name/version header was removed because we couldn't justify the space it occupied when
    • Usage already includes the name
    • --version is available for showing the same thing (if the program has a version set)
  • Usage was dropped to one line to save space
  • Focus is put on the subcommands
  • Headings are now Title case
  • The more general term "command" is used rather than being explicit about being "subcommands"
  • The output is more dense with the expectation that it won't affect legibility but will allow more content
  • We've moved to a more neutral palette for highlighting elements (not highlighted above)

In talking to users, we found some that liked clap's man-like experience.
When deviating from this, we are making the assumption that those are more
power users and that the majority of users wouldn't look as favorably on being
consistent with man.

See Issue 4132 for more background.

More Dynamicism

Clap's API has focused on &str for performance but this can make
dealing with owned data difficult, like #[arg(default_value_t)] generating a
String from the default value.

Additionally, to avoid ArgMatches from borrowing (and for some features we
decided to forgo), clap took the &str argument IDs and hashed them. This
prevented us from providing a usable API for iterating over existing arguments.

Now clap has switched to a string newtype that gives us the flexibility to
decide whether to use &'static str, Cow<'static, str> for fast dynamic behavior, or
Box<str> for dynamic behavior with small binary size.

As an extension of that work, you can now call ArgMatches::ids to iterate
over the arguments and groups that were found when parsing. The newtype Id
was used to prevent some classes of bugs and to make it easier to understand
when opaque Ids are used vs user-visible strings.

Clearing Out Deprecations

Instead of doing all development on clap 4.0.0, we implemented a lot of new features during clap 3's development, deprecating the old API while introducing the new API, including:

  • Replacing the implicit behavior for args when parsing them with ArgAction
  • Replacing various one-off forms of value validation with the ValueParser API
    • Allowing derives to automatically do the right thing for PathBuf (allowing invalid UTF-8)
  • Replacing AppSettings and ArgSettings enums with getters/setters
  • Clarifying terms and making them more consistent
Migrating

Steps:

  1. Upgrade to v3 if you haven't already
  2. Add CLI tests (including example below), -h and --help output at a minimum (recommendation: trycmd for snapshot testing)
  3. If using Builder API: Explicitly set the arg.action(ArgAction::...) on each argument (StoreValue for options and IncOccurrences for flags)
  4. Run cargo check --features clap/deprecated and resolve all deprecation warnings
  5. Upgrade to v4
  6. Update feature flags
  • If default-features = false, run cargo add clap -F help,usage,error-context
  • Run cargo add clap -F wrap_help unless you want to hard code line wraps
  1. Resolve compiler errors
  2. Resolve behavior changes (see "subtle changes" under BREAKING CHANGES)
  3. At your leisure: resolve new deprecation notices

Example test (derive):


#[derive(clap::Parser)]
struct Cli {
    ...
}

#[test]
fn verify_cli() {
    use clap::CommandFactory;
    Cli::command().debug_assert()
}

Example test (builder):

fn cli() -> clap::Command {
    ...
}

#[test]
fn verify_cli() {
    cli().debug_assert();
}

Note: the idiomatic / recommended way of specifying different types of args in the Builder API has changed:

Before

.arg(Arg::new("flag").long("flag"))  # --flag
.arg(Arg::new("option").long("option").takes_value(true))  # --option <option>

After:

.arg(Arg::new("flag").long("flag").action(ArgAction::SetTrue))  # --flag
.arg(Arg::new("option").long("option"))  # --option <option>

In particular, num_args (the replacement for takes_value) will default appropriately
from the ArgAction and generally only needs to be set explicitly for the
other num_args use cases.

Breaking Changes

Subtle changes (i.e. compiler won't catch):

  • arg! now sets one of (#​3795):
    • ArgAction::SetTrue, requiring ArgMatches::get_flag instead of ArgMatches::is_present
    • ArgAction::Count, requiring ArgMatches::get_count instead of ArgMatches::occurrences_of
    • ArgAction::Set, requiring ArgMatches::get_one instead of ArgMatches::value_of
    • ArgAction::Append, requiring ArgMatches::get_many instead of ArgMatches::values_of
  • ArgAction::Set, ArgAction::SetTrue, and Arg::Action::SetFalse now
    conflict by default to be like ArgAction::StoreValue and
    ArgAction::IncOccurrences, requiring cmd.args_override_self(true) to override instead (#​4261)
  • By default, an Args default action is ArgAction::Set, rather than ArgAction::IncOccurrence to reduce confusing magic through consistency (#​2687, #​4032, see also #​3977)
  • mut_arg can no longer be used to customize help and version arguments, instead disable them (Command::disable_help_flag, Command::disable_version_flag) and provide your own (#​4056)
  • Removed lifetimes from Command, Arg, ArgGroup, and PossibleValue, assuming 'static. string feature flag will enable support for Strings (#​1041, #​2150, #​4223)
  • arg!(--flag <value>) is now optional, instead of required. Add .required(true) at the end to restore the original behavior (#​4206)
  • Added default feature flags, help, usage and error-context, requiring adding them back in if default-features = false (#​4236)
  • (parser) Always fill in "" argument for external subcommands to make it easier to distinguish them from built-in commands (#​3263)
  • (parser) Short flags now have higher precedence than hyphen values with Arg::allow_hyphen_values, to be consistent with Command::allow_hyphen_values (#​4187)
  • (parser) Arg::value_terminator must be its own argument on the CLI rather than being in a delimited list (#​4025)
  • (help) Line wrapping of help is now behind the existing wrap_help feature flag, either enable it or hard code your wraps (#​4258)
  • (help) Make DeriveDisplayOrder the default and removed the setting. To sort help, set next_display_order(None) (#​2808)
  • (help) Subcommand display order respects Command::next_display_order instead of DeriveDisplayOrder and using its own initial display order value (#​2808)
  • (help) Subcommands are now listed before arguments. To get the old behavior, see Command::help_template (#​4132)
  • (help) Help headings are now title cased, making any user-provided help headings inconsistent. To get the old behavior, see Command::help_template, Arg::help_heading, and Command::subcommand_help_heading (#​4132)
  • (help) "Command" is used as the section heading for subcommands and COMMAND for the value name. To get the old behavior, see Command::subcommand_help_heading and Arg::subcommand_value_name (#​4132, #​4155)
  • (help) Whitespace in help output is now trimmed to ensure consistency regardless of how well a template matches the users needs. (#​4132, #​4156)
  • (help) name/version/author are removed by default from help output. To get the old behavior, see Command::help_template. (#​4132, #​4160)
  • (help) Indentation for second-line usage changed. (#​4132, #​4188)
  • (env) Parse --help and --version like any ArgAction::SetTrue flag (#​3776)
  • (derive) Leave Arg::id as verbatim casing, requiring updating of string references to other args like in conflicts_with or requires (#​3282)
  • (derive) Doc comments for ValueEnum variants will now show up in --help (#​3312)
  • (derive) When deriving Args, and ArgGroup is created using the type's name, reserving it for future use (#​2621, #​4209)
  • (derive) next_help_heading can now leak out of a #[clap(flatten)], like all other command settings (#​4222)

Easier to catch changes:

  • Looking up a group in ArgMatches now returns the arg Ids, rather than the values to reduce overhead and offer more flexibility. (#​4072)
  • Changed Arg::number_of_values (average-across-occurrences) to Arg::num_args (per-occurrence) (raw CLI args, not parsed values) (#​2688, #​4023)
    • num_args(0) no longer implies takes_value(true).multiple_values(true) (#​4023)
    • num_args(1) no longer implies multiple_values(true) (#​4023)
    • Does not check default or env values, only what the user explicitly passes in (#​4025)
    • No longer terminates on delimited values (#​4025)
  • Replace Arg::min_values (across all occurrences) with Arg::num_args(N..) (per occurrence) to reduce confusion over different value count APIs (#​4023)
  • Replace Arg::max_values (across all occurrences) with Arg::num_args(1..=M) (per occurrence) to reduce confusion over different value count APIs (#​4023)
  • Replace Arg::multiple_values(true) with Arg::num_args(1..) and Arg::multiple_values(false) with Arg::num_args(0) to reduce confusion over different value count APIs (#​4023)
  • Replace Arg::takes_value(true) with Arg::num_args(1) and Arg::takes_value(false) with Arg::num_args(0) to reduce confusion over different value count APIs
  • Remove Arg::require_value_delimiter, either users could use Arg::value_delimiter or implement a custom parser with TypedValueParser as it was mostly to make multiple_values(true) act like multiple_values(false) and isn't needed anymore (#​4026)
  • Arg::new("help") and Arg::new("version") no longer implicitly disable the
    built-in flags and be copied to all subcommands, instead disable
    the built-in flags (Command::disable_help_flag,
    Command::disable_version_flag) and mark the custom flags as global(true). (#​4056)
  • Arg::short('h') no longer implicitly disables the short flag for help,
    instead disable
    the built-in flags (Command::disable_help_flag,
    Command::disable_version_flag) provide your own Arg::new("help").long("help").action(ArgAction::Help).global(true). (#​4056)
  • ArgAction::SetTrue and ArgAction::SetFalse now prioritize Arg::default_missing_value over their standard behavior (#​4000)
  • Changed Arg::requires_ifs and Arg::default_value*_ifs* to taking an ArgPredicate, removing ambiguity with None when accepting owned and borrowed types (#​4084)
  • Removed PartialEq and Eq from Command so we could change external subcommands to use a ValueParser (#​3990)
  • Various Arg, Command, and ArgGroup calls were switched from accepting &[] to [] via IntoIterator to be more flexible (#​4072)
  • Arg::short_aliases and other builder functions that took &[] need the & dropped (#​4081)
  • ErrorKind and Result moved into the error module
  • ErrorKind::EmptyValue replaced with ErrorKind::InvalidValue to remove an unnecessary special case (#​3676, #​3968)
  • ErrorKind::UnrecognizedSubcommand replaced with ErrorKind::InvalidSubcommand to remove an unnecessary special case (#​3676)
  • Changed the default type of allow_external_subcommands from String to OsString as that is less likely to cause bugs in user applications (#​3990)
  • (help) Command::render_usage now returns a StyledStr (#​4248)
  • (derive) Changed the default for arguments from parse to value_parser, removing parse support (#​3827, #​3981)
    • #[clap(value_parser)] and #[clap(action)] are now redundant
  • (derive) subcommand_required(true).arg_required_else_help(true) is set instead of SubcommandRequiredElseHelp to give more meaningful errors when subcommands are missing and to reduce redundancy (#​3280)
  • (derive) Remove arg_enum attribute in favor of value_enum to match the new name (we didn't have support in v3 to mark it deprecated) (#​4127)
  • (parser) Assert when the CLI looksup an unknown args when external subcommand support is enabled to help catch bugs (#​3703)
  • (assert) Sometimes Arg::default_missing_value didn't require num_args(0..=N), now it does (#​4023)
  • (assert) Leading dashes in Arg::long are no longer allowed (#​3691)
  • (assert) Disallow more value_names than num_args (#​2695)
  • (assert) Always enforce that version is specified when the ArgAction::Version is used
  • (assert) Add missing #[track_caller]s to make it easier to debug asserts
  • (assert) Ensure overrides_with IDs are valid
  • (assert) Ensure no self-overrides_with now that Actions replace it
  • (assert) Ensure subcommand names are not duplicated
  • (assert) Assert on mut_arg receiving an invalid arg ID or mut_subcommand receiving an invalid command name
Compatibility

MSRV is now 1.60.0

Deprecated

  • Arg::use_value_delimiter in favor of Arg::value_delimiter to avoid having multiple ways of doing the same thing
  • Arg::requires_all in favor of Arg::requires_ifs now that it takes an ArgPredicate to avoid having multiple ways of doing the same thing
  • Arg::number_of_values in favor of Arg::num_args to clarify semantic differences
  • default_value_os, default_values_os, default_value_if_os, and default_value_ifs_os as the non _os variants now accept either a str or an OsStr (#​4141)
  • Arg::env_os in favor of Arg::env
  • Command::dont_collapse_args_in_usage is now the default (#​4151)
  • Command::trailing_var_arg in favor of Arg::trailing_var_arg to make it clearer which arg it is meant to apply to (#​4187)
  • Command::allow_hyphen_values in favor of Arg::allow_hyphen_values to make it clearer which arg it is meant to apply to (#​4187)
  • Command::allow_negative_numbers in favor of Arg::allow_negative_numbers to make it clearer which arg it is meant to apply to (#​4187)
  • (help) Deprecated Command::write_help and Command::write_long_help in favor of Command::render_help and Command::render_long_help (#​4248)
  • (derive) structopt and clap attributes in favor of the more specific command, arg, and value to open the door for more features and clarify relationship to the builder (#​1807, #​4180)
  • (derive) #[clap(value_parser)] and #[clap(action)] defaulted attributes (its the default) (#​3976)

Behavior Changes

  • (help) With wrap_help feature, if the terminal size cannot be determined, LINES and COLUMNS variables are used (#​4186)
Features
  • Arg::num_args now accepts ranges, allowing setting both the minimum and maximum number of values per occurrence (#​2688, #​4023)
  • Allow non-bool value_parsers for ArgAction::SetTrue / ArgAction::SetFalse (#​4092)
  • Add From<&OsStr>, From<OsString>, From<&str>, and From<String> to value_parser! (#​4257)
  • Allow resetting most builder methods
  • Can now pass runtime generated data to Command, Arg, ArgGroup, PossibleValue, etc without managing lifetimes with the string feature flag (#​2150, #​4223)
  • New default error-context, help and usage feature flags that can be turned off for smaller binaries (#​4236)
  • Added StyledStr::ansi() to Display with ANSI escape codes (#​4248)
  • (error) Error::apply for changing the formatter for dropping binary size (#​4111)
  • (error) Error::renderfor formatting the error into a StyledStr
  • (help) Show PossibleValue::help in long help (--help) (#​3312)
  • (help) New {tab} variable for Command::help_template (#​4161)
  • (help) Command::render_help and Command::render_long_help for formatting the error into a StyledStr (#​3873, #​4248)
  • (help) Command::render_usage now returns a StyledStr (#​4248)
Fixes
  • Verify required is not used with conditional required settings (#​3660)
  • Replaced cmd.allow_invalid_for_utf8_external_subcommands with cmd.external_subcommand_value_parser (#​3733)
  • Arg::default_missing_value now applies per occurrence rather than if a value is missing across all occurrences (#​3998)
  • arg!(--long [value]) to accept 0..=1 per occurrence rather than across all occurrences, making it safe to use with ArgAction::Append (#​4001)
  • Allow OsStrs for Arg::{required_if_eq,required_if_eq_any,required_if_eq_all} (#​4084)
  • (help) With wrap_help feature, if the terminal size cannot be determined, LINES and COLUMNS variables are used (#​4186)
  • (help) Use Command::display_name in the help title rather than Command::bin_name
  • (help) Show when a flag is ArgAction::Count by adding an ... (#​4003)
  • (help) Use a more neutral palette for coloring (#​4132, #​4117)
  • (help) Don't rely on ALL CAPS for help headers (#​4132, #​4123)
  • (help) List subcommands first, focusing the emphasis on them (#​4132, #​4125)
  • (help) Do not include global args in cmd help help (#​4131)
  • (help) Use [positional] in list when relevant (#​4144)
  • (help) Show all [positional] in usage (#​4151)
  • (help) Polish up subcommands by referring to them as commands (#​4132, #​4155)
  • (help) Trim extra whitespace to avoid artifacts from different uses of templates (#​4132, #​4156)
  • (help) Hint to the user the difference between -h / --help when applicable (#​4132, #​4159)
  • (help) Shorten help by eliding name/version/author (#​4132, #​4160)
  • (help) When short help is long enough to activate next_line_help, don't add blank lines (#​4132, #​4190)
  • (help) Make help output more dense (reducing horizontal whitespace) (#​4132, #​4192)
  • (help) Separate subcommand flags with "," like option flags (#​4232, #​4235)
  • (help) Quote the suggested help flag (#​4220)
  • (version) Use Command::display_name rather than Command::bin_name (#​3966)
  • (parser) Always fill in "" argument for external subcommands (#​3263)
  • (parser) Short flags now have higher precedence than hyphen values with Arg::allow_hyphen_values, like Command::allow_hyphen_values (#​4187)
  • (parser) Prefer InvalidSubcommand over UnknownArgument in more cases (#​4219)
  • (derive) Detect escaped external subcommands that look like built-in subcommands (#​3703)
  • (derive) Leave Arg::id as verbatim casing (#​3282)
  • (derive) Default to #[clap(value_parser, action)] instead of #[clap(parse)] (#​3827)

v3.2.23

Compare Source

[3.2.23] - 2022-10-24
Fixes
  • Upgrade to textwrap 0.16

v3.2.22

Compare Source

[3.2.22] - 2022-09-16
Fixes
  • Unify dependencies on terminal_size to the 0.2 release

v3.2.21

Compare Source

[3.2.21] - 2022-09-12
Features
  • TypedValueParser::map to allow reusing existing value parsers for other purposes

v3.2.20

Compare Source

[3.2.20] - 2022-09-02
Features
  • ArgMatches::get_count help for ArgAction::Count
  • ArgMatches::get_flag help for ArgAction::SetTrue / ArgAction::SetFalse

v3.2.19

Compare Source

[3.2.19] - 2022-08-30
Fixes
  • (help) Ensure required arguments for parent commands aren't shown in their subcommands when using args_conflicts_with_subcommand

v3.2.18

Compare Source

Fixes
  • (help) Command::print_help now respects Command::colored_help
  • (derive) Improved error messages

v3.2.17

Compare Source

Fixes
  • (derive) Expose #[clap(id = ...)] attribute to match Arg's latest API

v3.2.16

Compare Source

Fixes
  • Ensure required arguments appear in errors when they are also members of a group (#​4004)

v3.2.15

Compare Source

Features
  • (derive) New default_values_t and default_values_os_t attributes

v3.2.14

Compare Source

Fixes
  • A multiple_values positional followed by another positional now works with multiple flags

v3.2.13

Compare Source

Documentation
  • Pulled in tutorials, cookbook, and derive reference into rustdoc

v3.2.12

Compare Source

Fixes
  • Allow an arg to declare a conflict with a group

v3.2.11

Compare Source

Features
  • Added Arg::get_all_short_aliaes and Arg::get_all_aliases

v3.2.10

Compare Source

Fixes
  • Loosen lifetime on Command::mut_subcommand

v3.2.8

Compare Source

Features
  • Added Command::mut_subcommand to mirror Command::mut_arg

v3.2.7

Compare Source

Fixes
  • Global arguments should override env-sourced arguments

v3.2.6

Compare Source

Fixes
  • Don't panic when parsing --=

v3.2.5

Compare Source

Fixes
  • (derive) Fix regression with #[clap(default_value_os_t ...)] introduced in v3.2.3

v3.2.4

Compare Source

Fixes
  • (derive) Provide more clearer deprecation messages for #[clap(parse)] attribute (#​3832)

v3.2.3

Compare Source

Fixes
  • Moved deprecations to be behind the deprecated Cargo.toml feature (#​3830)
    • For now, it is disabled by default though we are considering enabling it by
      default as we release the next major version to help draw attention to the
      deprecation migration path

v3.2.2

Compare Source

Fixes
  • (derive) Improve the highlighted code for deprecation warnings

gated behind unstable-v4

  • (derive) Default to #[clap(value_parser, action)] instead of #[clap(parse)] (#​3827)

v3.2.1

Compare Source

Fixes
  • (help) Command::print_help now respects Command::colored_help
  • (derive) Improved error messages

v3.2.0

Compare Source

Compatibility

MSRV is now 1.56.0 (#​3732)

Behavior

  • Defaults no longer satisfy required and its variants (#​3793)
  • When misusing ArgMatches::value_of and friends, debug asserts were turned into panics

Moving (old location deprecated)

  • clap::{PossibleValue, ValueHint} to clap::builder::{PossibleValue, ValueHint}
  • clap::{Indices, OsValues, ValueSource, Values} to clap::parser::{Indices, OsValues, ValueSource, Values}
  • clap::ArgEnum to clap::ValueEnum (#​3799)

Replaced

  • Arg::allow_invalid_utf8 with Arg::value_parser(value_parser!(PathBuf)) (#​3753)
  • Arg::validator / Arg::validator_os with Arg::value_parser (#​3753)
  • Arg::validator_regex with users providing their own builder::TypedValueParser (#​3756)
  • Arg::forbid_empty_values with builder::NonEmptyStringValueParser / builder::PathBufValueParser (#​3753)
  • Arg::possible_values with Arg::value_parser([...]), builder::PossibleValuesParser, or builder::EnumValueParser (#​3753)
  • Arg::max_occurrences with arg.action(ArgAction::Count).value_parser(value_parser!(u8).range(..N)) for flags (#​3797)
  • Arg::multiple_occurrences with ArgAction::Append or ArgAction::Count though positionals will need Arg::multiple_values (#​3772, #​3797)
  • Command::args_override_self with ArgAction::Set (#​2627, #​3797)
  • AppSettings::NoAutoVersion with ArgAction or Command::disable_version_flag (#​3800)
  • AppSettings::NoHelpVersion with ArgAction or Command::disable_help_flag / Command::disable_help_subcommand (#​3800)
  • ArgMatches::{value_of, value_of_os, value_of_os_lossy, value_of_t} with ArgMatches::{get_one,remove_one} (#​3753)
  • ArgMatches::{values_of, values_of_os, values_of_os_lossy, values_of_t} with ArgMatches::{get_many,remove_many} (#​3753)
  • ArgMatches::is_valid_arg with ArgMatches::{try_get_one,try_get_many} (#​3753)
  • ArgMatches::occurrences_of with ArgMatches::value_source or ArgAction::Count (#​3797)
  • ArgMatches::is_present with ArgMatches::contains_id or ArgAction::SetTrue (#​3797)
  • ArgAction::StoreValue with ArgAction::Set or ArgAction::Append (#​3797)
  • ArgAction::IncOccurrences with ArgAction::SetTrue or ArgAction::Count (#​3797)
  • (derive) #[clap(parse(...))] replaced with: (#​3589, #​3794)
    • For default parsers (no parse attribute), deprecation warnings can be
      silenced by opting into the new behavior by adding either #[clap(action)]
      or #[clap(value_parser)] (ie requesting the default behavior for these
      attributes). Alternatively, the unstable-v4 feature changes the default
      away from parse to action/value_parser.
    • For #[clap(parse(from_flag))] replaced with #[clap(action = ArgAction::SetTrue)] (#​3794)
    • For #[clap(parse(from_occurrences))] replaced with #[clap(action = ArgAction::Count)] though the field's type must be u8 (#​3794)
    • For #[clap(parse(from_os_str)] for PathBuf, replace it with
      #[clap(value_parser)] (as mentioned earlier this will call
      value_parser!(PathBuf) which will auto-select the right ValueParser
      automatically).
    • For #[clap(parse(try_from_str = ...)], replace it with #[clap(value_parser = ...)]
    • For most other cases, a type implementing TypedValueParser will be needed and specify it with #[clap(value_parser = ...)]
Features
  • Parsed, typed arguments via Arg::value_parser / ArgMatches::{get_one,get_many} (#​2683, #​3732)
    • Several built-in TypedValueParsers available with an API open for expansion
    • value_parser!(T) macro for selecting a parser for a given type (#​3732) and open to expansion via the ValueParserFactory trait (#​3755)
    • [&str] is implicitly a value parser for possible values
    • All ArgMatches getters do not assume required arguments (#​2505)
    • Add ArgMatches::remove_* variants to transfer ownership
    • Add ArgMatches::try_* variants to avoid panics for developer errors (#​3621)
    • Add a get_raw to access the underlying OsStrs
    • PathBuf value parsers imply ValueHint::AnyPath for completions (#​3732)
  • Explicit control over parsing via Arg::action (#​3774)
    • ArgAction::StoreValue: existing takes_value(true) behavior
    • ArgAction::IncOccurrences: existing takes_value(false) behavior
    • ArgAction::Help: existing --help behavior
    • ArgAction::Version: existing --version behavior
    • ArgAction::Set: Overwrite existing values (like Arg::multiple_occurrences mixed with Command::args_override_self) (#​3777)
    • ArgAction::Append: like Arg::multiple_occurrences (#​3777)
    • ArgAction::SetTrue: Treat --flag as --flag=true (#​3775)
      • Implies Arg::default_value("false") (#​3786)
      • Parses Arg::env via Arg::value_parser
    • ArgAction::SetFalse: Treat --flag as --flag=false (#​3775)
      • Implies Arg::default_value("true") (#​3786)
      • Parses Arg::env via Arg::value_parser
    • ArgAction::Count: Treat --flag --flag --flag as --flag=1 --flag=2 --flag=3 (#​3775)
      • Implies Arg::default_value("0") (#​3786)
      • Parses Arg::env via Arg::value_parser
  • (derive) Opt-in to new Arg::value_parser / Arg::action with either #[clap(value_parser)] (#​3589, #​3742) / #[clap(action)] attributes (#​3794)
    • Default ValueParser is determined by value_parser! (#​3199, #​3496)
    • Default ArgAction is determine by a hard-coded lookup on the type (#​3794)
  • Command::multicall is now stable for busybox-like programs and REPLs (#​2861, #​3684)
  • ArgMatches::{try_,}contains_id for checking if there are values for an argument that mirrors the new get_{one,many} API
Fixes
  • Don't correct argument id in default_value_ifs_os(#​3815)

parser

  • Set ArgMatches::value_source and ArgMatches::occurrences_of for external subcommands (#​3732)
  • Use value delimiter for Arg::default_missing_values (#​3761, #​3765)
  • SplitArg::default_value / Arg::env on value delimiters independent of whether -- was used (#​3765)
  • Allow applying defaults to flags (#​3294, 3775)
  • Defaults no longer satisfy required and its variants (#​3793)

v3.1.18

Compare Source

Fixes
  • Fix deprecated arg_enum! for users migrating to clap3 (#​3717)
  • Verify all required_unless_present_all arguments exist
  • Verify group members exist before processing group members (#​3711)
  • (help) Use ... when not enough value_names are supplied

gated behind unstable-v4

  • Verify required is not used with conditional required settings (#​3660)
  • Disallow more value_names than number_of_values (#​2695)
  • (parser) Assert on unknown args when using external subcommands (#​3703)
  • (parser) Always fill in "" argument for external subcommands (#​3263)
  • (derive) Detect escaped external subcommands that look like built-in subcommands (#​3703)
  • (derive) Leave Arg::id as verbatim casing (#​3282)

v3.1.17

Compare Source

Fixes
  • Allow value names for arg! macro to have dashes when quoted, like longs

v3.1.16

Compare Source

Fixes
  • (parser) Arg::exclusive overrides Arg::required, like other conflicts
  • (error) Don't duplicate arguments in usage
  • (error) Don't show hidden arguments in conflict error usage
  • (help) New help_template variable {name} to fix problems with {bin}
  • (help) Don't wrap URLs

gated behind unstable-v4

  • Leading dashes in Arg::long are no longer allowed
  • (help) Use Command::display_name in the help title rather than Command::bin_name

v3.1.15

Compare Source

Fixes
  • (error) Render actual usage for unrecognized subcommands
  • (multicall) Improve bad command error
  • (multicall) Always require a multicall command
  • (multicall) Disallow arguments on multicall parent command
  • (multicall) More consistent with rest of clap errors

v3.1.14

Compare Source

Fixes
  • Panic when calling Command::build with a required positional argument nested several layers in subcommands

v3.1.13

Compare Source

Fixes
  • Help subcommand and Command::write_help now report required arguments in usage in more circumstances
  • Unknown subcommand for help subcommand flag now reports an error with more context
  • More details reported when using debug feature
  • Allow disabling color feature with debug feature enabled

v3.1.12

Compare Source

Fixes
  • Regression in 3.1.11 where the (output) streams were crossed

v3.1.11

Compare Source

Fixes
  • Implied conflicts override Arg::required, making the behavior consistent with how we calculate conflicts for error reporting
  • Members of a mutually exclusive ArgGroup override Arg::required, making the behavior consistent with how we calculate conflicts for error reporting
  • Arg::overrides_with always override Arg::required, not just when the parser processes an override

v3.1.10

Compare Source

Features
  • Expose Command::build for custom help generation or other command introspection needs

v3.1.9

Compare Source

Fixes
  • Pin the clap_derive version so a compatible version is always used with clap

v3.1.8

Compare Source

Fixes
  • Add Debug impls to more types

v3.1.7

Compare Source

Fixes
  • (derive) Abort, rather than ignore, when deriving ArgEnum with non-unit unskipped variants

v3.1.6

Compare Source

Fixes
  • Don't panic when validating delimited defaults (#​3541)
  • Make it clearer that cargo feature is needed
  • Documentation improvements

v3.1.5

Compare Source

Fixes
  • Dependency upgrade

v3.1.4

Compare Source

Features
  • (help) Show PossibleValue::help in long help (--help) (gated behind unstable-v4) (#​3312)

v3.1.3

Compare Source

Fixes
  • Don't panic when validating delimited defaults (#​3514)

v3.1.2

Compare Source

Fixes
  • (derive) Allow other attribute with a subcommand that has subcommands
Documentation
  • (examples) List example topics
  • (derive) Clarify syntax and relation to builder API

v3.1.1

Compare Source

Fixes
  • Fix deprecated arg_enum! for users migrating to clap3 (#​3717)
  • Verify all required_unless_present_all arguments exist
  • Verify group members exist before processing group members (#​3711)
  • (help) Use ... when not enough value_names are supplied

gated behind unstable-v4

  • Verify required is not used with conditional required settings (#​3660)
  • Disallow more value_names than number_of_values (#​2695)
  • (parser) Assert on unknown args when using external subcommands (#​3703)
  • (parser) Always fill in "" argument for external subcommands (#​3263)
  • (derive) Detect escaped external subcommands that look like built-in subcommands (#​3703)
  • (derive) Leave Arg::id as verbatim casing (#​3282)

v3.1.0

Compare Source

Compatibility

Changes in behavior of note that are not guaranteed to be compatible across releases:

  • (help) help subcommand shows long help like --help, rather than short help (-h), deprecated clap::AppSettings::UseLongFormatForHelpSubcommand (#​3440)
  • (help) Pacman-style subcommands are now ordered the same as usage errors (#​3470)
  • (help) Pacman-style subcommands use standard alternate syntax in usage (#​3470)
Deprecations
  • clap::Command is now preferred over clap::App (#​3089 in #​3472)
    • clap::command! is now preferred over clap::app_from_crate (#​3089 in #​3474)
    • clap::CommandFactory::command is now preferred over clap::IntoApp::into_app (#​3089 in #​3473)
  • (help) help subcommand shows long help like --help, rather than short help (-h), deprecated clap::AppSettings::UseLongFormatForHelpSubcommand (#​3440)
  • (error) Deprecate clap::AppSettings::WaitOnError, leaving it to the user to implement
  • (validation) clap::Command::subcommand_required(true).arg_required_else_help(true) is now preferred over clap::AppSettings::SubcommandRequiredElseHelp (#​3280)
  • (builder) clap::AppSettings are nearly all deprecated and replaced with builder methods and getters (#​2717)
  • (builder) clap::ArgSettings is deprecated and replaced with builder methods and getters (#​2717)
  • (builder) clap::Arg::id and clap::ArgGroup::id are now preferred over clap::Arg::name and clap::ArgGroup::name (#​3335)
  • (help) clap::Command::next_help_heading is now preferred over clap::Command::help_heading (#​1807, #​1553)
  • (error) clap::error::ErrorKind is now preferred over clap::ErrorKind (#​3395)
  • (error) clap::Error::kind() is now preferred over clap::Error::kind
  • (error) clap::Error::context() is now preferred over clap::Error::info (#​2628)

Note: All items deprecated in 3.0.0 are now hidden in the documentation. (#​3458)

Features
  • (matches) Add clap::ArgMatches::value_source to determine what insert the value (#​1345)
  • (help) Override derived display order with clap::Command::next_display_order (#​1807)
  • (error) Show possible values when an argument doesn't have a value (#​3320)
  • (error) New clap::Error::context API to open the door for fully-custom error messages (#​2628)
    • (error) clap::error::ErrorKind now implements Display
Fixes
  • (builder) Some functions were renamed for consistency and fixing spelling issues
  • (builder) Allow clap::Command::color to override previous calls (#​3449)
  • (parse) Propagate globals with multiple subcommands (#​3428)
  • (validation) Give ArgRequiredElseHelp precedence over SubcommandRequired (#​3456)
  • (validation) Default values no longer count as "present" for conflicts, requires, clap::Command::arg_required_else_help, etc (#​3076, #​1264)
  • (assert) Report invalid defaults (#​3202)
  • (help) Clarify how to handle -h conflicts (#​3403)
  • (help) Make it easier to debug the addition of help flags (#​3425)
  • (help) Pacman-style subcommands are now separated with spaces (#​3470)
  • (help) Pacman-style subcommands are now ordered the same as usage errors (#​3470)
  • (help) Pacman-style subcommands use standard alternate syntax in usage (#​3470)
  • (error) Be consistent in showing of required attributes between errors / usage (#​3390)
  • (error) Show user's order of possible values, like in --help (#​1549)
  • (error) Allow customizing error type in clap::error::Result (#​3395)
Performance
  • (error) Reduced stack size of clap::Error (#​3395)
Documentation
  • (builder) Correct data take accepted for clap::Arg::validator
  • (derive) Clarify parse attribute
  • (tutorial) Demonstrate custom parsing
  • (example) Consistently list out required feature flags (#​3448)

v3.0.14

Compare Source

Features
  • Added ArgMatches::args_present() to check if any args are present
  • Added Error::kind() as we work to deprecate direct member access for Error
  • Added App::get_version
  • Added App::get_long_version
  • Added App::get_author
  • Added App::get_subcommand_help_heading
  • Added App::get_subcommand_value_name
  • Added App::get_after_help
  • Added App::get_after_long_help
Performance
  • Misc binary size reductions

v3.0.13

Compare Source

Fixes
  • Show optional flag values wrapped in []

v3.0.12

Compare Source

Features
  • (derive) Support for default_value_os_t

v3.0.11

Compare Source

Fixes
  • Ensure conflicts work when they target a group with a default value

v3.0.10

Compare Source

Fixes
  • Resolve panic! from v3.0.8 when using global_setting(PropagateVersion).

v3.0.9

Compare Source

Features
  • Added App::find_subcommand_mut

v3.0.8

Compare Source

Fixes
  • Respected DisableColoredHelp on cmd help help
  • Provide a little more context when completing arguments for cmd help
  • Provide more context for some asserts
  • Small documentation improvements

v3.0.7

Compare Source

Fixes
  • Shift more asserts from parsing to App building (ie will now run in App::debug_assert)

derive

  • Documentation fixes

v3.0.6

Compare Source

Fixes

derive

  • Don't assume user does use clap::ArgEnum (#​3277)
  • Documentation fixes

v3.0.5

Compare Source

Fixes

docs:

  • Cleaned up code blocks in tutorials (#​3261)
  • Clean up quotes in ArgMatches asserts
  • List correct replacement for deprecated Parser::from_clap (#​3257)

v3.0.4

Compare Source

Features
  • For very limited cases, like cargo, expose ArgMatches::is_valid_arg to avoid panicing on undefined arguments

v3.0.3

Compare Source

Fixes
  • Specify cause of debug assert failure

v3.0.2

Compare Source

Fixes
  • Ignore Last when checking hyphen values (see #​3249 for details)
  • Help catch bugs with #[must_use]

v3.0.1

Compare Source

Features
  • Added ArgMatches::args_present() to check if any args are present
  • Added Error::kind() as we work to deprecate direct member access for Error
  • Added App::get_version
  • Added App::get_long_version
  • Added App::get_author
  • Added App::get_subcommand_help_heading
  • Added App::get_subcommand_value_name
  • Added App::get_after_help
  • Added App::get_after_long_help
Performance
  • Misc binary size reductions
asomers/mockall

v0.11.3

Compare Source

v0.11.2

Compare Source

Fixed
  • Suppress "dead code" warnings when automocking a struct's private method. It
    might be used only by other public methods in the same struct.
    (#​397)

  • Fixed using Mockall when a function named Ok is in scope. The anyhow
    crate, for example, creates a function by this name.
    (#​389)

serde-rs/serde

v1.0.147

Compare Source

  • Add serde::de::value::EnumAccessDeserializer which transforms an EnumAccess into a Deserializer (#​2305)

v1.0.146

Compare Source

v1.0.145

Compare Source

v1.0.144

Compare Source

  • Change atomic ordering used by Serialize impl of atomic types to match ordering used by Debug impl of those same types (#​2263, thanks @​taiki-e)

v1.0.143

Compare Source

  • Invert build.rs cfgs in serde_test to produce the most modern configuration in the default case (#​2253, thanks @​taiki-e)

v1.0.142

Compare Source

  • Add keywords to crates.io metadata

v1.0.141

Compare Source

  • Add no-std category to crates.io metadata

v1.0.140

Compare Source

  • Invert serde_derive cfgs to convenience non-Cargo builds on a modern toolchain (#​2251, thanks @​taiki-e)

v1.0.139

Compare Source

  • Add new constructor function for all IntoDeserializer impls (#​2246)

v1.0.138

Compare Source

  • Documentation improvements

v1.0.137

Compare Source

  • Update documentation links to some data formats whose repos have moved (#​2201, thanks @​atouchet)
  • Fix declared rust-version of serde and serde_test (#​2168)
serde-rs/json

v1.0.87

Compare Source

  • Add write_i128 and write_u128 methods to serde_json::Formatter to control the formatting of 128-bit integers (#​940, thanks @​Lucretiel)

v1.0.86

Compare Source

v1.0.85

Compare Source

  • Make Display for Number produce the same representation as serializing (#​919)

v1.0.84

Compare Source

  • Make Debug impl of serde_json::Value more compact (#​918)

v1.0.83

Compare Source

  • Add categories to crates.io metadata

v1.0.82

Compare Source

v1.0.81

Compare Source

  • Work around indexmap/autocfg not always properly detecting whether a std sysroot crate is available (#​885, thanks @​cuviper)

v1.0.80

Compare Source

  • Documentation improvements

v1.0.79

Compare Source

  • Allow RawValue deserialization to propagate \u escapes for unmatched surrogates, which can later by deserialized to Vec<u8> (#​830, thanks @​lucacasonato)

v1.0.78

Compare Source

  • Support deserializing as &RawValue in map key position, which would previously fail with "invalid type: newtype struct" (#​851)

v1.0.77

Compare Source

  • Include discord invite links in the published readme
  • Improve compile error on compiling with neither std nor alloc feature enabled
  • Include integration tests in published package (#​578)

v1.0.76

Compare Source

  • Fix a build error when features raw_value and alloc are enabled while std is disabled (#​850)

v1.0.75

Compare Source

  • Fix deserialization of small integers in arbitrary_precision mode (#​845)

v1.0.74

Compare Source

  • Allow creating RawValues from references to unsized values (#​841, thanks @​EFanZh)

v1.0.73

Compare Source

  • Update itoa dependency to 1.0

v1.0.72

Compare Source

v1.0.71

Compare Source

v1.0.70

Compare Source

v1.0.69

Compare Source

launchbadge/sqlx

v0.6.2

Compare Source

25 pull requests were merged this release cycle.

Added
  • [#&#8203;1081]]: Add `try_from` attribute for `FromRow` derive \[\[[@&#8203;zzhengzhuo](https://github.com/zzhengzhuo)]]
    -   Exemplifies "out of sight, out of mind." It's surprisingly easy to forget about PRs when they get pushed onto
        the second page. We'll be sure to clean out the backlog for 0.7.0.
    
  • [#&#8203;2014]]: Support additional SQLCipher options in SQLite driver. \[\[[@&#8203;szymek156](https://github.com/szymek156)]]
    
  • [#&#8203;2052]]: Add issue templates \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;2053]]: Add documentation for `IpAddr` support in Postgres \[\[[@&#8203;rakshith-ravi](https://github.com/rakshith-ravi)]]
    
  • [#&#8203;2062]]: Add extension support for SQLite \[\[[@&#8203;bradfier](https://github.com/bradfier)]]
    
  • [#&#8203;2063]]: customizable db locking during migration \[\[[@&#8203;fuzzbuck](https://github.com/fuzzbuck)]]
    
    
Changed
  • [#&#8203;2025]]: Bump sqlformat to 2.0 \[\[[@&#8203;NSMustache](https://github.com/NSMustache)]]
    
  • [#&#8203;2056]]: chore: Switch to sha1 crate \[\[[@&#8203;stoically](https://github.com/stoically)]]
    
  • [#&#8203;2071]]: Use cargo check consistently in `prepare` \[\[[@&#8203;cycraig](https://github.com/cycraig)]]
    
    
Fixed
  • [#&#8203;1991]]: Ensure migration progress is not lost for Postgres, MySQL and SQLite. \[\[[@&#8203;crepererum](https://github.com/crepererum)]]
    
  • [#&#8203;2023]]: Fix expansion of `#[sqlx(flatten)]` for `FromRow` derive \[\[[@&#8203;RustyYato](https://github.com/RustyYato)]]
    
  • [#&#8203;2028]]: Use fully qualified path when forwarding to `#[test]` from `#[sqlx::test]` \[\[[@&#8203;alexander-jackson](https://github.com/alexander-jackson)]]
    
  • [#&#8203;2040]]: Fix typo in `FromRow` docs \[\[[@&#8203;zlidner](https://github.com/zlidner)]]
    
  • [#&#8203;2046]]: added flag for PIPES_AS_CONCAT connection setting for MySQL to fix [#&#8203;2034](https://github.com/launchbadge/sqlx/issues/2034) \[\[[@&#8203;marcustut](https://github.com/marcustut)]]
    
  • [#&#8203;2055]]: Use unlock notify also on `sqlite3_exec`  \[\[[@&#8203;madadam](https://github.com/madadam)]]
    
  • [#&#8203;2057]]: Make begin,commit,rollback cancel-safe in sqlite  \[\[[@&#8203;madadam](https://github.com/madadam)]]
    
  • [#&#8203;2058]]: fix typo in documentation \[\[[@&#8203;lovasoa](https://github.com/lovasoa)]]
    
  • [#&#8203;2067]]: fix(docs): close code block in query_builder.rs \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;2069]]: Fix `prepare` race condition in workspaces \[\[[@&#8203;cycraig](https://github.com/cycraig)]]\\
    -   NOTE: this changes the directory structure under `target/` that `cargo sqlx prepare` depends on.
        If you use offline mode in your workflow, please rerun `cargo install sqlx-cli` to upgrade.
    
  • [#&#8203;2072]]: SqliteConnectOptions typo \[\[[@&#8203;fasterthanlime](https://github.com/fasterthanlime)]]
    
  • [#&#8203;2074]]: fix: mssql uses unsigned for tinyint instead of signed \[\[[@&#8203;he4d](https://github.com/he4d)]]
    
  • [#&#8203;2081]]: close unnamed portal after each executed extended query \[\[[@&#8203;DXist](https://github.com/DXist)]]
    
  • [#&#8203;2086]]: PgHasArrayType for transparent types fix. \[\[[@&#8203;Wopple](https://github.com/Wopple)]]
    -   NOTE: this is a breaking change and has been postponed to 0.7.0.
    
  • [#&#8203;2089]]: fix: Remove default chrono dep on time for sqlx-cli \[\[[@&#8203;TravisWhitehead](https://github.com/TravisWhitehead)]]
    
  • [#&#8203;2091]]: Sqlite explain plan log efficiency \[\[[@&#8203;tyrelr](https://github.com/tyrelr)]]
    
    

v0.6.1

Compare Source

33 pull requests were merged this release cycle.

Added
  • [#&#8203;1495]]: Add example for manual implementation of the `FromRow` trait \[\[[@&#8203;Erik1000](https://github.com/Erik1000)]]
    
  • [#&#8203;1822]]: (Postgres) Add support for `std::net::IpAddr` \[\[[@&#8203;meh](https://github.com/meh)]]
    -   Decoding returns an error if the `INET` value in Postgres is a prefix and not a full address
        (`/32` for IPv4, `/128` for IPv6).
    
  • [#&#8203;1865]]: Add SQLite support for the `time` crate \[\[[@&#8203;johnbcodes](https://github.com/johnbcodes)]]
    
  • [#&#8203;1902]]: Add an example of how to use `QueryBuilder::separated()` \[\[[@&#8203;sbeckeriv](https://github.com/sbeckeriv)]]
    
  • [#&#8203;1917]]: Added docs for `sqlx::types::Json` \[\[[@&#8203;jayy-lmao](https://github.com/jayy-lmao)]]
    
  • [#&#8203;1919]]: Implement `Clone` for `PoolOptions` \[\[[@&#8203;Thomasdezeeuw](https://github.com/Thomasdezeeuw)]]
    
  • [#&#8203;1953]]: Support Rust arrays in Postgres \[\[[@&#8203;e00E](https://github.com/e00E)]]
    
  • [#&#8203;1954]]: Add `push_tuples` for `QueryBuilder` \[\[[@&#8203;0xdeafbeef](https://github.com/0xdeafbeef)]]
    
  • [#&#8203;1959]]: Support `#[sqlx(flatten)]` attribute in `FromRow` \[\[[@&#8203;TheoOiry](https://github.com/TheoOiry)]]
    
  • [#&#8203;1967]]: Add example with external query files \[\[[@&#8203;JoeyMckenzie](https://github.com/JoeyMckenzie)]]
    
  • [#&#8203;1985]]: Add `query_builder::Separated::push_bind_unseparated()` \[\[[@&#8203;0xdeafbeef](https://github.com/0xdeafbeef)]]
    
  • [#&#8203;2001]]: Implement `#[sqlx::test]` for general use
    -   Includes automatic database management, migration and fixture application.
    -   Drops support for end-of-lifed database versions, see PR for details.
    
  • [#&#8203;2005]]: `QueryBuilder` improvements \[\[[@&#8203;abonander](https://github.com/abonander)]]
    -   Raw SQL getters, new method to build `QueryAs` instead of `Query`.
    
  • [#&#8203;2013]]: (SQLite) Allow VFS to be set as URL query parameter \[\[[@&#8203;liningpan](https://github.com/liningpan)]]
    
    
Changed
  • [#&#8203;1679]]: refactor: alias actix-\* features to their equivalent tokio-\* features \[\[[@&#8203;robjtede](https://github.com/robjtede)]]
    
  • [#&#8203;1906]]: replaced all uses of "uri" to "url" \[\[[@&#8203;RomainStorai](https://github.com/RomainStorai)]]
    
  • [#&#8203;1965]]: SQLite improvements \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;1977]]: Docs: clarify relationship between `query_as!()` and `FromRow` \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;2003]]: Replace `dotenv` with `dotenvy` \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
    
Fixed
  • [#&#8203;1802]]: Try avoiding a full clean in `cargo sqlx prepare --merged` \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]]
    
  • [#&#8203;1848]]: Fix type info access in `Any` database driver \[\[[@&#8203;raviqqe](https://github.com/raviqqe)]]
    
  • [#&#8203;1910]]: Set `CARGO_TARGET_DIR` when compiling queries \[\[[@&#8203;sedrik](https://github.com/sedrik)]]
    
  • [#&#8203;1915]]: Pool: fix panic when using callbacks \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;1930]]: Don't cache SQLite connection for macros \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]]
    
  • [#&#8203;1948]]: Fix panic in Postgres `BYTEA` decode \[\[[@&#8203;e00E](https://github.com/e00E)]]
    
  • [#&#8203;1955]]: Fix typo in FAQ \[\[[@&#8203;kenkoooo](https://github.com/kenkoooo)]]
    
  • [#&#8203;1968]]: (Postgres) don't panic if `S` or `V` notice fields are not UTF-8 \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;1969]]: Fix sqlx-cli build \[\[[@&#8203;ivan](https://github.com/ivan)]]
    
  • [#&#8203;1974]]: Use the `rust-cache` action for CI \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;1988]]: Agree on a single default runtime for the whole workspace \[\[[@&#8203;crepererum](https://github.com/crepererum)]]
    
  • [#&#8203;1989]]: Fix panics in `PgListener` \[\[[@&#8203;crepererum](https://github.com/crepererum)]]
    
  • [#&#8203;1990]]: Switch `master` to `main` in docs \[\[[@&#8203;crepererum](https://github.com/crepererum)]]
    -   The change had already been made in the repo, the docs were out of date.
    
  • [#&#8203;1993]]: Update versions in quickstart examples in README \[\[[@&#8203;UramnOIL](https://github.com/UramnOIL)]]
    
    

v0.6.0

Compare Source

This release marks the end of the 0.5.x series of releases and contains a number of breaking changes,
mainly to do with backwards-incompatible dependency upgrades.

As we foresee many more of these in the future, we surveyed the community on how to handle this;
the consensus appears to be "just release breaking changes more often."

As such, we expect the 0.6.x release series to be a shorter one.

39 pull requests(!) (not counting "prepare 0.5.12 release", of course) were merged this release cycle.

Breaking
  • [#&#8203;1384]]: (Postgres) Move `server_version_num` from trait to inherent impl \[\[[@&#8203;AtkinsChang](https://github.com/AtkinsChang)]]
    
  • [#&#8203;1426]]: Bump `ipnetwork` to 0.19 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    
  • [#&#8203;1455]]: Upgrade `time` to 0.3 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    
  • [#&#8203;1505]]: Upgrade `rustls` to 0.20 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    -   Fortunately, future upgrades should not be breaking as `webpki` is no longer exposed in the API.
    
  • [#&#8203;1529]]: Upgrade `bigdecimal` to 0.3 \[\[[@&#8203;e00E](https://github.com/e00E)]]
    
  • [#&#8203;1602]]: postgres: use `Oid` everywhere instead of `u32` \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    -   This drops the `Type`, `Decode`, `Encode` impls for `u32` for Postgres as it was misleading.
        Postgres doesn't support unsigned ints without using an extension. These impls were decoding Postgres `OID`s
        as bare `u32`s without any context (and trying to bind a `u32` to a query would produce an `OID` value in SQL).
        This changes that to use a newtype instead, for clarity.
    
  • [#&#8203;1612]]: Make all `ConnectOptions` types cloneable \[\[[@&#8203;05storm26](https://github.com/05storm26)]]
    
  • [#&#8203;1618]]: SQLite `chrono::DateTime<FixedOffset>` timezone fix \[\[[@&#8203;05storm26](https://github.com/05storm26)]]
    -   `DateTime<FixedOffset>` will be stored in SQLite with the correct timezone instead of always in UTC.
        This was flagged as a "potentially breaking change" since it changes how dates are sent to SQLite.
    
  • [#&#8203;1733]]: Update `git2` to 0.14 \[\[[@&#8203;joshtriplett](https://github.com/joshtriplett)]]
    
  • [#&#8203;1734]]: Make `PgLTree::push()` infallible and take `PgLTreeLabel` directly \[\[[@&#8203;sebpuetz](https://github.com/sebpuetz)]]
    
  • [#&#8203;1785]]: Fix Rust type for SQLite `REAL` \[\[[@&#8203;pruthvikar](https://github.com/pruthvikar)]]
    -   Makes the macros always map a `REAL` column to `f64` instead of `f32` as SQLite uses **only** 64-bit floats.
    
  • [#&#8203;1816]]: Improve SQLite support for sub-queries and CTEs \[\[[@&#8203;tyrelr](https://github.com/tyrelr)]]
    -   This likely will change the generated code for some invocations `sqlx::query!()` with SQLite.
    
  • [#&#8203;1821]]: Update `uuid` crate to v1 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    
  • [#&#8203;1901]]: Pool fixes and breaking changes \[\[[@&#8203;abonander](https://github.com/abonander)]]
    -   Renamed `PoolOptions::connect_timeout` to `acquire_timeout` for clarity.
    -   Changed the expected signatures for `PoolOptions::after_connect`, `before_acquire`, `after_release`
    -   Changed the signature for `Pool::close()` slightly
        -   Now eagerly starts the pool closing, `.await`ing is only necessary if you want to ensure a graceful shutdown.
    -   Deleted `PoolConnection::release()` which was previously deprecated in favor of `PoolConnection::detach()`.
    -   Fixed connections getting leaked even when calling `.close()`.
    
  • \[[#&#8203;1748](https://github.com/launchbadge/sqlx/issues/1748)]]: Derive `PgHasArrayType` for `#[sqlx(transparent)]` types \[\[[@&#8203;carols10cents](https://github.com/carols10cents)]]
    -   This change was released with 0.5.12 but [we didn't realize it was a breaking change] at the time.\
        It was reverted in 0.5.13 and postponed until this release.
    
    
Added
  • [#&#8203;1843]]: Expose some useful methods on `PgValueRef` \[\[[@&#8203;mfreeborn](https://github.com/mfreeborn)]]
    
  • [#&#8203;1889]]: SQLx-CLI: add `--connect-timeout` \[\[[@&#8203;abonander](https://github.com/abonander)]]
    -   Adds a default 10 second connection timeout to all commands.
    
  • [#&#8203;1890]]: Added test for mssql LoginAck \[\[[@&#8203;walf443](https://github.com/walf443)]]
    
  • [#&#8203;1891]]: Added test for mssql ProtocolInfo \[\[[@&#8203;walf443](https://github.com/walf443)]]
    
  • [#&#8203;1892]]: Added test for mssql ReturnValue \[\[[@&#8203;walf443](https://github.com/walf443)]]
    
  • [#&#8203;1895]]: Add support for `i16` to `Any` driver \[\[[@&#8203;EthanYuan](https://github.com/EthanYuan)]]
    
  • [#&#8203;1897]]: Expose `ConnectOptions` and `PoolOptions` on `Pool` and database name on `PgConnectOptions` \[\[[@&#8203;Nukesor](https://github.com/Nukesor)]]
    
    
Changed
  • [#&#8203;1782]]: Reuse a cached DB connection instead of always opening a new one for `sqlx-macros` \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]]
    
  • [#&#8203;1807]]: Bump remaining dependencies \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    
  • [#&#8203;1808]]: Update to edition 2021 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    -   Note that while SQLx [does not officially track an MSRV] and only officially supports the latest stable Rust,
        this effectively places a lower bound of 1.56.0 on the range of versions it may work with.
    
  • [#&#8203;1823]]: (sqlx-macros) Ignore deps when getting metadata for workspace root \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]]
    
  • [#&#8203;1831]]: Update `crc` to 3.0 \[\[[@&#8203;djc](https://github.com/djc)]]
    
  • [#&#8203;1887]]: query_as: don't stop stream after decoding error \[\[[@&#8203;lovasoa](https://github.com/lovasoa)]]
    
    
Fixed
  • [#&#8203;1814]]: SQLx-cli README: move `Usage` to the same level as `Install` \[\[[@&#8203;tobymurray](https://github.com/tobymurray)]]
    
  • [#&#8203;1815]]: SQLx-cli README: reword "building in offline mode" \[\[[@&#8203;tobymurray](https://github.com/tobymurray)]]
    
  • [#&#8203;1818]]: Trim `[]` from host string before passing to TcpStream \[\[[@&#8203;smonv](https://github.com/smonv)]]
    -   This fixes handling of database URLs with IPv6 hosts.
    
  • [#&#8203;1842]]: Fix usage of `serde_json` in macros \[\[[@&#8203;mfreeborn](https://github.com/mfreeborn)]]
    
  • [#&#8203;1855]]: Postgres: fix panics on unknown type OID when decoding \[\[[@&#8203;demurgos](https://github.com/demurgos)]]
    
  • [#&#8203;1856]]: MySQL: support COLLATE_UTF8MB4\_0900\_AI_CI \[\[[@&#8203;scottwey](https://github.com/scottwey)]]
    -   Fixes the MySQL driver thinking text columns are bytestring columns when querying against a Planetscale DB.
    
  • [#&#8203;1861]]: MySQL: avoid panic when streaming packets are empty \[\[[@&#8203;e-rhodes](https://github.com/e-rhodes)]]
    
  • [#&#8203;1863]]: Fix nullability check for inner joins in Postgres \[\[[@&#8203;OskarPersson](https://github.com/OskarPersson)]]
    
  • [#&#8203;1881]]: Fix `field is never read` warnings on Postgres test \[\[[@&#8203;walf443](https://github.com/walf443)]]
    
  • [#&#8203;1882]]: Fix `unused result must be used` warnings \[\[[@&#8203;walf443](https://github.com/walf443)]]
    
  • [#&#8203;1888]]: Fix migration checksum comparison during `sqlx migrate info` \[\[[@&#8203;mdtusz](https://github.com/mdtusz)]]
    
  • [#&#8203;1894]]: Fix typos \[\[[@&#8203;kianmeng](https://github.com/kianmeng)]]
    
    

v0.5.13

Compare Source

This is a hotfix that reverts [#​1748] as that was an accidental breaking change:
the generated PgHasArrayType impl conflicts with manual impls of the trait.
This change will have to wait for 0.6.0.

v0.5.12

Compare Source

27 pull requests were merged this release cycle.

Added
  • [#&#8203;1641]]: Postgres: Convenient wrapper for advisory locks \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;1675]]: Add function to undo migrations \[\[[@&#8203;jdrouet](https://github.com/jdrouet)]]
    
  • [#&#8203;1722]]: Postgres: implement `PgHasArrayType` for `serde_json::{Value, RawValue}` \[\[[@&#8203;abreis](https://github.com/abreis)]]
    
  • [#&#8203;1736]]: Derive `Clone` for `MySqlArguments` and `MssqlArguments` \[\[[@&#8203;0xdeafbeef](https://github.com/0xdeafbeef)]]
    
  • [#&#8203;1748]]: Derive `PgHasArrayType` for `#[sqlx(transparent)]` types \[\[[@&#8203;carols10cents](https://github.com/carols10cents)]]
    
  • [#&#8203;1754]]: Include affected rows alongside returned rows in query logging \[\[[@&#8203;david-mcgillicuddy-moixa](https://github.com/david-mcgillicuddy-moixa)]]
    
  • [#&#8203;1757]]: Implement `Type` for `Cow<str>` for MySQL, MSSQL and SQLite \[\[[@&#8203;ipetkov](https://github.com/ipetkov)]]
    
  • [#&#8203;1769]]: sqlx-cli: add `--source` to migration subcommands \[\[[@&#8203;pedromfedricci](https://github.com/pedromfedricci)]]
    
  • [#&#8203;1774]]: Postgres: make `extra_float_digits` settable \[\[[@&#8203;abonander](https://github.com/abonander)]]
    -   Can be set to `None` for Postgres or third-party database servers that don't support the option.
    
  • [#&#8203;1776]]: Implement close-event notification for Pool \[\[[@&#8203;abonander](https://github.com/abonander)]]
    -   Also fixes `PgListener` preventing `Pool::close()` from resolving.
    
  • [#&#8203;1780]]: Implement query builder \[\[[@&#8203;crajcan](https://github.com/crajcan)]]
    -   See also \[[#&#8203;1790]]: Document and expand query builder \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;1781]]: Postgres: support `NUMERIC[]` using `decimal` feature \[\[[@&#8203;tm-drtina](https://github.com/tm-drtina)]]
    
  • [#&#8203;1784]]: SQLite: add `FromStr`, `Copy`, `PartialEq`, `Eq` impls for options enums \[\[[@&#8203;andrewwhitehead](https://github.com/andrewwhitehead)]]
    
    
Changed
  • [#&#8203;1625]]: Update RustCrypto crates \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    
  • [#&#8203;1725]]: Update `heck` to 0.4 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    
  • [#&#8203;1738]]: Update `regex` \[\[[@&#8203;Dylan-DPC](https://github.com/Dylan-DPC)]]
    
  • [#&#8203;1763]]: SQLite: update `libsqlite3-sys` \[\[[@&#8203;espindola](https://github.com/espindola)]]
    
    
Fixed
  • [#&#8203;1719]]: Fix a link in `query!()` docs \[\[[@&#8203;vbmade2000](https://github.com/vbmade2000)]]
    
  • [#&#8203;1731]]: Postgres: fix option passing logic \[\[[@&#8203;liushuyu](https://github.com/liushuyu)]]
    
  • [#&#8203;1735]]: sqlx-cli: pass `DATABASE_URL` to command spawned in `prepare` \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]]
    
  • [#&#8203;1741]]: Postgres: fix typo in `TSTZRANGE` \[\[[@&#8203;mgrachev](https://github.com/mgrachev)]]
    
  • [#&#8203;1761]]: Fix link from `QueryAs` to `query_as()` in docs \[\[[@&#8203;mgrachev](https://github.com/mgrachev)]]
    
  • [#&#8203;1786]]: MySQL: silence compile warnings for unused fields \[\[[@&#8203;andrewwhitehead](https://github.com/andrewwhitehead)]]
    
  • [#&#8203;1789]]: SQLite: fix left-joins breaking `query!()` macros \[\[[@&#8203;tyrelr](https://github.com/tyrelr)]]
    
  • [#&#8203;1791]]: Postgres: fix newline parsing of `.pgpass` files \[\[[@&#8203;SebastienGllmt](https://github.com/SebastienGllmt)]]
    
  • [#&#8203;1799]]: `PoolConnection`: don't leak connection permit if drop task fails to run \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
    

v0.5.11

Compare Source

20 pull requests were merged this release cycle.

Added
  • [#&#8203;1610]]: Allow converting `AnyConnectOptions` to a specific `ConnectOptions` \[\[[@&#8203;05storm26](https://github.com/05storm26)]]
    
  • [#&#8203;1652]]: Implement `From` for `AnyConnection` \[\[[@&#8203;genusistimelord](https://github.com/genusistimelord)]]
    
  • [#&#8203;1658]]: Handle `SQLITE_LOCKED` \[\[[@&#8203;madadam](https://github.com/madadam)]]
    
  • [#&#8203;1665]]: Document offline mode usage with feature flags \[\[[@&#8203;sedrik](https://github.com/sedrik)]]
    
  • [#&#8203;1680]]: Show checksum mismatches in `sqlx migrate info` \[\[[@&#8203;ifn3](https://github.com/ifn3)]]
    
  • [#&#8203;1685]]: Add tip for setting `opt-level` for `sqlx-macros` \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]]
    
  • [#&#8203;1687]]: Docs: `Acquire` examples and alternative \[\[[@&#8203;stoically](https://github.com/stoically)]]
    
  • [#&#8203;1696]]: Postgres: support for `ltree` \[\[[@&#8203;cemoktra](https://github.com/cemoktra)]]
    
  • [#&#8203;1710]]: Postgres: support for `lquery` \[\[[@&#8203;cemoktra](https://github.com/cemoktra)]]
    
    
Changed
  • [#&#8203;1605]]: Remove unused dependencies \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    
  • [#&#8203;1606]]: Add target context to Postgres `NOTICE` logs \[\[[@&#8203;dbeckwith](https://github.com/dbeckwith)]]
    
  • [#&#8203;1684]]: Macros: Cache parsed `sqlx-data.json` instead of reparsing \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]]
    
    
Fixed
  • [#&#8203;1608]]: Drop worker shared state in shutdown (SQLite) \[\[[@&#8203;andrewwhitehead](https://github.com/andrewwhitehead)]]
    
  • [#&#8203;1619]]: Docs(macros): remove sentences banning usage of `as _` \[\[[@&#8203;k-jun](https://github.com/k-jun)]]
    
  • [#&#8203;1626]]: Simplify `cargo-sqlx` command-line definition \[\[[@&#8203;tranzystorek-io](https://github.com/tranzystorek-io)]]
    
  • [#&#8203;1636]]: Fix and extend Postgres transaction example \[\[[@&#8203;taladar](https://github.com/taladar)]]
    
  • [#&#8203;1657]]: Fix typo in macro docs \[\[[@&#8203;p9s](https://github.com/p9s)]]
    
  • [#&#8203;1661]]: Fix binding `Option<T>` for `Any` driver \[\[[@&#8203;ArGGu](https://github.com/ArGGu)]]
    
  • [#&#8203;1667]]: MySQL: Avoid panicking if packet is empty \[\[[@&#8203;nappa85](https://github.com/nappa85)]]
    
  • [#&#8203;1692]]: Postgres: Fix power calculation when encoding `BigDecimal` into `NUMERIC` \[\[[@&#8203;VersBinarii](https://github.com/VersBinarii)]]
    
    

Additionally, we have introduced two mitigations for the issue of the cyclic dependency on ahash:

v0.5.10

Compare Source

A whopping 31 pull requests were merged this release cycle!

According to this changelog, we saw 18 new contributors! However, some of these folks may have missed getting
mentioned in previous entries since we only listed highlights. To avoid anyone feeling left out, I put in the effort
this time and tried to list every single one here.

Added
  • [#&#8203;1228]]: Add `Pool::any_kind()` \[\[[@&#8203;nitnelave](https://github.com/nitnelave)]]
    
  • [#&#8203;1343]]: Add `Encode/Decode` impl for `Cow<'_, str>` \[\[[@&#8203;Drevoed](https://github.com/Drevoed)]]
    
  • [#&#8203;1474]]: Derive `Clone`, `Copy` for `AnyKind` \[\[[@&#8203;yuyawk](https://github.com/yuyawk)]]
    
  • [#&#8203;1497]]: Update FAQ to explain how to configure docs.rs to build a project using SQLx \[\[[@&#8203;russweas](https://github.com/russweas)]]
    
  • [#&#8203;1498]]: Add description of migration file structure to `migrate!()` docs \[\[[@&#8203;zbigniewzolnierowicz](https://github.com/zbigniewzolnierowicz)]]
    
  • [#&#8203;1508]]: Add `.persistent(bool)` to `QueryAs`, `QueryScalar` \[\[[@&#8203;akiradeveloper](https://github.com/akiradeveloper)]]
    
  • [#&#8203;1514]]: Add support for serialized threading mode to SQLite \[\[[@&#8203;LLBlumire](https://github.com/LLBlumire)]]
    
  • [#&#8203;1523]]: Allow `rust_decimal::Decimal` in `PgRange` \[\[[@&#8203;meh](https://github.com/meh)]]
    
  • [#&#8203;1539]]: Support `PGOPTIONS` and adding custom configuration options in `PgConnectOptions` \[\[[@&#8203;liushuyu](https://github.com/liushuyu)]]
    
  • [#&#8203;1562]]: Re-export `either::Either` used by `Executor::fetch_many()` \[\[[@&#8203;DoumanAsh](https://github.com/DoumanAsh)]]
    
  • [#&#8203;1584]]: Add feature to use RusTLS instead of `native-tls` for `sqlx-cli` \[\[[@&#8203;SonicZentropy](https://github.com/SonicZentropy)]]
    
  • [#&#8203;1592]]: Add `AnyConnection::kind()` \[\[[@&#8203;05storm26](https://github.com/05storm26)]]
    
    
Changes
  • [#&#8203;1385]]: Rewrite Postgres array handling to reduce boilerplate and allow custom types \[\[[@&#8203;jplatte](https://github.com/jplatte)]]
    
  • [#&#8203;1479]]: Remove outdated mention of `runtime-async-std-native-tls` as the default runtime in README.md \[\[[@&#8203;yerke](https://github.com/yerke)]]
    
  • [#&#8203;1526]]: Revise `Pool` docs in a couple places \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;1535]]: Bump `libsqlite-sys` to `0.23.1` \[\[[@&#8203;nitsky](https://github.com/nitsky)]]
    
  • [#&#8203;1551]]: SQLite: make worker thread responsible for all FFI calls \[\[[@&#8203;abonander](https://github.com/abonander)]]
    -   If you were encountering segfaults with the SQLite driver, there's a good chance this will fix it!
    
  • [#&#8203;1557]]: CI: test with Postgres 14 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    
  • [#&#8203;1571]]: Make `whoami` dep optional, only pull it in for Postgres \[\[[@&#8203;joshtriplett](https://github.com/joshtriplett)]]
    
  • [#&#8203;1572]]: Update `rsa` crate to 0.5 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    
  • [#&#8203;1591]]: List SeaORM as an ORM option in the README \[\[[@&#8203;kunjee17](https://github.com/kunjee17)]]
    
  • [#&#8203;1601]]: Update `itoa` and `dirs` \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]]
    
    
Fixes
  • [#&#8203;1475]]: Fix panic when converting a negative `chrono::Duration` to `PgInterval` \[\[[@&#8203;yuyawk](https://github.com/yuyawk)]]
    
  • [#&#8203;1483]]: Fix error when decoding array of custom types from Postgres \[\[[@&#8203;demurgos](https://github.com/demurgos)]
    
  • [#&#8203;1501]]: Reduce `indexmap` version requirement to `1.6.2` \[\[[@&#8203;dimfeld](https://github.com/dimfeld)]]
    
  • [#&#8203;1511]]: Fix element type given to Postgres for arrays of custom enums \[\[[@&#8203;chesedo](https://github.com/chesedo)]]
    
  • [#&#8203;1517]]: Fix mismatched type errors in MySQL type tests \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;1537]]: Fix missing re-export of `PgCopyIn` \[\[[@&#8203;akiradeveloper](https://github.com/akiradeveloper)]]
    
  • [#&#8203;1566]]: Match `~/.pgpass` password after URL parsing and fix user and database ordering \[\[[@&#8203;D1plo1d](https://github.com/D1plo1d)]]
    
  • [#&#8203;1582]]: `cargo sqlx prepare`: Append to existing `RUSTFLAGS` instead of overwriting \[\[[@&#8203;tkintscher](https://github.com/tkintscher)]]
    
  • [#&#8203;1587]]: SQLite: if set, send `PRAGMA key` on a new connection before anything else. \[\[[@&#8203;parazyd](https://github.com/parazyd)]]
    -   This should fix problems with being unable to open databases using SQLCipher.
    
    

v0.5.9

Compare Source

A hotfix release to address the issue of the sqlx crate itself still depending on older versions of sqlx-core and
sqlx-macros.

No other changes from 0.5.8.

v0.5.8

Compare Source

A total of 24 pull requests were merged this release cycle! Some highlights:

  • [#&#8203;1289]] Support the `immutable` option on SQLite connections \[\[[@&#8203;djmarcin](https://github.com/djmarcin)]]
    
  • [#&#8203;1295]] Support custom initial options for SQLite \[\[[@&#8203;ghassmo](https://github.com/ghassmo)]]
    -   Allows specifying custom `PRAGMA`s and overriding those set by SQLx.
    
  • [#&#8203;1345]] Initial support for Postgres `COPY FROM/TO`\[\[[@&#8203;montanalow](https://github.com/montanalow)], \[[@&#8203;abonander](https://github.com/abonander)]]
    
  • [#&#8203;1439]] Handle multiple waiting results correctly in MySQL \[\[[@&#8203;eagletmt](https://github.com/eagletmt)]]
    
    

v0.5.7

Compare Source

  • [#&#8203;1392]] use `resolve_path` when getting path for `include_str!()` \[\[[@&#8203;abonander](https://github.com/abonander)]]
    -   Fixes a regression introduced by \[\[[#&#8203;1332](https://github.com/launchbadge/sqlx/issues/1332)]].
    
  • [#&#8203;1393]] avoid recursively spawning tasks in `PgListener::drop()` \[\[[@&#8203;abonander](https://github.com/abonander)]]
    -   Fixes a panic that occurs when `PgListener` is dropped in `async fn main()`.
    
    

v0.5.6

Compare Source

A large bugfix release, including but not limited to:

  • [#&#8203;1329]] Implement `MACADDR` type for Postgres \[\[[@&#8203;nomick](https://github.com/nomick)]]
    
  • [#&#8203;1363]] Fix `PortalSuspended` for array of composite types in Postgres \[\[[@&#8203;AtkinsChang](https://github.com/AtkinsChang)]]
    
  • [#&#8203;1320]] Reimplement `sqlx::Pool` internals using `futures-intrusive` \[\[[@&#8203;abonander](https://github.com/abonander)]]
    -   This addresses a number of deadlocks/stalls on acquiring connections from the pool.
    
  • [#&#8203;1332]] Macros: tell the compiler about external files/env vars to watch \[\[[@&#8203;abonander](https://github.com/abonander)]]
    -   Includes `sqlx build-script` to create a `build.rs` to watch `migrations/` for changes.
    -   Nightly users can try `RUSTFLAGS=--cfg sqlx_macros_unstable` to tell the compiler
        to watch `migrations/` for changes instead of using a build script.
    -   See the new section in the docs for `sqlx::migrate!()` for details.
    
  • [#&#8203;1351]] Fix a few sources of segfaults/errors in SQLite driver \[\[[@&#8203;abonander](https://github.com/abonander)]]
    -   Includes contributions from \[\[[@&#8203;link2ext](https://github.com/link2ext)]] and \[\[[@&#8203;madadam](https://github.com/madadam)]].
    
  • [#&#8203;1323]] Keep track of column typing in SQLite EXPLAIN parsing \[\[[@&#8203;marshoepial](https://github.com/marshoepial)]]
    -   This fixes errors in the macros when using `INSERT/UPDATE/DELETE ... RETURNING ...` in SQLite.
    
    

A total of 25 pull requests were merged this release cycle!

v0.5.5

Compare Source

  • [#&#8203;1242]] Fix infinite loop at compile time when using query macros \[\[[@&#8203;toshokan](https://github.com/toshokan)]]
    
    

v0.5.4

Compare Source

  • [#&#8203;1235]] Fix compilation with rustls from an eager update to webpki \[\[[@&#8203;ETCaton](https://github.com/ETCaton)]]
    
    

v0.5.3

Compare Source

  • [#&#8203;1211]] Even more tweaks and fixes to the Pool internals \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
    
  • [#&#8203;1213]] Add support for bytes and `chrono::NaiveDateTime` to `Any` \[\[[@&#8203;guylapid](https://github.com/guylapid)]]
    
    
  • [#&#8203;1224]] Add support for `chrono::DateTime<Local>` to `Any` with `MySQL` \[\[[@&#8203;NatPRoach](https://github.com/NatPRoach)]]
    
    
  • [#&#8203;1216]] Skip empty lines and comments in pgpass files \[\[[@&#8203;feikesteenbergen](https://github.com/feikesteenbergen)]]
    
    
  • [#&#8203;1218]] Add support for `PgMoney` to the compile-time type-checking \[\[[@&#8203;iamsiddhant05](https://github.com/iamsiddhant05)]]
    
    

v0.5.2

Compare Source

  • [#&#8203;1149]] Tweak and optimize Pool internals \[\[[@&#8203;abonander](https://github.com/abonander)]]
    
    
  • [#&#8203;1132]] Remove `'static` bound on `Connection::transaction` \[\[[@&#8203;argv-minus-one](https://github.com/argv-minus-one)]]
    
    
  • [#&#8203;1128]] Fix `-y` flag for `sqlx db reset -y` \[\[[@&#8203;qqwa](https://github.com/qqwa)]]
    
    
  • [#&#8203;1099]] \[[#&#8203;1097]] Truncate buffer when `BufStream` is dropped \[\[[@&#8203;Diggsey](https://github.com/Diggsey)]]
    
    
PostgreSQL
  • [#&#8203;1170]] Remove `Self: Type` bounds in `Encode` / `Decode` implementations for arrays \[\[[@&#8203;jplatte](https://github.com/jplatte)]]
    
    Enables working around the lack of support for user-defined array types:
    
    ```rust
    #[derive(sqlx::Encode)]
    struct Foos<'a>(&'a [Foo]);
    
    impl sqlx::Type<sqlx::Postgres> for Foos<'_> {
        fn type_info() -> PgTypeInfo {
            PgTypeInfo::with_name("_foo")
        }
    }
    
    query_as!(
        Whatever,
        "<QUERY with $1 of type foo[]>",
        Foos(&foo_vec) as _,
    )
    ```
    
    
  • [#&#8203;1141]] Use `u16::MAX` instead of `i16::MAX` for a check against the largest number of parameters in a query \[\[[@&#8203;crajcan](https://github.com/crajcan)]]
    
    
  • [#&#8203;1112]] Add support for `DOMAIN` types \[\[[@&#8203;demurgos](https://github.com/demurgos)]]
    
    
  • [#&#8203;1100]] Explicitly `UNLISTEN` before returning connections to the pool in `PgListener` \[\[[@&#8203;Diggsey](https://github.com/Diggsey)]]
    
    
SQLite
  • [#&#8203;1161]] Catch `SQLITE_MISUSE` on connection close and panic \[\[[@&#8203;link2xt](https://github.com/link2xt)]]
    
    
  • [#&#8203;1160]] Do not cast pointers to `i32` (cast to `usize`) \[\[[@&#8203;link2xt](https://github.com/link2xt)]]
    
    
  • [#&#8203;1156]] Reset the statement when `fetch_many` stream is dropped \[\[[@&#8203;link2xt](https://github.com/link2xt)]]
    
    
time-rs/time

v0.3.17

Compare Source

Changed
  • The amount of code generated by time::serde::format_description! is reduced if not all feature
    flags are active.
  • cargo test --tests works with any configuration of feature flags. This occurs by spawning a
    subprocess that passes --all-features. cargo test --doc works with most combinations of
    feature flags, including the default. The combination of these changes means that crater will now
    run on time.
  • libc and num_threads are only included as dependencies when needed. They were previously
    unconditionally included.
Added
  • time::format_description::parse_owned, which returns an OwnedFormatItem. This avoids "lifetime
    hell", where all your structs now need a lifetime because a single field has one. Note that when
    possible, the borrowed format item (just called FormatItem) is still preferred, as it has
    significantly fewer allocations. The new OwnedFormatItem is usable for both formatting and
    parsing, as you would expect.
Compatibility
  • The parser for runtime format descriptions has been rewritten. A side effect of this is that some
    errors have slightly changed. No existing API has been altered, so this is not a breaking change.
    However, you may notice different errors, which are hopefully better! The parser for compile-time
    format descriptions has not yet been swapped out. If you notice any bugs, please file an issue.

v0.3.16

Compare Source

Changed
  • The minimum supported Rust version is now 1.60.0.
  • The serde-well-known feature flag is deprecated. The necessary features for an item to be
    enabled are indicated in documentation.
  • Feature gates have been loosened for well-known formats.
Added
  • consts can now be provided as the format description for time::serde::format_description!. The
    const must be of type &[FormatItem<'_>], which is what is returned by the
    time::macros::format_description! macro.

    const TIME_FORMAT_ALT: &[FormatItem<'_>] = time::macros::format_description!("[hour]:[minute]");
    time::serde::format_description!(time_format_alt, Time, TIME_FORMAT_ALT);
    
Compatibility
  • Some feature flags have been removed. None of these have ever been documented as flags, so any use
    was unsupported. These flags are:
    • js-sys
    • quickcheck-dep
    • itoa
    • time-macros

v0.3.15

Compare Source

Changed
  • Better gating for tm_gmtoff extension. This should eliminate build failures on some untested
    platforms.
  • Debug output for types are now human-readable. While this should not be relied upon, it is
    currently the same as the output with Display.
  • Eliminate overflows in the constructors for `Duration. When there is an overflow, the methods now
    panic. This was previously only the case in debug mode.
  • Panic if NaN is passed to Duration::from_secs_f32 or Duration::from_secs_f64.
Fixed
  • Fix error when deserializing data types from bytes. This affects formats such as JSON.
  • Eliminate a panic in an edge case when converting OffsetDateTime to another UtcOffset. This
    occurred due to an old assumption in code that was no longer the case.

v0.3.14

Compare Source

Changed
  • The minimum supported Rust version is now 1.59.0.
  • Duration::unsigned_abs is now const fn.
  • The const parameter for time::format_description::well_known::Iso8601 now has a default. This
    means Iso8601 is the same as Iso8601::DEFAULT.
  • The Parsed struct has been reduced in size from 56 to 32 bytes (a 43% reduction).

v0.3.13

Compare Source

Fixed
  • wasm builds other than those using wasm-bindgen work again.

v0.3.12

Compare Source

Added
  • js-sys now supports obtaining the system's local UTC offset.
Changed
  • Performance of many Date operations has improved when using the large-dates feature.
  • While an internal change, OffsetDateTime now stores the value in the attached UtcOffset, not
    UTC. This leads to significant performance gains on nearly all OffsetDateTime methods.
Fixed
  • Subtracting two Times can no longer panic. This previously occurred in some situations where the
    result was invalid.
  • ISO 8601 parsing rounds the subseconds to avoid incorrectly truncating the value.

v0.3.11

Compare Source

Fixed
  • [#&#8203;479](https://github.com/time-rs/time/issues/479)]: regression when parsing optional values with `serde`
    
  • [#&#8203;481](https://github.com/time-rs/time/issues/481)]: `Time` subtracted from `Time` can panic. This was caused by a bug that has always existed,
    in that an internal invariant was not upheld. Memory safety was not violated.
    
    

v0.3.10

Compare Source

Added
  • Serde support for non-self-describing formats
  • Duration::unsigned_abs, which returns a std::time::Duration
  • ISO 8601 well-known format
  • Duration can now be formatted with a .N specifier, providing a shorter representation when
    using Display.
  • Parse null as None on serde structs
Fixed
  • Fix incorrect parsing of UTC offset in Rfc3339.
Changed
  • The minimum supported Rust version is now 1.57.0.
  • Performance for Rfc2822 has been improved.
  • Debug assertions have been added in a few places. This should have no user facing impact, as it
    only serves to catch bugs and is disabled in release mode.

v0.3.9

Added
  • time::serde::format_description!
    • This macro is similar to time::format_description!, but it generates a module that can be used
      in #[serde(with = "foo")]. This makes it far easier to serialize/deserialize a custom format.
  • Date::replace_year
  • Date::replace_month
  • Date::replace_day
  • Time::replace_hour
  • Time::replace_minute
  • Time::replace_second
  • Time::replace_millisecond
  • Time::replace_microsecond
  • Time::replace_nanosecond
  • PrimitiveDateTime::replace_year
  • PrimitiveDateTime::replace_month
  • PrimitiveDateTime::replace_day
  • PrimitiveDateTime::replace_hour
  • PrimitiveDateTime::replace_minute
  • PrimitiveDateTime::replace_second
  • PrimitiveDateTime::replace_millisecond
  • PrimitiveDateTime::replace_microsecond
  • PrimitiveDateTime::replace_nanosecond
  • OffsetDateTime::replace_year
  • OffsetDateTime::replace_month
  • OffsetDateTime::replace_day
  • OffsetDateTime::replace_hour
  • OffsetDateTime::replace_minute
  • OffsetDateTime::replace_second
  • OffsetDateTime::replace_millisecond
  • OffsetDateTime::replace_microsecond
  • OffsetDateTime::replace_nanosecond
  • Parsed::offset_minute_signed
  • Parsed::offset_second_signed
  • Parsed::set_offset_minute_signed
  • Parsed::set_offset_second_signed
  • Parsed::with_offset_minute_signed
  • Parsed::with_offset_second_signed
  • error::InvalidVariant
  • impl FromStr for Weekday
  • impl FromStr for Month
  • impl Display for Duration
Deprecated

The following methods have been deprecated in favor of the new, signed equivalent methods. The
pre-existing methods

  • Parsed::offset_minute
  • Parsed::offset_second
  • Parsed::set_offset_minute
  • Parsed::set_offset_second
  • Parsed::with_offset_minute
  • Parsed::with_offset_second
Changed
  • Well-known formats that support leap seconds now return the TryFromParsed::ComponentRange error
    variant if the leap second could not occur at that given moment.

v0.3.8

This release is broken and has been yanked.

v0.3.7

Compare Source

Fixed

Solaris and Illumos build again.

v0.3.6

Compare Source

Added
  • Date::saturating_add
  • Date::saturating_sub
  • PrimitiveDateTime::saturating_add
  • PrimitiveDateTime::saturating_sub
  • OffsetDateTime::saturating_add
  • OffsetDateTime::saturating_sub
  • PrimitiveDatetime::MIN
  • PrimitiveDatetime::MAX
  • Rfc2822 format description
  • Serde support for well-known formats
    • This is placed behind the new serde-well-known feature flag.
Changed
  • MacOS and FreeBSD are supported obtaining the local offset when single-threaded.
    • Starting with this version, this is delegated to the num_threads crate.
  • Leap seconds are now parsed as the final nanosecond of the preceding second.
  • The minimum supported Rust version is now 1.53.0.
  • Deserializers for human readable formats will fall back to the binary format if the human readable
    format fails to deserialize.
Fixed
  • Deserialization will no longer fail when given a non-borrowed string.

v0.3.5

Compare Source

Added
  • Date::checked_add
  • Date::checked_sub
  • PrimitiveDateTime::checked_add
  • PrimitiveDateTime::checked_sub
  • OffsetDateTime::checked_add
  • OffsetDateTime::checked_sub
Changed
  • Attempts to obtain the local UTC offset will now succeed on Linux if the process is
    single-threaded. This does not affect other Unix platforms. As a reminder, the relevant methods
    are fallible and may return an Err value for any reason.

v0.3.4

Compare Source

Added
  • error::DifferentVariant and Error::DifferentVariant
  • impl From<Component> for FormatItem<'_>
  • impl TryFrom<FormatItem<'_>> for Component
  • impl<'a> From<&'a [FormatItem<'_>]> for FormatItem<'a>
  • impl<'a> TryFrom<FormatItem<'a>> for &[FormatItem<'a>]
  • impl PartialEq<Component> for FormatItem<'_>
  • impl PartialEq<FormatItem<'_>> for Component
  • impl PartialEq<&[FormatItem<'_>]> for FormatItem<'_>
  • impl PartialEq<FormatItem<'_>> for &[FormatItem<'_>]
  • impl TryFrom<Error> for error::TryFromParsed
  • impl TryFrom<Error> for error::Parse
  • impl TryFrom<Error> for error::ParseFromDescription
  • impl TryFrom<Error> for error::InvalidFormatDescription
  • impl TryFrom<Error> for error::IndeterminateOffset
  • impl TryFrom<Error> for error::Format
  • impl TryFrom<Error> for error::ConversionRange
  • impl TryFrom<Error> for error::ComponentRange
  • impl TryFrom<error::TryFromParsed> for error::ComponentRange
  • impl TryFrom<error::Parse> for error::TryFromParsed
  • impl TryFrom<error::Parse> for error::ParseFromDescription
  • impl TryFrom<error::Format> for std::io::Error
  • impl Sum for Duration
  • impl Sum<&Duration> for Duration
  • A const fn default() has been added to all modifiers that are structs. These methods exist to
    permit construction in const contexts and may be removed (without being considered a breaking
    change) once impl const Default is stabilized.
  • FormatItem::Optional, which will consume the contained value if present but still succeed
    otherwise.
  • FormatItem::First, which will consume the first successful parse, ignoring any prior errors.
Fixed
  • Cross-building to Windows now succeeds.
  • A parse error on a UtcOffset component now indicates the error comes from the offset.
  • Some arithmetic no longer panics in edge cases.

v0.3.3

Compare Source

Added
  • Parsed::parse_item
  • Parsed::parse_items
  • Parsed::parse_literal
  • Builder methods for Parsed
  • The format_description! macro now supports the case_sensitive modifier.
Changed

The minimum supported version is now 1.51.0.

v0.3.2

Compare Source

Added
  • Instant is now #[repr(transparent)]
Fixed
  • Constructing a Date from its ISO year, week, and weekday now returns the correct value in all
    circumstances. Previously, dates with an ISO year less than zero may have returned incorrect
    values. This affects both the Date::from_iso_week_date method and the date! macro.

v0.3.1

Compare Source

Changed
  • The amount of code generated by time::serde::format_description! is reduced if not all feature
    flags are active.
  • cargo test --tests works with any configuration of feature flags. This occurs by spawning a
    subprocess that passes --all-features. cargo test --doc works with most combinations of
    feature flags, including the default. The combination of these changes means that crater will now
    run on time.
  • libc and num_threads are only included as dependencies when needed. They were previously
    unconditionally included.
Added
  • time::format_description::parse_owned, which returns an OwnedFormatItem. This avoids "lifetime
    hell", where all your structs now need a lifetime because a single field has one. Note that when
    possible, the borrowed format item (just called FormatItem) is still preferred, as it has
    significantly fewer allocations. The new OwnedFormatItem is usable for both formatting and
    parsing, as you would expect.
Compatibility
  • The parser for runtime format descriptions has been rewritten. A side effect of this is that some
    errors have slightly changed. No existing API has been altered, so this is not a breaking change.
    However, you may notice different errors, which are hopefully better! The parser for compile-time
    format descriptions has not yet been swapped out. If you notice any bugs, please file an issue.

v0.3.0

Compare Source

Added
  • datetime! macro, which allows the construction of a statically verified PrimitiveDateTime or
    OffsetDateTime.
  • PrimitiveDateTime::replace_time
  • PrimitiveDateTime::replace_date
  • OffsetDateTime::replace_time
  • OffsetDateTime::replace_date
  • OffsetDateTime::replace_date_time
  • OffsetDateTime::replace_offset
  • #![no_alloc] support
  • Date::to_iso_week_date, replacing Date::iso_year_week
  • Date::MIN
  • Date::MAX
  • UtcOffset::from_hms
  • UtcOffset::from_whole_seconds
  • UtcOffset::as_hms
  • UtcOffset::whole_hours
  • UtcOffset::whole_minutes
  • UtcOffset::minutes_past_hour
  • UtcOffset::seconds_past_minute
  • UtcOffset::is_utc
  • UtcOffset::is_positive
  • UtcOffset::is_negative
  • OffsetDateTime::sunday_based_week
  • OffsetDateTime::monday_based_week
  • PrimitiveDateTime::to_calendar_date
  • PrimitiveDateTime::to_ordinal_date
  • PrimitiveDateTime::to_iso_week_date
  • PrimitiveDateTime::to_julian_day
  • OffsetDateTime::to_calendar_date
  • OffsetDateTime::to_ordinal_date
  • OffsetDateTime::to_iso_week_date
  • OffsetDateTime::to_julian_day
  • Time::as_hms
  • Time::as_hms_milli
  • Time::as_hms_micro
  • Time::as_hms_nano
  • PrimitiveDateTime::as_hms
  • PrimitiveDateTime::as_hms_milli
  • PrimitiveDateTime::as_hms_micro
  • PrimitiveDateTime::as_hms_nano
  • OffsetDateTime::to_hms
  • OffsetDateTime::to_hms_milli
  • OffsetDateTime::to_hms_micro
  • OffsetDateTime::to_hms_nano
  • Duration::saturating_add
  • Duration::saturating_sub
  • Duration::saturating_mul
  • util::days_in_year_month
  • Month
  • Instant::into_inner
  • impl AsRef<StdInstant> and impl Borrow<StdInstant> for Instant
  • Support for obtaining the local UTC offset on Unix-like systems has been re-added under a
    user-provided flag. This functionality is not tested in any way and is not guaranteed to work.
    Library authors are unable to enable this feature, as it must be passed via RUSTFLAGS. Further
    information is available in the documentation.
Changed
  • The minimum supported Rust version is now 1.48.0. Per the policy in the README, this may be bumped
    within the 0.3 series without being a breaking change.
  • rand has been updated to 0.8.
  • quickcheck has been updated to 1.0.
  • Macros are placed behind the macros feature flag.
  • Renamed
    • OffsetDatetime::timestampOffsetDateTime::unix_timestamp
    • OffsetDatetime::timestamp_nanosOffsetDateTime::unix_timestamp_nanos
    • Date::try_from_ymdDate::from_calendar_date
    • Date::try_from_yoDate::from_ordinal_date
    • Date::try_from_iso_ywdDate::from_iso_week_date
    • Date::as_ymdDate::to_calendar_date
    • Date::as_yoDate::to_ordinal_date
    • Date::try_with_hmsDate::with_hms
    • Date::try_with_hms_milliDate::with_hms_milli
    • Date::try_with_hms_microDate::with_hms_micro
    • Date::try_with_hms_nanoDate::with_hms_nano
    • Time::try_from_hmsTime::from_hms
    • Time::try_from_hms_milliTime::from_hms_milli
    • Time::try_from_hms_microTime::from_hms_micro
    • Time::try_from_hms_nanoTime::from_hms_nano
    • UtcOffset::try_local_offset_atUtcOffset::local_offset_at
    • UtcOffset::as_secondsUtcOffset::whole_seconds
    • OffsetDateTime::try_now_localOffsetDateTime::now_local
    • Date::weekDate::iso_week
    • PrimitiveDateTime::weekPrimitiveDateTime::iso_week
    • OffsetDateTime::weekOffsetDateTime::iso_week
    • Date::julian_dayDate::to_julian_day
    • All Duration unit values, as well as the minimum and maximum, are now associated constants.
    • OffsetDateTime::unix_epoch()OffsetDateTime::UNIX_EPOCH
    • Time::midnight()Time::MIDNIGHT
  • Now const fn (on at least newer compilers)
    • Date::weekday
    • Date::next_day
    • Date::previous_day
    • PrimitiveDateTime::assume_offset
    • PrimitiveDateTime::weekday
    • Duration::checked_add
    • Duration::checked_sub
    • Duration::checked_mul
    • OffsetDateTime::from_unix_timestamp
    • OffsetDateTime::from_unix_timestamp_nanos
    • OffsetDateTime::date
    • OffsetDateTime::time
    • OffsetDateTime::year
    • OffsetDateTime::month
    • OffsetDateTime::day
    • OffsetDateTime::ordinal
    • OffsetDateTime::to_iso_week_date
    • OffsetDateTime::week
    • OffsetDateTime::weekday
    • OffsetDateTime::hour
    • OffsetDateTime::minute
    • OffsetDateTime::second
    • OffsetDateTime::millisecond
    • OffsetDateTime::microsecond
    • OffsetDateTime::nanosecond
    • OffsetDateTime::unix_timestamp
    • OffsetDateTime::unix_timestamp_nanos
  • The following functions now return a Result:
    • Date::from_julian_day
    • OffsetDateTime::from_unix_timestamp
    • OffsetDateTime::from_unix_timestamp_nanos
  • The following functions now return an Option:
    • Date::next_day
    • Date::previous_day
  • The range of valid years has changed. By default, it is ±9999. When using the large-dates
    feature, this is increased to ±999,999. Enabling the feature has performance implications and
    introduces ambiguities when parsing.
  • The following are now gated under the local-offset feature:
    • UtcOffset::local_offset_at
    • OffsetDateTime::now_local
  • Instant is now guaranteed to be represented as a tuple struct containing a std::time::Instant.
  • Macros are guaranteed to be evaluated at compile time.
  • Date::to_julian_day now returns an i32 (was i64).
  • Date::from_julian_day now accepts an i32 (was i64).
  • Extension traits are only implemented for some types and are now sealed. As they are intended to
    be used with value literals, the breakage caused by this should be minimal.
  • The new Month enum is used instead of numerical values where appropriate.
Removed
  • v0.1 APIs, previously behind an enabled-by-default feature flag
    • PreciseTime
    • SteadyTime
    • precise_time_ns
    • precise_time_s
    • Instant::to
    • Duration::num_weeks
    • Duration::num_days
    • Duration::num_hours
    • Duration::num_minutes
    • Duration::num_seconds
    • Duration::num_milliseconds
    • Duration::num_microseconds
    • Duration::num_nanoseconds
    • Duration::span
    • Duration::from_std
    • Duration::to_std
  • Panicking APIs, previously behind a non-default feature flag
    • Date::from_ymd
    • Date::from_yo
    • Date::from_iso_ywd
    • Date::with_hms
    • Date::with_hms_milli
    • Date::with_hms_micro
    • Date::with_hms_nano
    • Time::from_hms
    • Time::from_hms_milli
    • Time::from_hms_micro
    • Time::from_hms_nano
  • APIs that assumed an offset of UTC, previously enabled unconditionally
    • Date::today
    • Time::now
    • PrimitiveDateTime::now
    • PrimitiveDateTime::unix_epoch
    • PrimitiveDateTime::from_unix_timestamp
    • PrimitiveDateTime::timestamp
    • OffsetDateTime::now
    • impl Sub<SystemTime> for PrimitiveDateTime
    • impl Sub<PrimitiveDateTime> for SystemTime
    • impl PartialEq<SystemTime> for PrimitiveDateTime
    • impl PartialEq<PrimitiveDateTime> for SystemTime
    • impl PartialOrd<SystemTime> for PrimitiveDateTime
    • impl PartialOrd<PrimitiveDateTime> for SystemTime
    • impl From<SystemTime> for PrimitiveDateTime
    • impl From<PrimitiveDateTime> for SystemTime
    • UtcOffset::local_offset_at — assumed UTC if unable to determine local offset
    • OffsetDateTime::now_local — assumed UTC if unable to determine local offset
  • Other APIs deprecated during the course of 0.2, previously enabled unconditionally
    • Duration::sign
    • PrimitiveDateTime::using_offset
    • Sign
  • Re-exports of APIs moved during the course of 0.2
    • days_in_year
    • is_leap_year
    • validate_format_string
    • weeks_in_year
    • ComponentRangeError
    • ConversionRangeError
    • IndeterminateOffsetError
    • ParseError
    • NumericalDuration
    • NumericalStdDuration
    • NumericalStdDurationShort
    • All top-level macros
  • Lazy formatting, which was unidiomatic as a failure would have returned fmt::Error, indicating
    an error unrelated to the time crate.
    • Time::lazy_format
    • Date::lazy_format
    • UtcOffset::lazy_format
    • PrimitiveDateTime::lazy_format
    • OffsetDateTime::lazy_format
  • Support for stdweb has been removed, as the crate is unmaintained.
  • The prelude module has been removed in its entirety.
  • Date::iso_year_week in favor of Date::to_iso_week_date
  • PrimitiveDateTime::iso_year_week
  • OffsetDateTime::iso_year_week
  • UtcOffset::east_hours
  • UtcOffset::west_hours
  • UtcOffset::hours
  • UtcOffset::east_minutes
  • UtcOffset::west_minutes
  • UtcOffset::minutes
  • UtcOffset::east_seconds
  • UtcOffset::west_seconds
  • UtcOffset::seconds
  • Date::month_day
  • PrimitiveDateTime::month_day
  • OffsetDateTime::month_day
  • Weekday::iso_weekday_number (identical to Weekday::number_from_monday)
  • ext::NumericalStdDurationShort

v0.2.27

Compare Source

v0.2.26

Compare Source

Fixed
  • #​316, where the build script was wrongly unable to determine the correct compiler version
  • Dependencies have been bumped to the latest patch version, ensuring compatibility.

v0.2.25

Compare Source

Fixed
  • Fix #​309, which can cause panics in certain situations.

v0.2.24

Compare Source

Fixed
  • The implementation of OffsetDateTime::timestamp, OffsetDateTime::unix_timestamp,
    PrimitiveDatetime::timestamp, and OffsetDateTime::unix_timestamp have been corrected. This
    affects all negative timestamps with a nonzero subsecond value.

v0.2.23

Compare Source

Compatibility notes

Due to #​293, any method that requires knowledge of the local offset will now
fail on Linux. For try_ methods, this means returning an error. For others,
it means assuming UTC.

Deprecated
  • UtcOffset::timestamp (moved to UtcOffset::unix_timestamp)
  • UtcOffset::timestamp_nanos (moved to UtcOffset::unix_timestamp_nanos)
  • date (moved to macros::date)
  • time (moved to macros::time)
  • offset (moved to macros::offset)
  • OffsetDateTime::now_local (assumes UTC if unable to be determined)
  • UtcOffset::local_offset_at (assumes UTC if unable to be determined)
  • UtcOffset::current_local_offset (assumes UTC if unable to be determined)

v0.2.22

Compare Source

Fixed
  • Solaris & Illumos now successfully build.
  • Duration::new could previously result in an inconsistent internal state. This led to some odd
    situations where a Duration could be both positive and negative. This has been fixed such that
    the internal state maintains its invariants.

v0.2.21

Compare Source

Changed
  • Implementation details of some error types have been exposed. This means that data about a
    component being out of range can be directly obtained, while an invalid offset or conversion error
    is guaranteed to be a zero-sized type.
  • The following functions are const fn on rustc ≥ 1.46:
    • Date::try_from_iso_ywd
    • Date::iso_year_week
    • Date::week
    • Date::sunday_based_week
    • Date::monday_based_week
    • Date::try_with_hms
    • Date::try_with_hms_milli
    • Date::try_with_hms_micro
    • Date::try_with_hms_nano
    • PrimitiveDateTime::iso_year_week
    • PrimitiveDateTime::week
    • PrimitiveDateTime::sunday_based_week
    • PrimitiveDateTime::monday_based_week
    • util::weeks_in_year

v0.2.20

Compare Source

Added
  • OffsetDateTime::timestamp_nanos
  • OffsetDateTime::from_unix_timestamp_nanos
Fixed

A bug with far-reaching consequences has been fixed. See #​276 for complete details, but the gist is
that the constructing a Date from a valid Julian day may result in an invalid value or even panic.
As a consequence of implementation details, this affects nearly all arithmetic with Dates (and as
a result also PrimitiveDateTimes and OffsetDateTimes).

Improvements
  • Document how to construct an OffsetDateTime from a timestamp-nanosecond pair

v0.2.19

Compare Source

Fixed
  • The build script now declares a dependency on the COMPILING_UNDER_CARGO_WEB environment
    variable.
  • Parsing the %D specifier no longer requires padding on the month. Previously,
    Err(InvalidMonth) was incorrectly returned.
  • A std::time::Duration that is larger than time::Duration::max_value() now correctly returns
    Ordering::Greater when compared.
  • Multiplying and assigning an integer by Sign::Zero now sets the integer to be zero. This
    previously left the integer unmodified.

v0.2.18

Compare Source

Changed
  • The following functions are const fn on rustc ≥ 1.46:
    • Date::try_from_ymd
    • Date::try_from_yo
    • Time::try_from_hms
    • Time::try_from_hms_milli
    • Time::try_from_hms_micro
    • Time::try_from_hms_nano
  • An error module has been created where all existing error types are contained. The Error
    suffix has been dropped from these types.
  • An ext module has been created where extension traits are contained.
  • A util module has been created where utility functions are contained.
  • error::ComponentRange now implements Copy.

For back-compatibility, all items that were moved to newly-contained modules have been re-exported
from their previous locations (and in the case of the error module, with their previous name).

Fixes

Parsing format::Rfc3339 now correctly handles the UTC offset (#​274).

v0.2.17

Compare Source

Changed

The following functions are const fn on rustc ≥ 1.46:

  • Date::year
  • Date::month
  • Date::day
  • Date::month_day
  • Date::ordinal
  • Date::as_ymd
  • Date::as_yo
  • Date::julian_day
  • Duration::checked_div
  • PrimitiveDateTime::year
  • PrimitiveDateTime::month
  • PrimitiveDateTime::day
  • PrimitiveDateTime::month_day
  • PrimitiveDateTime::ordinal
  • Weekday::previous
  • Weekday::next
Improvements
  • size_of::<Date>() has been reduced from 8 to 4. As a consequence,
    size_of::<PrimitiveDatetime>() went from 16 to 12 and size_of::<OffsetDateTime>() from 20
    to 16. This change also results in a performance improvement of approximately 30% on the
    Date::year and Date::ordinal methods.
  • cfg-if has been removed as a dependency.
Fixed
  • cfg flags passed to rustc will no longer collide with other crates (at least unless they're
    doing something very stupid).
  • The crate will successfully compile with any combination of feature flags. Previously, some
    combinations would fail.

v0.2.16

Compare Source

Added

OffsetDateTimes can now be represented as Unix timestamps with serde. To do this, you can use the
time::serde::timestamp and time::serde::timestamp::option modules.

v0.2.15

Compare Source

Fixed

cargo-web support works, and is now explicitly checked in CI. A previous change was made that made
a method call ambiguous.

v0.2.14

Compare Source

Fixed

Adding/subtracting a core::time::Duration now correctly takes subsecond values into account. This
also affects PrimitiveDateTime and OffsetDateTime.

v0.2.13

Compare Source

Fixed

Panicking APIs are re-exposed.

v0.2.12

Compare Source

Fixed

Subtracting Instants can correctly result in a negative duration, rather than resulting in the
absolute value of it.

v0.2.11

Compare Source

Added
  • OffsetDateTime::now_utc
Deprecated
  • OffsetDateTime::now due to the offset not being clear from the method name alone.
Fixed

Dates are now uniformly random when using the rand crate. Previously, both the year and day
within the year were uniform, but this meant that any given day in a leap year was slightly less
likely to be chosen than a day in a non-leap year.

Changed
  • MSRV is lowered to 1.32.0.

v0.2.10

Compare Source

Added
  • Support for formatting and parsing OffsetDateTimes as RFC3339.
  • Lazy formatting. To avoid exposing implementation details, we're just returning impl Display, rather than a concrete type.
  • Add support for Illumos.
Fixed
  • Deprecated APIs from time v0.1 are public again. They were previously hidden by accident in 0.2.9.

v0.2.9

Compare Source

Fixed

cfg-if now has a mandatory minimum of 0.1.10, rather than just 0.1. This is because compilation
fails when using 0.1.9.

v0.2.8

Compare Source

Added
  • cargo_web support has been added for getting a local offset. A general catch-all defaulting to
    UTC has also been added.
  • Error::source has been implemented for the wrapper time::Error.
  • UtcOffset::try_local_offset, UtcOffset::try_current_local_offset,
    OffsetDateTime::try_now_local() provide fallible alternatives when the default of UTC is not
    desired. To facilitate this change, IndeterminateOffsetError has been added.
  • Support for parsing and formatting subsecond nanoseconds.
Changed
  • #[non_exhaustive] is simulated on compilers prior to 1.40.0.

v0.2.7

Compare Source

Added
  • Display has been implemented for Date, OffsetDateTime, PrimitiveDateTime, Time,
    UtcOffset, and Weekday.
  • Hash is now derived for Duration.
  • SystemTime can be converted to and from OffsetDateTime. The following trait implementations
    have been made for interoperability:
    • impl Sub<SystemTime> for OffsetDateTime
    • impl Sub<OffsetDateTime> for SystemTime
    • impl PartialEq<SystemTime> for OffsetDateTime
    • impl PartialEq<OffsetDateTime> for SystemTime
    • impl PartialOrd<SystemTime> for OffsetDateTime
    • impl PartialOrd<OffsetDateTime> for SystemTime
    • impl From<SystemTime> for OffsetDateTime
    • impl From<OffsetDateTime> for SystemTime
  • All structs now impl Duration<T> for Standard, allowing usage with the rand crate. This is
    gated behind the rand feature flag.
  • Documentation can now be built on stable. Some annotations will be missing if you do this.
  • NumericalDuration has been implemented for f32 and f64. NumericalStdDuration and
    NumericalStdDurationShort have been implemented for f64 only.
  • UtcOffset::local_offset_at(OffsetDateTime), which will obtain the system's local offset at the
    provided moment in time.
    • OffsetDateTime::now_local() is equivalent to calling
      OffsetDateTime::now().to_offset(UtcOffset::local_offset_at(OffsetDateTime::now())) (but more
      efficient).
    • UtcOffset::current_local_offset() will return the equivalent of
      OffsetDateTime::now_local().offset().
Changed
  • All formatting and parsing methods now accept impl AsRef<str> as parameters, rather than just
    &str. time::validate_format_string does this as well.
  • The requirement of a Date being between the years -100,000 and +100,000 (inclusive) is now
    strictly enforced.
  • Overflow checks for Duration are now enabled by default. This behavior is the identical to what
    the standard library does.
  • The time, date, and offset macros have been added to the prelude.
Deprecated
  • Sign has been deprecated in its entirety, along with Duration::sign.

    To obtain the sign of a Duration, you can use the Duration::is_positive,
    Duration::is_negative, and Duration::is_zero methods.

  • A number of functions and trait implementations that implicitly assumed a timezone (generally UTC)
    have been deprecated. These are:

    • Date::today
    • Time::now
    • PrimitiveDateTime::now
    • PrimitiveDateTime::unix_epoch
    • PrimitiveDateTime::from_unix_timestamp
    • PrimitiveDateTime::timestamp
    • impl Sub<SystemTime> for PrimitiveDateTime
    • impl Sub<PrimitiveDateTime> for SystemTime
    • impl PartialEq<SystemTime> for PrimitiveDateTime
    • impl PartialEq<PrimitiveDateTime> for SystemTime>
    • impl PartialOrd<SystemTime> for PrimitiveDateTime
    • impl PartialOrd<PrimitiveDateTime> for SystemTime>
    • impl From<SystemTime> for PrimitiveDateTime
    • impl From<PrimitiveDateTime> for SystemTime
Fixed
  • Avoid panics when parsing an empty string (#​215).
  • The nanoseconds component of a Duration is now always in range. Previously, it was possible (via
    addition and/or subtraction) to obtain a value that was not internally consistent.
  • Time::parse erroneously returned an InvalidMinute error when it was actually the second that
    was invalid.
  • Date::parse("0000-01-01", "%Y-%m-%d") incorrectly returned an Err (#​221).

v0.2.6

Compare Source

Bug fixes

v0.2.5 introduces a major inconsistency, not just in its behavior for PrimitiveDateTime::using_offset, but also changes its signature, rendering it incapable of being used in const contexts.

Both the behavior and the function signature have been fixed, while still fixing the underlying issue. PrimitiveDateTime::using_offset mentions in the docs that the PrimitiveDateTime is assumed to be UTC, and is converted to the provided offset. This was the previous behavior.

The following functionality had bugs that were fixed (from v0.2.4):

  • OffsetDateTime::timestamp
  • OffsetDateTime::parse
  • Equality, comparison for OffsetDateTime — Subsecond values were not checked previously. They also relied on the faulty timestamp implementation.
  • Hashing of OffsetDateTime — Same as equality and comparison. Additionally, hashes would collide with PrimitiveDateTime if the underlying UTC was the same.
  • Subtraction of two OffsetDateTimes previously disregarded the subsecond values.

All of these changes are now checked in CI, so regressions will be caught.

v0.2.5

Compare Source

Bug fixes

PrimitiveDateTime::using_offset was poorly defined, leading to an ambiguity that cause some methods to treat the existing datetime as UTC, while others treated it as the time in the provided offset. This release ensures that the behavior is what I intended — the datetime is assumed to be in the provided offset.

NB: This release has been yanked from crates.io due to major back-compatibility issues. These have been fixed in 0.2.6.

v0.2.4

Compare Source

v0.2.4 is identical to v0.2.3 with the exception of the breaking change, which has been reverted. v0.2.4 is backwards-compatible with v0.2.2.

v0.2.3

Compare Source

v0.2.3 has been yanked from crates.io. The breaking change (with regard to feature flags) should not have been made. By yanking this version, any existing code will continue to work, while new code will not have potential backwards-incompatible behavior. The change was reverted in v0.2.4.

Additions
  • time!, date!, offset! macros
  • Top-level parse function, allowing for type inference.
  • time::Result<T> alias to time::Result<T, time::Error>
Deprecated

Panicking APIs have been deprecated in favor of the new macros.

Changes

Minimum supported Rust version is now 1.34, changed from 1.40. This permits a number of crates to upgrade without breaking MSRV.

Bug fixes

A number of parsing methods used unchecked constructors. This was because the values should have been checked prior. They are now.

Breaking changes

The "std" feature has been renamed to "alloc", which disables the standard library. This was necessary to bring MSRV down to 1.34.

v0.2.2

Compare Source

Fixed
  • #​316, where the build script was wrongly unable to determine the correct compiler version
  • Dependencies have been bumped to the latest patch version, ensuring compatibility.

v0.2.1

Compare Source

Fixed
  • The build script now declares a dependency on the COMPILING_UNDER_CARGO_WEB environment
    variable.
  • Parsing the %D specifier no longer requires padding on the month. Previously,
    Err(InvalidMonth) was incorrectly returned.
  • A std::time::Duration that is larger than time::Duration::max_value() now correctly returns
    Ordering::Greater when compared.
  • Multiplying and assigning an integer by Sign::Zero now sets the integer to be zero. This
    previously left the integer unmodified.
tokio-rs/tokio

v1.21.2: Tokio v1.21.2

Compare Source

1.21.2 (September 27, 2022)

This release removes the dependency on the once_cell crate to restore the MSRV of 1.21.x, which is the latest minor version at the time of release. (#​5048)

v1.21.1: Tokio v1.21.1

Compare Source

1.21.1 (September 13, 2022)

Fixed
  • net: fix dependency resolution for socket2 (#​5000)
  • task: ignore failure to set TLS in LocalSet Drop (#​4976)

v1.21.0: Tokio v1.21.0

Compare Source

1.21.0 (September 2, 2022)

This release is the first release of Tokio to intentionally support WASM. The sync,macros,io-util,rt,time features are stabilized on WASM. Additionally the wasm32-wasi target is given unstable support for the net feature.

Added
  • net: add device and bind_device methods to TCP/UDP sockets (#​4882)
  • net: add tos and set_tos methods to TCP and UDP sockets (#​4877)
  • net: add security flags to named pipe ServerOptions (#​4845)
  • signal: add more windows signal handlers (#​4924)
  • sync: add mpsc::Sender::max_capacity method (#​4904)
  • sync: implement Weak version of mpsc::Sender (#​4595)
  • task: add LocalSet::enter (#​4765)
  • task: stabilize JoinSet and AbortHandle (#​4920)
  • tokio: add track_caller to public APIs (#​4805, #​4848, #​4852)
  • wasm: initial support for wasm32-wasi target (#​4716)
Fixed
  • miri: improve miri compatibility by avoiding temporary references in linked_list::Link impls (#​4841)
  • signal: don't register write interest on signal pipe (#​4898)
  • sync: add #[must_use] to lock guards (#​4886)
  • sync: fix hang when calling recv on closed and reopened broadcast channel (#​4867)
  • task: propagate attributes on task-locals (#​4837)
Changed
  • fs: change panic to error in File::start_seek (#​4897)
  • io: reduce syscalls in poll_read (#​4840)
  • process: use blocking threadpool for child stdio I/O (#​4824)
  • signal: make SignalKind methods const (#​4956)
Internal changes
  • rt: extract basic_scheduler::Config (#​4935)
  • rt: move I/O driver into runtime module (#​4942)
  • rt: rename internal scheduler types (#​4945)
Documented
  • chore: fix typos and grammar (#​4858, #​4894, #​4928)
  • io: fix typo in AsyncSeekExt::rewind docs (#​4893)
  • net: add documentation to try_read() for zero-length buffers (#​4937)
  • runtime: remove incorrect panic section for Builder::worker_threads (#​4849)
  • sync: doc of watch::Sender::send improved (#​4959)
  • task: add cancel safety docs to JoinHandle (#​4901)
  • task: expand on cancellation of spawn_blocking (#​4811)
  • time: clarify that the first tick of Interval::tick happens immediately (#​4951)
Unstable
  • rt: add unstable option to disable the LIFO slot (#​4936)
  • task: fix incorrect signature in Builder::spawn_on (#​4953)
  • task: make task::Builder::spawn* methods fallible (#​4823)

v1.20.2: Tokio v1.20.2

Compare Source

1.20.2 (September 27, 2022)

This release removes the dependency on the once_cell crate to restore the MSRV of the 1.20.x LTS release. (#​5048)

tokio-rs/tracing

v0.1.37: tracing 0.1.37

Compare Source

This release of tracing incorporates changes from tracing-core
v0.1.30 and tracing-attributes v0.1.23,
including the new Subscriber::on_register_dispatch method for performing late
initialization after a Subscriber is registered as a Dispatch, and bugfixes
for the #[instrument] attribute. Additionally, it fixes instances of the
bare_trait_objects lint, which is now a warning on tracing's MSRV and will
become an error in the next edition.

Fixed
  • attributes: Incorrect handling of inner attributes in #[instrument]ed
    functions (#​2307)
  • attributes: Incorrect location of compiler diagnostic spans generated for
    type errors in #[instrument]ed async fns (#​2270)
  • attributes: Updated syn dependency to fix compilation with -Z minimal-versions (#​2246)
  • bare_trait_objects warning in valueset! macro expansion (#​2308)
Added
  • core: Subscriber::on_register_dispatch method (#​2269)
  • core: WeakDispatch type and Dispatch::downgrade() function (#​2293)
Changed
  • tracing-core: updated to 0.1.30
  • tracing-attributes: updated to 0.1.23
Documented
  • Added [tracing-web][tracing-web] and [reqwest-tracing][reqwest-tracing] to related crates (#​2283,
    #​2331)

Thanks to new contributors @​compiler-errors, @​e-nomem, @​WorldSEnder, @​Xiami2012,
and @​tl-rodrigo-gryzinski, as well as @​jswrenn and @​CAD97, for contributing to
this release!

uuid-rs/uuid

v1.2.2

Compare Source

What's Changed

Full Changelog: https://github.com/uuid-rs/uuid/compare/1.2.1...1.2.2

v1.2.1

Compare Source

What's Changed

Full Changelog: https://github.com/uuid-rs/uuid/compare/1.2.0...1.2.1

v1.2.0

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/uuid-rs/uuid/compare/1.1.2...1.2.0

Keats/validator

v0.16.0

  • Allow passing code/message to required
  • Add does_not_contain validator
  • Check email length before validating it

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [anyhow](https://github.com/dtolnay/anyhow) | dependencies | patch | `1.0.60` -> `1.0.66` | | [async-graphql](https://github.com/async-graphql/async-graphql) | dependencies | patch | `4.0.6` -> `4.0.16` | | [axum](https://github.com/tokio-rs/axum) | dependencies | patch | `0.5.13` -> `0.5.17` | | [axum](https://github.com/tokio-rs/axum) | dependencies | patch | `0.5.1` -> `0.5.17` | | [clap](https://github.com/clap-rs/clap) | dependencies | major | `3` -> `4` | | [mockall](https://github.com/asomers/mockall) | dependencies | patch | `0.11.1` -> `0.11.3` | | postgres | final | major | `14-alpine` -> `15-alpine` | | [serde](https://serde.rs) ([source](https://github.com/serde-rs/serde)) | dependencies | patch | `1.0.136` -> `1.0.147` | | [serde_json](https://github.com/serde-rs/json) | dependencies | patch | `1.0.68` -> `1.0.87` | | [serde_json](https://github.com/serde-rs/json) | dependencies | patch | `1.0.81` -> `1.0.87` | | [sqlx](https://github.com/launchbadge/sqlx) | dependencies | minor | `0.5` -> `0.6` | | [time](https://time-rs.github.io) ([source](https://github.com/time-rs/time)) | dependencies | minor | `0.2` -> `0.3` | | [tokio](https://tokio.rs) ([source](https://github.com/tokio-rs/tokio)) | dependencies | minor | `1.20.1` -> `1.21.2` | | [tracing](https://tokio.rs) ([source](https://github.com/tokio-rs/tracing)) | dependencies | patch | `0.1.36` -> `0.1.37` | | [tracing-subscriber](https://tokio.rs) ([source](https://github.com/tokio-rs/tracing)) | dependencies | patch | `0.3.15` -> `0.3.16` | | [uuid](https://github.com/uuid-rs/uuid) | dependencies | minor | `1.1.2` -> `1.2.2` | | [validator](https://github.com/Keats/validator) | dependencies | minor | `0.15` -> `0.16` | --- ### Release Notes <details> <summary>dtolnay/anyhow</summary> ### [`v1.0.66`](https://github.com/dtolnay/anyhow/releases/tag/1.0.66) [Compare Source](https://github.com/dtolnay/anyhow/compare/1.0.65...1.0.66) - Reduce unhelpful backtrace frames in backtraces captured during a `context` call ([#&#8203;279](https://github.com/dtolnay/anyhow/issues/279)) ### [`v1.0.65`](https://github.com/dtolnay/anyhow/releases/tag/1.0.65) [Compare Source](https://github.com/dtolnay/anyhow/compare/1.0.64...1.0.65) - <code>impl <a href="https://doc.rust-lang.org/std/any/trait.Provider.html">Provider</a> for anyhow::Error</code> ### [`v1.0.64`](https://github.com/dtolnay/anyhow/releases/tag/1.0.64) [Compare Source](https://github.com/dtolnay/anyhow/compare/1.0.63...1.0.64) - Correctly propagate Backtrace when using `#[source] anyhow::Error` with [thiserror](https://github.com/dtolnay/thiserror) crate ([#&#8203;231](https://github.com/dtolnay/anyhow/issues/231)) ### [`v1.0.63`](https://github.com/dtolnay/anyhow/releases/tag/1.0.63) [Compare Source](https://github.com/dtolnay/anyhow/compare/1.0.62...1.0.63) - Expose backtraces via the new "generic member access" API on the Error trait (https://github.com/rust-lang/rust/issues/99301, https://github.com/rust-lang/rust/issues/96024) ### [`v1.0.62`](https://github.com/dtolnay/anyhow/releases/tag/1.0.62) [Compare Source](https://github.com/dtolnay/anyhow/compare/1.0.61...1.0.62) - Fix extra rebuilding when interleaving command-line `cargo` invocations with IDE builds ([#&#8203;261](https://github.com/dtolnay/anyhow/issues/261)) ### [`v1.0.61`](https://github.com/dtolnay/anyhow/releases/tag/1.0.61) [Compare Source](https://github.com/dtolnay/anyhow/compare/1.0.60...1.0.61) - Work around rust-analyzer builds poisoning all subsequent command-line cargo builds ([#&#8203;252](https://github.com/dtolnay/anyhow/issues/252)) </details> <details> <summary>async-graphql/async-graphql</summary> ### [`v4.0.16`](https://github.com/async-graphql/async-graphql/blob/HEAD/CHANGELOG.md#&#8203;4016-2022-10-20) - Add credentials to GraphiQL 2 [#&#8203;1105](https://github.com/async-graphql/async-graphql/pull/1105) - Add TypeName support for InputObject [#&#8203;1110](https://github.com/async-graphql/async-graphql/pull/1110) - Fix error message [#&#8203;1058](https://github.com/async-graphql/async-graphql/pull/1058) - Add TypeName support for Enum, Union, OneofInputObject, Subscription, MergedObject, MergedSubscription, Scalar, Interface, Directive - Fixes [#&#8203;1052](https://github.com/async-graphql/async-graphql/issues/1052) - Implement `CustomValidator<T>` for `F: Fn(&T) -> Result<(), E: Into<String>>` - Add `validator` attribute to `InputObject` macro [#&#8203;1072](https://github.com/async-graphql/async-graphql/issues/1072) ### [`v4.0.15`](https://github.com/async-graphql/async-graphql/blob/HEAD/CHANGELOG.md#&#8203;4015-2022-10-07) - Dynamic Document Title for GraphiQL v2 and GraphQL Playground [#&#8203;1099](https://github.com/async-graphql/async-graphql/pull/1099) - Skip tracing for introspection queries. [#&#8203;841](https://github.com/async-graphql/async-graphql/issues/841) - Add `SchemaBuilder::disable_suggestions` method to disable field suggestions. [#&#8203;1101](https://github.com/async-graphql/async-graphql/issues/1101) ### [`v4.0.14`](https://github.com/async-graphql/async-graphql/blob/HEAD/CHANGELOG.md#&#8203;4014-2022-09-25) - Implement a simple approach to using the link directive. [#&#8203;1060](https://github.com/async-graphql/async-graphql/pull/1060) - docs: Update federation docs with examples of each directive. [#&#8203;1080](https://github.com/async-graphql/async-graphql/pull/1080) - Add support for parse request from query string. [#&#8203;1085](https://github.com/async-graphql/async-graphql/issues/1085) ### [`v4.0.13`](https://github.com/async-graphql/async-graphql/blob/HEAD/CHANGELOG.md#&#8203;4013-2022-09-09) - Compare to expected schema [#&#8203;1048](https://github.com/async-graphql/async-graphql/pull/1048) - docs: readme flair [#&#8203;1054](https://github.com/async-graphql/async-graphql/pull/1054) - Remove `bson-uuid` feature [#&#8203;1032](https://github.com/async-graphql/async-graphql/issues/1032) - Add `no_cache` for `cache_control` attribute [#&#8203;1051](https://github.com/async-graphql/async-graphql/issues/1051) - Resurrect code generation through tests [#&#8203;1062](https://github.com/async-graphql/async-graphql/pull/1062) - Support for primitive type in CursorType [#&#8203;1049](https://github.com/async-graphql/async-graphql/pull/1049) - Add `SDLExportOptions::include_specified_by` method to enable `specifiedBy` directive [#&#8203;1065](https://github.com/async-graphql/async-graphql/issues/1065) ### [`v4.0.12`](https://github.com/async-graphql/async-graphql/blob/HEAD/CHANGELOG.md#&#8203;4012-2022-08-24) - Update MSRV to `1.59.0` - Support `@specifiedBy` directive in SDL export [#&#8203;1041](https://github.com/async-graphql/async-graphql/pull/1041) - Add GraphiQL v2 [#&#8203;1044](https://github.com/async-graphql/async-graphql/pull/1044) - Export SDL: consistently avoid trailing spaces [#&#8203;1043](https://github.com/async-graphql/async-graphql/pull/1043) ### [`v4.0.11`](https://github.com/async-graphql/async-graphql/blob/HEAD/CHANGELOG.md#&#8203;4011-2022-08-23) - Define `override` directive on fields [#&#8203;1029](https://github.com/async-graphql/async-graphql/pull/1029) - Add `@tag` support [#&#8203;1038](https://github.com/async-graphql/async-graphql/pull/1038) - Export SDL: avoid trailing space for scalar definitions [#&#8203;1036](https://github.com/async-graphql/async-graphql/pull/1036) - Fixes [#&#8203;1039](https://github.com/async-graphql/async-graphql/issues/1039) ### [`v4.0.10`](https://github.com/async-graphql/async-graphql/blob/HEAD/CHANGELOG.md#&#8203;4010-2022-08-18) - Fixes extension `request.data(X)` being lost in the resolver [#&#8203;1018](https://github.com/async-graphql/async-graphql/pull/1018) - Add Apollo federation `@shareable` directive support [#&#8203;1025](https://github.com/async-graphql/async-graphql/pull/1025) - Add Apollo Federation `@inaccessible` directive support [#&#8203;1026](https://github.com/async-graphql/async-graphql/pull/1026) ### [`v4.0.9`](https://github.com/async-graphql/async-graphql/blob/HEAD/CHANGELOG.md#&#8203;409-2022-08-15) - `on_connection_init` takes `FnOnce` instead of `Fn` [#&#8203;1022](https://github.com/async-graphql/async-graphql/issues/1022#issuecomment-1214575590) ### [`v4.0.8`](https://github.com/async-graphql/async-graphql/blob/HEAD/CHANGELOG.md#&#8203;408-2022-08-12) - Add tracing to dataloader methods when the tracing feature is enabled. [#&#8203;996](https://github.com/async-graphql/async-graphql/pull/996) ### [`v4.0.7`](https://github.com/async-graphql/async-graphql/blob/HEAD/CHANGELOG.md#&#8203;407-2022-08-09) - Limit parser recursion depth to `64`. </details> <details> <summary>tokio-rs/axum</summary> ### [`v0.5.17`](https://github.com/tokio-rs/axum/releases/tag/axum-v0.5.17): axum - v0.5.17 [Compare Source](https://github.com/tokio-rs/axum/compare/axum-v0.5.16...axum-v0.5.17) - **fixed:** Annotate panicking functions with `#[track_caller]` so the error message points to where the user added the invalid router, rather than somewhere internally in axum ([#&#8203;1248]) - **fixed:** Make `Multipart` extractor work with `RequestBodyLimit` middleware ([#&#8203;1379]) - **added:** Add `DefaultBodyLimit::max` for changing the default body limit ([#&#8203;1397]) - **added:** Various documentation improvements [#&#8203;1248]: https://github.com/tokio-rs/axum/pull/1248 [#&#8203;1379]: https://github.com/tokio-rs/axum/pull/1379 [#&#8203;1397]: https://github.com/tokio-rs/axum/pull/1397 ### [`v0.5.16`](https://github.com/tokio-rs/axum/releases/tag/axum-v0.5.16): axum - v0.5.16 [Compare Source](https://github.com/tokio-rs/axum/compare/axum-v0.5.15...axum-v0.5.16) #### Security - **breaking:** Added default limit to how much data `Bytes::from_request` will consume. Previously it would attempt to consume the entire request body without checking its length. This meant if a malicious peer sent an large (or infinite) request body your server might run out of memory and crash. The default limit is at 2 MB and can be disabled by adding the new `DefaultBodyLimit::disable()` middleware. See its documentation for more details. This also applies to these extractors which used `Bytes::from_request` internally: - `Form` - `Json` - `String` Thanks to Shachar Menashe for reporting this vulnerability. ([#&#8203;1346]) [#&#8203;1346]: https://github.com/tokio-rs/axum/pull/1346 ### [`v0.5.15`](https://github.com/tokio-rs/axum/releases/tag/axum-v0.5.15): axum - v0.5.15 [Compare Source](https://github.com/tokio-rs/axum/compare/axum-v0.5.14...axum-v0.5.15) Note: This is a re-release of 0.5.14 that fixes an accidental breaking change. - **fixed:** Don't expose internal type names in `QueryRejection` response. ([#&#8203;1171]) - **fixed:** Improve performance of JSON serialization ([#&#8203;1178]) - **fixed:** Improve build times by generating less IR ([#&#8203;1192]) [#&#8203;1171]: https://github.com/tokio-rs/axum/pull/1171 [#&#8203;1178]: https://github.com/tokio-rs/axum/pull/1178 [#&#8203;1192]: https://github.com/tokio-rs/axum/pull/1192 ### [`v0.5.14`](https://github.com/tokio-rs/axum/releases/tag/axum-v0.5.14): axum - v0.5.14 [Compare Source](https://github.com/tokio-rs/axum/compare/axum-v0.5.13...axum-v0.5.14) Yanked, as it contained an accidental breaking change. </details> <details> <summary>clap-rs/clap</summary> ### [`v4.0.25`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4025---2022-11-15) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.24...v4.0.25) ##### Features - *(error)* Report available subcommands when required subcommand is missing ### [`v4.0.24`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4024---2022-11-14) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.23...v4.0.24) ##### Fixes - Avoid panic when printing an argument that isn't built ### [`v4.0.23`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4023---2022-11-11) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.22...v4.0.23) ##### Fixes - Don't panic on reporting invalid-long errors when followed by invalid UTF8 - *(help)* Clarified argument to `help` subcommand ### [`v4.0.22`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4022---2022-11-07) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.21...v4.0.22) ##### Fixes - *(help)* Don't overflow into next-line-help early due to stale (pre-v4) padding calculations ### [`v4.0.21`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4021---2022-11-07) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.20...v4.0.21) ##### Features - *(derive)* `long_about` and `long_help` attributes, without a value, force using doc comment (before it wouldn't be set if there wasn't anything different than the short help) ### [`v4.0.20`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4020---2022-11-07) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.19...v4.0.20) ##### Fixes - *(derive)* Allow defaulted value parser for '()' fields ### [`v4.0.19`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4019---2022-11-04) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.18...v4.0.19) ##### Features - `ColorChoice` now implements `ValueEnum` ### [`v4.0.18`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4018---2022-10-20) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.17...v4.0.18) ##### Fixes - *(derive)* Allow `#[command(skip)]` to also work with enum variants with a value ### [`v4.0.17`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4017---2022-10-18) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.16...v4.0.17) ##### Fixes - Allow using `Arg::last(true)` with `Arg::value_hint(ValueHint::CommandWithArguments)` ### [`v4.0.16`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4016---2022-10-18) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.15...v4.0.16) ##### Fixes - `Arg::exclusive(true)` should not be exclusive with the argument's own `ArgGroup` ### [`v4.0.15`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4015---2022-10-13) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.14...v4.0.15) ##### Fixes - *(error)* Don't suggest `--` when it doesn't help - *(error)* Be more consistent in quoting, punctuation, and indentation in errors ### [`v4.0.14`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4014---2022-10-12) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.13...v4.0.14) ##### Fixes - Only put `ArgGroup` in `ArgMatches` when explicitly specified, fixing derives handling of option-flattened fields ([#&#8203;4375](https://github.com/clap-rs/clap/issues/4375)) ### [`v4.0.13`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4013---2022-10-11) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.12...v4.0.13) ##### Features - *(derive)* Allow `()` for fields to mean "don't read" ([#&#8203;4371](https://github.com/clap-rs/clap/issues/4371)) ### [`v4.0.12`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4012---2022-10-10) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.11...v4.0.12) ##### Features - Added `TypedValueParser::try_map` for when adapting an existing `TypedValueParser` can fail - *(error)* Create errors like clap with `Error::new`, `Error::with_cmd`, and `Error::insert` ### [`v4.0.11`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4011---2022-10-09) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.10...v4.0.11) ##### Fixes - *(help)* Fix wrapping calculations with ANSI escape codes ### [`v4.0.10`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4010---2022-10-05) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.9...v4.0.10) ##### Features - *(derive)* Support `#[arg(flatten)]` on `Option` types ([#&#8203;4211](https://github.com/clap-rs/clap/issues/4211), [#&#8203;4350](https://github.com/clap-rs/clap/issues/4350)) ### [`v4.0.9`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;409---2022-10-03) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.8...v4.0.9) ##### Fixes - *(derive)* Process doc comments for `#[command(subcommand)]` like in clap v3 ### [`v4.0.8`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;408---2022-10-01) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.7...v4.0.8) ##### Fixes - *(derive)* Remove a low-value assert preventing defaulting `Help` and `Version` actions ### [`v4.0.7`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;407---2022-09-30) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.6...v4.0.7) ##### Features - *(derive)* Populate implicit ArgGroup ([#&#8203;3165](https://github.com/clap-rs/clap/issues/3165)) ##### Fixes - *(derive)* Support `#[group(skip)]` on `Parser` derive - *(derive)* Tell users about implicit arg groups when running into group name conflicts - *(error)* Don't report unrelated groups in conflict or requires errors ### [`v4.0.6`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;406---2022-09-30) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.5...v4.0.6) ##### Features - *(derive)* Support `#[group(skip)]` ([#&#8203;4279](https://github.com/clap-rs/clap/issues/4279), [#&#8203;4301](https://github.com/clap-rs/clap/issues/4301)) ### [`v4.0.5`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;405---2022-09-30) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.4...v4.0.5) ### [`v4.0.4`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;404---2022-09-29) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.3...v4.0.4) ##### Fixes - *(error)* Specialize the self-conflict error to look like clap v3 ### [`v4.0.3`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;403---2022-09-29) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.2...v4.0.3) ##### Fixes - *(error)* Quote literals consistently - *(error)* Stylize escape (`--`) suggestions - *(error)* Format help flag as a literal ### [`v4.0.2`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4025---2022-11-15) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.1...v4.0.2) ##### Features - *(error)* Report available subcommands when required subcommand is missing ### [`v4.0.1`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4019---2022-11-04) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.0...v4.0.1) ##### Features - `ColorChoice` now implements `ValueEnum` ### [`v4.0.0`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;400---2022-09-28) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.23...v4.0.0) ##### Highlights **`Arg::num_args(range)`** Clap has had several ways for controlling how many values will be captured without always being clear on how they interacted, including - `Arg::multiple_values(true)` - `Arg::number_of_values(4)` - `Arg::min_values(2)` - `Arg::max_values(20)` - `Arg::takes_value(true)` These have now all been collapsed into `Arg::num_args` which accepts both single values and ranges of values. `num_args` controls how many raw arguments on the command line will be captured as values per occurrence and independent of value delimiters. See [Issue 2688](https://github.com/clap-rs/clap/issues/2688) for more background. **Polishing Help** Clap strives to give a polished CLI experience out of the box with little ceremony. With some feedback that has accumulated over time, we took this release as an opportunity to re-evaluate our `--help` output to make sure it is meeting that goal. In doing this evaluation, we wanted to keep in mind: - Whether other CLIs had ideas that make sense to apply - Providing an experience that fits within the rest of applications and works across all shells Before: git A fictional versioning CLI USAGE: git <SUBCOMMAND> OPTIONS: -h, --help Print help information SUBCOMMANDS: add adds things clone Clones repos help Print this message or the help of the given subcommand(s) push pushes things stash After: A fictional versioning CLI Usage: git <COMMAND> Commands: clone Clones repos push pushes things add adds things stash help Print this message or the help of the given subcommand(s) Options: -h, --help Print help information - name/version header was removed because we couldn't justify the space it occupied when - Usage already includes the name - `--version` is available for showing the same thing (if the program has a version set) - Usage was dropped to one line to save space - Focus is put on the subcommands - Headings are now Title case - The more general term "command" is used rather than being explicit about being "subcommands" - The output is more dense with the expectation that it won't affect legibility but will allow more content - We've moved to a more neutral palette for highlighting elements (not highlighted above) In talking to users, we found some that liked clap's `man`-like experience. When deviating from this, we are making the assumption that those are more power users and that the majority of users wouldn't look as favorably on being consistent with `man`. See [Issue 4132](https://github.com/clap-rs/clap/issues/4132) for more background. **More Dynamicism** Clap's API has focused on `&str` for performance but this can make dealing with owned data difficult, like `#[arg(default_value_t)]` generating a String from the default value. Additionally, to avoid `ArgMatches` from borrowing (and for some features we decided to forgo), clap took the `&str` argument IDs and hashed them. This prevented us from providing a usable API for iterating over existing arguments. Now clap has switched to a string newtype that gives us the flexibility to decide whether to use `&'static str`, `Cow<'static, str>` for fast dynamic behavior, or `Box<str>` for dynamic behavior with small binary size. As an extension of that work, you can now call `ArgMatches::ids` to iterate over the arguments and groups that were found when parsing. The newtype `Id` was used to prevent some classes of bugs and to make it easier to understand when opaque Ids are used vs user-visible strings. **Clearing Out Deprecations** Instead of doing all development on clap 4.0.0, we implemented a lot of new features during clap 3's development, deprecating the old API while introducing the new API, including: - Replacing the implicit behavior for args when parsing them with `ArgAction` - Replacing various one-off forms of value validation with the `ValueParser` API - Allowing derives to automatically do the right thing for `PathBuf` (allowing invalid UTF-8) - Replacing `AppSettings` and `ArgSettings` enums with getters/setters - Clarifying terms and making them more consistent ##### Migrating Steps: 0. [Upgrade to v3](https://github.com/clap-rs/clap/blob/v3-master/CHANGELOG.md#migrating) if you haven't already 1. Add CLI tests (including example below), `-h` and `--help` output at a minimum (recommendation: [trycmd](https://docs.rs/trycmd/) for snapshot testing) 2. *If using Builder API*: Explicitly set the `arg.action(ArgAction::...)` on each argument (`StoreValue` for options and `IncOccurrences` for flags) 3. Run `cargo check --features clap/deprecated` and resolve all deprecation warnings 4. Upgrade to v4 5. Update feature flags - *If `default-features = false`*, run `cargo add clap -F help,usage,error-context` - Run `cargo add clap -F wrap_help` unless you want to hard code line wraps 6. Resolve compiler errors 7. Resolve behavior changes (see "subtle changes" under BREAKING CHANGES) 8. *At your leisure:* resolve new deprecation notices Example test (derive): ```rust #[derive(clap::Parser)] struct Cli { ... } #[test] fn verify_cli() { use clap::CommandFactory; Cli::command().debug_assert() } ``` Example test (builder): ```rust fn cli() -> clap::Command { ... } #[test] fn verify_cli() { cli().debug_assert(); } ``` Note: the idiomatic / recommended way of specifying different types of args in the Builder API has changed: Before ```rust .arg(Arg::new("flag").long("flag")) # --flag .arg(Arg::new("option").long("option").takes_value(true)) # --option <option> ``` After: ```rust .arg(Arg::new("flag").long("flag").action(ArgAction::SetTrue)) # --flag .arg(Arg::new("option").long("option")) # --option <option> ``` In particular, `num_args` (the replacement for `takes_value`) will default appropriately from the `ArgAction` and generally only needs to be set explicitly for the other `num_args` use cases. ##### Breaking Changes Subtle changes (i.e. compiler won't catch): - `arg!` now sets one of ([#&#8203;3795](https://github.com/clap-rs/clap/issues/3795)): - `ArgAction::SetTrue`, requiring `ArgMatches::get_flag` instead of `ArgMatches::is_present` - `ArgAction::Count`, requiring `ArgMatches::get_count` instead of `ArgMatches::occurrences_of` - `ArgAction::Set`, requiring `ArgMatches::get_one` instead of `ArgMatches::value_of` - `ArgAction::Append`, requiring `ArgMatches::get_many` instead of `ArgMatches::values_of` - `ArgAction::Set`, `ArgAction::SetTrue`, and `Arg::Action::SetFalse` now conflict by default to be like `ArgAction::StoreValue` and `ArgAction::IncOccurrences`, requiring `cmd.args_override_self(true)` to override instead ([#&#8203;4261](https://github.com/clap-rs/clap/issues/4261)) - By default, an `Arg`s default action is `ArgAction::Set`, rather than `ArgAction::IncOccurrence` to reduce confusing magic through consistency ([#&#8203;2687](https://github.com/clap-rs/clap/issues/2687), [#&#8203;4032](https://github.com/clap-rs/clap/issues/4032), see also [#&#8203;3977](https://github.com/clap-rs/clap/issues/3977)) - `mut_arg` can no longer be used to customize help and version arguments, instead disable them (`Command::disable_help_flag`, `Command::disable_version_flag`) and provide your own ([#&#8203;4056](https://github.com/clap-rs/clap/issues/4056)) - Removed lifetimes from `Command`, `Arg`, `ArgGroup`, and `PossibleValue`, assuming `'static`. `string` feature flag will enable support for `String`s ([#&#8203;1041](https://github.com/clap-rs/clap/issues/1041), [#&#8203;2150](https://github.com/clap-rs/clap/issues/2150), [#&#8203;4223](https://github.com/clap-rs/clap/issues/4223)) - `arg!(--flag <value>)` is now optional, instead of required. Add `.required(true)` at the end to restore the original behavior ([#&#8203;4206](https://github.com/clap-rs/clap/issues/4206)) - Added default feature flags, `help`, `usage` and `error-context`, requiring adding them back in if `default-features = false` ([#&#8203;4236](https://github.com/clap-rs/clap/issues/4236)) - *(parser)* Always fill in `""` argument for external subcommands to make it easier to distinguish them from built-in commands ([#&#8203;3263](https://github.com/clap-rs/clap/issues/3263)) - *(parser)* Short flags now have higher precedence than hyphen values with `Arg::allow_hyphen_values`, to be consistent with `Command::allow_hyphen_values` ([#&#8203;4187](https://github.com/clap-rs/clap/issues/4187)) - *(parser)* `Arg::value_terminator` must be its own argument on the CLI rather than being in a delimited list ([#&#8203;4025](https://github.com/clap-rs/clap/issues/4025)) - *(help)* Line wrapping of help is now behind the existing `wrap_help` feature flag, either enable it or hard code your wraps ([#&#8203;4258](https://github.com/clap-rs/clap/issues/4258)) - *(help)* Make `DeriveDisplayOrder` the default and removed the setting. To sort help, set `next_display_order(None)` ([#&#8203;2808](https://github.com/clap-rs/clap/issues/2808)) - *(help)* Subcommand display order respects `Command::next_display_order` instead of `DeriveDisplayOrder` and using its own initial display order value ([#&#8203;2808](https://github.com/clap-rs/clap/issues/2808)) - *(help)* Subcommands are now listed before arguments. To get the old behavior, see `Command::help_template` ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132)) - *(help)* Help headings are now title cased, making any user-provided help headings inconsistent. To get the old behavior, see `Command::help_template`, `Arg::help_heading`, and `Command::subcommand_help_heading` ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132)) - *(help)* "Command" is used as the section heading for subcommands and `COMMAND` for the value name. To get the old behavior, see `Command::subcommand_help_heading` and `Arg::subcommand_value_name` ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4155](https://github.com/clap-rs/clap/issues/4155)) - *(help)* Whitespace in help output is now trimmed to ensure consistency regardless of how well a template matches the users needs. ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4156](https://github.com/clap-rs/clap/issues/4156)) - *(help)* name/version/author are removed by default from help output. To get the old behavior, see `Command::help_template`. ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4160](https://github.com/clap-rs/clap/issues/4160)) - *(help)* Indentation for second-line usage changed. ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4188](https://github.com/clap-rs/clap/issues/4188)) - *(env)* Parse `--help` and `--version` like any `ArgAction::SetTrue` flag ([#&#8203;3776](https://github.com/clap-rs/clap/issues/3776)) - *(derive)* Leave `Arg::id` as `verbatim` casing, requiring updating of string references to other args like in `conflicts_with` or `requires` ([#&#8203;3282](https://github.com/clap-rs/clap/issues/3282)) - *(derive)* Doc comments for `ValueEnum` variants will now show up in `--help` ([#&#8203;3312](https://github.com/clap-rs/clap/issues/3312)) - *(derive)* When deriving `Args`, and `ArgGroup` is created using the type's name, reserving it for future use ([#&#8203;2621](https://github.com/clap-rs/clap/issues/2621), [#&#8203;4209](https://github.com/clap-rs/clap/issues/4209)) - *(derive)* `next_help_heading` can now leak out of a `#[clap(flatten)]`, like all other command settings ([#&#8203;4222](https://github.com/clap-rs/clap/issues/4222)) Easier to catch changes: - Looking up a group in `ArgMatches` now returns the arg `Id`s, rather than the values to reduce overhead and offer more flexibility. ([#&#8203;4072](https://github.com/clap-rs/clap/issues/4072)) - Changed `Arg::number_of_values` (average-across-occurrences) to `Arg::num_args` (per-occurrence) (raw CLI args, not parsed values) ([#&#8203;2688](https://github.com/clap-rs/clap/issues/2688), [#&#8203;4023](https://github.com/clap-rs/clap/issues/4023)) - `num_args(0)` no longer implies `takes_value(true).multiple_values(true)` ([#&#8203;4023](https://github.com/clap-rs/clap/issues/4023)) - `num_args(1)` no longer implies `multiple_values(true)` ([#&#8203;4023](https://github.com/clap-rs/clap/issues/4023)) - Does not check default or env values, only what the user explicitly passes in ([#&#8203;4025](https://github.com/clap-rs/clap/issues/4025)) - No longer terminates on delimited values ([#&#8203;4025](https://github.com/clap-rs/clap/issues/4025)) - Replace `Arg::min_values` (across all occurrences) with `Arg::num_args(N..)` (per occurrence) to reduce confusion over different value count APIs ([#&#8203;4023](https://github.com/clap-rs/clap/issues/4023)) - Replace `Arg::max_values` (across all occurrences) with `Arg::num_args(1..=M)` (per occurrence) to reduce confusion over different value count APIs ([#&#8203;4023](https://github.com/clap-rs/clap/issues/4023)) - Replace `Arg::multiple_values(true)` with `Arg::num_args(1..)` and `Arg::multiple_values(false)` with `Arg::num_args(0)` to reduce confusion over different value count APIs ([#&#8203;4023](https://github.com/clap-rs/clap/issues/4023)) - Replace `Arg::takes_value(true)` with `Arg::num_args(1)` and `Arg::takes_value(false)` with `Arg::num_args(0)` to reduce confusion over different value count APIs - Remove `Arg::require_value_delimiter`, either users could use `Arg::value_delimiter` or implement a custom parser with `TypedValueParser` as it was mostly to make `multiple_values(true)` act like `multiple_values(false)` and isn't needed anymore ([#&#8203;4026](https://github.com/clap-rs/clap/issues/4026)) - `Arg::new("help")` and `Arg::new("version")` no longer implicitly disable the built-in flags and be copied to all subcommands, instead disable the built-in flags (`Command::disable_help_flag`, `Command::disable_version_flag`) and mark the custom flags as `global(true)`. ([#&#8203;4056](https://github.com/clap-rs/clap/issues/4056)) - `Arg::short('h')` no longer implicitly disables the short flag for help, instead disable the built-in flags (`Command::disable_help_flag`, `Command::disable_version_flag`) provide your own `Arg::new("help").long("help").action(ArgAction::Help).global(true)`. ([#&#8203;4056](https://github.com/clap-rs/clap/issues/4056)) - `ArgAction::SetTrue` and `ArgAction::SetFalse` now prioritize `Arg::default_missing_value` over their standard behavior ([#&#8203;4000](https://github.com/clap-rs/clap/issues/4000)) - Changed `Arg::requires_ifs` and `Arg::default_value*_ifs*` to taking an `ArgPredicate`, removing ambiguity with `None` when accepting owned and borrowed types ([#&#8203;4084](https://github.com/clap-rs/clap/issues/4084)) - Removed `PartialEq` and `Eq` from `Command` so we could change external subcommands to use a `ValueParser` ([#&#8203;3990](https://github.com/clap-rs/clap/issues/3990)) - Various `Arg`, `Command`, and `ArgGroup` calls were switched from accepting `&[]` to `[]` via `IntoIterator` to be more flexible ([#&#8203;4072](https://github.com/clap-rs/clap/issues/4072)) - `Arg::short_aliases` and other builder functions that took `&[]` need the `&` dropped ([#&#8203;4081](https://github.com/clap-rs/clap/issues/4081)) - `ErrorKind` and `Result` moved into the `error` module - `ErrorKind::EmptyValue` replaced with `ErrorKind::InvalidValue` to remove an unnecessary special case ([#&#8203;3676](https://github.com/clap-rs/clap/issues/3676), [#&#8203;3968](https://github.com/clap-rs/clap/issues/3968)) - `ErrorKind::UnrecognizedSubcommand` replaced with `ErrorKind::InvalidSubcommand` to remove an unnecessary special case ([#&#8203;3676](https://github.com/clap-rs/clap/issues/3676)) - Changed the default type of `allow_external_subcommands` from `String` to `OsString` as that is less likely to cause bugs in user applications ([#&#8203;3990](https://github.com/clap-rs/clap/issues/3990)) - *(help)* `Command::render_usage` now returns a `StyledStr` ([#&#8203;4248](https://github.com/clap-rs/clap/issues/4248)) - *(derive)* Changed the default for arguments from `parse` to `value_parser`, removing `parse` support ([#&#8203;3827](https://github.com/clap-rs/clap/issues/3827), [#&#8203;3981](https://github.com/clap-rs/clap/issues/3981)) - `#[clap(value_parser)]` and `#[clap(action)]` are now redundant - *(derive)* `subcommand_required(true).arg_required_else_help(true)` is set instead of `SubcommandRequiredElseHelp` to give more meaningful errors when subcommands are missing and to reduce redundancy ([#&#8203;3280](https://github.com/clap-rs/clap/issues/3280)) - *(derive)* Remove `arg_enum` attribute in favor of `value_enum` to match the new name (we didn't have support in v3 to mark it deprecated) ([#&#8203;4127](https://github.com/clap-rs/clap/issues/4127)) - *(parser)* Assert when the CLI looksup an unknown args when external subcommand support is enabled to help catch bugs ([#&#8203;3703](https://github.com/clap-rs/clap/issues/3703)) - *(assert)* Sometimes `Arg::default_missing_value` didn't require `num_args(0..=N)`, now it does ([#&#8203;4023](https://github.com/clap-rs/clap/issues/4023)) - *(assert)* Leading dashes in `Arg::long` are no longer allowed ([#&#8203;3691](https://github.com/clap-rs/clap/issues/3691)) - *(assert)* Disallow more `value_names` than `num_args` ([#&#8203;2695](https://github.com/clap-rs/clap/issues/2695)) - *(assert)* Always enforce that version is specified when the `ArgAction::Version` is used - *(assert)* Add missing `#[track_caller]`s to make it easier to debug asserts - *(assert)* Ensure `overrides_with` IDs are valid - *(assert)* Ensure no self-`overrides_with` now that Actions replace it - *(assert)* Ensure subcommand names are not duplicated - *(assert)* Assert on `mut_arg` receiving an invalid arg ID or `mut_subcommand` receiving an invalid command name ##### Compatibility MSRV is now 1.60.0 Deprecated - `Arg::use_value_delimiter` in favor of `Arg::value_delimiter` to avoid having multiple ways of doing the same thing - `Arg::requires_all` in favor of `Arg::requires_ifs` now that it takes an `ArgPredicate` to avoid having multiple ways of doing the same thing - `Arg::number_of_values` in favor of `Arg::num_args` to clarify semantic differences - `default_value_os`, `default_values_os`, `default_value_if_os`, and `default_value_ifs_os` as the non `_os` variants now accept either a `str` or an `OsStr` ([#&#8203;4141](https://github.com/clap-rs/clap/issues/4141)) - `Arg::env_os` in favor of `Arg::env` - `Command::dont_collapse_args_in_usage` is now the default ([#&#8203;4151](https://github.com/clap-rs/clap/issues/4151)) - `Command::trailing_var_arg` in favor of `Arg::trailing_var_arg` to make it clearer which arg it is meant to apply to ([#&#8203;4187](https://github.com/clap-rs/clap/issues/4187)) - `Command::allow_hyphen_values` in favor of `Arg::allow_hyphen_values` to make it clearer which arg it is meant to apply to ([#&#8203;4187](https://github.com/clap-rs/clap/issues/4187)) - `Command::allow_negative_numbers` in favor of `Arg::allow_negative_numbers` to make it clearer which arg it is meant to apply to ([#&#8203;4187](https://github.com/clap-rs/clap/issues/4187)) - *(help)* Deprecated `Command::write_help` and `Command::write_long_help` in favor of `Command::render_help` and `Command::render_long_help` ([#&#8203;4248](https://github.com/clap-rs/clap/issues/4248)) - *(derive)* `structopt` and `clap` attributes in favor of the more specific `command`, `arg`, and `value` to open the door for [more features](https://github.com/clap-rs/clap/issues/1807) and [clarify relationship to the builder](https://github.com/clap-rs/clap/discussions/4090) ([#&#8203;1807](https://github.com/clap-rs/clap/issues/1807), [#&#8203;4180](https://github.com/clap-rs/clap/issues/4180)) - *(derive)* `#[clap(value_parser)]` and `#[clap(action)]` defaulted attributes (its the default) ([#&#8203;3976](https://github.com/clap-rs/clap/issues/3976)) Behavior Changes - *(help)* With `wrap_help` feature, if the terminal size cannot be determined, `LINES` and `COLUMNS` variables are used ([#&#8203;4186](https://github.com/clap-rs/clap/issues/4186)) ##### Features - `Arg::num_args` now accepts ranges, allowing setting both the minimum and maximum number of values per occurrence ([#&#8203;2688](https://github.com/clap-rs/clap/issues/2688), [#&#8203;4023](https://github.com/clap-rs/clap/issues/4023)) - Allow non-bool `value_parser`s for `ArgAction::SetTrue` / `ArgAction::SetFalse` ([#&#8203;4092](https://github.com/clap-rs/clap/issues/4092)) - Add `From<&OsStr>`, `From<OsString>`, `From<&str>`, and `From<String>` to `value_parser!` ([#&#8203;4257](https://github.com/clap-rs/clap/issues/4257)) - Allow resetting most builder methods - Can now pass runtime generated data to `Command`, `Arg`, `ArgGroup`, `PossibleValue`, etc without managing lifetimes with the `string` feature flag ([#&#8203;2150](https://github.com/clap-rs/clap/issues/2150), [#&#8203;4223](https://github.com/clap-rs/clap/issues/4223)) - New default `error-context`, `help` and `usage` feature flags that can be turned off for smaller binaries ([#&#8203;4236](https://github.com/clap-rs/clap/issues/4236)) - Added `StyledStr::ansi()` to `Display` with ANSI escape codes ([#&#8203;4248](https://github.com/clap-rs/clap/issues/4248)) - *(error)* `Error::apply` for changing the formatter for dropping binary size ([#&#8203;4111](https://github.com/clap-rs/clap/issues/4111)) - *(error)* `Error::render`for formatting the error into a `StyledStr` - *(help)* Show `PossibleValue::help` in long help (`--help`) ([#&#8203;3312](https://github.com/clap-rs/clap/issues/3312)) - *(help)* New `{tab}` variable for `Command::help_template` ([#&#8203;4161](https://github.com/clap-rs/clap/issues/4161)) - *(help)* `Command::render_help` and `Command::render_long_help` for formatting the error into a `StyledStr` ([#&#8203;3873](https://github.com/clap-rs/clap/issues/3873), [#&#8203;4248](https://github.com/clap-rs/clap/issues/4248)) - *(help)* `Command::render_usage` now returns a `StyledStr` ([#&#8203;4248](https://github.com/clap-rs/clap/issues/4248)) ##### Fixes - Verify `required` is not used with conditional required settings ([#&#8203;3660](https://github.com/clap-rs/clap/issues/3660)) - Replaced `cmd.allow_invalid_for_utf8_external_subcommands` with `cmd.external_subcommand_value_parser` ([#&#8203;3733](https://github.com/clap-rs/clap/issues/3733)) - `Arg::default_missing_value` now applies per occurrence rather than if a value is missing across all occurrences ([#&#8203;3998](https://github.com/clap-rs/clap/issues/3998)) - `arg!(--long [value])` to accept `0..=1` per occurrence rather than across all occurrences, making it safe to use with `ArgAction::Append` ([#&#8203;4001](https://github.com/clap-rs/clap/issues/4001)) - Allow `OsStr`s for `Arg::{required_if_eq,required_if_eq_any,required_if_eq_all}` ([#&#8203;4084](https://github.com/clap-rs/clap/issues/4084)) - *(help)* With `wrap_help` feature, if the terminal size cannot be determined, `LINES` and `COLUMNS` variables are used ([#&#8203;4186](https://github.com/clap-rs/clap/issues/4186)) - *(help)* Use `Command::display_name` in the help title rather than `Command::bin_name` - *(help)* Show when a flag is `ArgAction::Count` by adding an `...` ([#&#8203;4003](https://github.com/clap-rs/clap/issues/4003)) - *(help)* Use a more neutral palette for coloring ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4117](https://github.com/clap-rs/clap/issues/4117)) - *(help)* Don't rely on ALL CAPS for help headers ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4123](https://github.com/clap-rs/clap/issues/4123)) - *(help)* List subcommands first, focusing the emphasis on them ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4125](https://github.com/clap-rs/clap/issues/4125)) - *(help)* Do not include global args in `cmd help help` ([#&#8203;4131](https://github.com/clap-rs/clap/issues/4131)) - *(help)* Use `[positional]` in list when relevant ([#&#8203;4144](https://github.com/clap-rs/clap/issues/4144)) - *(help)* Show all `[positional]` in usage ([#&#8203;4151](https://github.com/clap-rs/clap/issues/4151)) - *(help)* Polish up subcommands by referring to them as commands ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4155](https://github.com/clap-rs/clap/issues/4155)) - *(help)* Trim extra whitespace to avoid artifacts from different uses of templates ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4156](https://github.com/clap-rs/clap/issues/4156)) - *(help)* Hint to the user the difference between `-h` / `--help` when applicable ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4159](https://github.com/clap-rs/clap/issues/4159)) - *(help)* Shorten help by eliding name/version/author ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4160](https://github.com/clap-rs/clap/issues/4160)) - *(help)* When short help is long enough to activate `next_line_help`, don't add blank lines ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4190](https://github.com/clap-rs/clap/issues/4190)) - *(help)* Make help output more dense (reducing horizontal whitespace) ([#&#8203;4132](https://github.com/clap-rs/clap/issues/4132), [#&#8203;4192](https://github.com/clap-rs/clap/issues/4192)) - *(help)* Separate subcommand flags with "," like option flags ([#&#8203;4232](https://github.com/clap-rs/clap/issues/4232), [#&#8203;4235](https://github.com/clap-rs/clap/issues/4235)) - *(help)* Quote the suggested help flag ([#&#8203;4220](https://github.com/clap-rs/clap/issues/4220)) - *(version)* Use `Command::display_name` rather than `Command::bin_name` ([#&#8203;3966](https://github.com/clap-rs/clap/issues/3966)) - *(parser)* Always fill in `""` argument for external subcommands ([#&#8203;3263](https://github.com/clap-rs/clap/issues/3263)) - *(parser)* Short flags now have higher precedence than hyphen values with `Arg::allow_hyphen_values`, like `Command::allow_hyphen_values` ([#&#8203;4187](https://github.com/clap-rs/clap/issues/4187)) - *(parser)* Prefer `InvalidSubcommand` over `UnknownArgument` in more cases ([#&#8203;4219](https://github.com/clap-rs/clap/issues/4219)) - *(derive)* Detect escaped external subcommands that look like built-in subcommands ([#&#8203;3703](https://github.com/clap-rs/clap/issues/3703)) - *(derive)* Leave `Arg::id` as `verbatim` casing ([#&#8203;3282](https://github.com/clap-rs/clap/issues/3282)) - *(derive)* Default to `#[clap(value_parser, action)]` instead of `#[clap(parse)]` ([#&#8203;3827](https://github.com/clap-rs/clap/issues/3827)) ### [`v3.2.23`](https://github.com/clap-rs/clap/releases/tag/v3.2.23) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.22...v3.2.23) ##### \[3.2.23] - 2022-10-24 ##### Fixes - Upgrade to `textwrap` 0.16 ### [`v3.2.22`](https://github.com/clap-rs/clap/releases/tag/v3.2.22) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.21...v3.2.22) ##### \[3.2.22] - 2022-09-16 ##### Fixes - Unify dependencies on `terminal_size` to the 0.2 release ### [`v3.2.21`](https://github.com/clap-rs/clap/releases/tag/v3.2.21) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.20...v3.2.21) ##### \[3.2.21] - 2022-09-12 ##### Features - `TypedValueParser::map` to allow reusing existing value parsers for other purposes ### [`v3.2.20`](https://github.com/clap-rs/clap/releases/tag/v3.2.20) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.19...v3.2.20) ##### \[3.2.20] - 2022-09-02 ##### Features - `ArgMatches::get_count` help for `ArgAction::Count` - `ArgMatches::get_flag` help for `ArgAction::SetTrue` / `ArgAction::SetFalse` ### [`v3.2.19`](https://github.com/clap-rs/clap/releases/tag/v3.2.19) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.18...v3.2.19) ##### \[3.2.19] - 2022-08-30 ##### Fixes - *(help)* Ensure required arguments for parent commands aren't shown in their subcommands when using `args_conflicts_with_subcommand` ### [`v3.2.18`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3218---2022-08-29) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.17...v3.2.18) ##### Fixes - *(help)* `Command::print_help` now respects `Command::colored_help` - *(derive)* Improved error messages ### [`v3.2.17`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3217---2022-08-12) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.16...v3.2.17) ##### Fixes - *(derive)* Expose `#[clap(id = ...)]` attribute to match Arg's latest API ### [`v3.2.16`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3216---2022-07-30) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.15...v3.2.16) ##### Fixes - Ensure required arguments appear in errors when they are also members of a group ([#&#8203;4004](https://github.com/clap-rs/clap/issues/4004)) ### [`v3.2.15`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3215---2022-07-25) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.14...v3.2.15) ##### Features - *(derive)* New `default_values_t` and `default_values_os_t` attributes ### [`v3.2.14`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3214---2022-07-21) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.13...v3.2.14) ##### Fixes - A `multiple_values` positional followed by another positional now works with multiple flags ### [`v3.2.13`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3213---2022-07-19) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.12...v3.2.13) ##### Documentation - Pulled in tutorials, cookbook, and derive reference into rustdoc ### [`v3.2.12`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3212---2022-07-14) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.11...v3.2.12) ##### Fixes - Allow an arg to declare a conflict with a group ### [`v3.2.11`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3211---2022-07-13) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.10...v3.2.11) ##### Features - Added `Arg::get_all_short_aliaes` and `Arg::get_all_aliases` ### [`v3.2.10`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3210---2022-07-12) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.8...v3.2.10) ##### Fixes - Loosen lifetime on `Command::mut_subcommand` ### [`v3.2.8`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;328---2022-06-30) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.7...v3.2.8) ##### Features - Added `Command::mut_subcommand` to mirror `Command::mut_arg` ### [`v3.2.7`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;327---2022-06-28) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.6...v3.2.7) ##### Fixes - Global arguments should override env-sourced arguments ### [`v3.2.6`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;326---2022-06-21) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.5...v3.2.6) ##### Fixes - Don't panic when parsing `--=` ### [`v3.2.5`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;325---2022-06-15) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.4...v3.2.5) ##### Fixes - *(derive)* Fix regression with `#[clap(default_value_os_t ...)]` introduced in v3.2.3 ### [`v3.2.4`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;324---2022-06-14) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.3...v3.2.4) ##### Fixes - *(derive)* Provide more clearer deprecation messages for `#[clap(parse)]` attribute ([#&#8203;3832](https://github.com/clap-rs/clap/issues/3832)) ### [`v3.2.3`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;323---2022-06-14) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.2...v3.2.3) ##### Fixes - Moved deprecations to be behind the `deprecated` Cargo.toml feature ([#&#8203;3830](https://github.com/clap-rs/clap/issues/3830)) - For now, it is disabled by default though we are considering enabling it by default as we release the next major version to help draw attention to the deprecation migration path ### [`v3.2.2`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;322---2022-06-14) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.1...v3.2.2) ##### Fixes - *(derive)* Improve the highlighted code for deprecation warnings **gated behind `unstable-v4`** - *(derive)* Default to `#[clap(value_parser, action)]` instead of `#[clap(parse)]` ([#&#8203;3827](https://github.com/clap-rs/clap/issues/3827)) ### [`v3.2.1`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3218---2022-08-29) [Compare Source](https://github.com/clap-rs/clap/compare/v3.2.0...v3.2.1) ##### Fixes - *(help)* `Command::print_help` now respects `Command::colored_help` - *(derive)* Improved error messages ### [`v3.2.0`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;320---2022-06-13) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.18...v3.2.0) ##### Compatibility MSRV is now 1.56.0 ([#&#8203;3732](https://github.com/clap-rs/clap/issues/3732)) Behavior - Defaults no longer satisfy `required` and its variants ([#&#8203;3793](https://github.com/clap-rs/clap/issues/3793)) - When misusing `ArgMatches::value_of` and friends, debug asserts were turned into panics Moving (old location deprecated) - `clap::{PossibleValue, ValueHint}` to `clap::builder::{PossibleValue, ValueHint}` - `clap::{Indices, OsValues, ValueSource, Values}` to `clap::parser::{Indices, OsValues, ValueSource, Values}` - `clap::ArgEnum` to `clap::ValueEnum` ([#&#8203;3799](https://github.com/clap-rs/clap/issues/3799)) Replaced - `Arg::allow_invalid_utf8` with `Arg::value_parser(value_parser!(PathBuf))` ([#&#8203;3753](https://github.com/clap-rs/clap/issues/3753)) - `Arg::validator` / `Arg::validator_os` with `Arg::value_parser` ([#&#8203;3753](https://github.com/clap-rs/clap/issues/3753)) - `Arg::validator_regex` with users providing their own `builder::TypedValueParser` ([#&#8203;3756](https://github.com/clap-rs/clap/issues/3756)) - `Arg::forbid_empty_values` with `builder::NonEmptyStringValueParser` / `builder::PathBufValueParser` ([#&#8203;3753](https://github.com/clap-rs/clap/issues/3753)) - `Arg::possible_values` with `Arg::value_parser([...])`, `builder::PossibleValuesParser`, or `builder::EnumValueParser` ([#&#8203;3753](https://github.com/clap-rs/clap/issues/3753)) - `Arg::max_occurrences` with `arg.action(ArgAction::Count).value_parser(value_parser!(u8).range(..N))` for flags ([#&#8203;3797](https://github.com/clap-rs/clap/issues/3797)) - `Arg::multiple_occurrences` with `ArgAction::Append` or `ArgAction::Count` though positionals will need `Arg::multiple_values` ([#&#8203;3772](https://github.com/clap-rs/clap/issues/3772), [#&#8203;3797](https://github.com/clap-rs/clap/issues/3797)) - `Command::args_override_self` with `ArgAction::Set` ([#&#8203;2627](https://github.com/clap-rs/clap/issues/2627), [#&#8203;3797](https://github.com/clap-rs/clap/issues/3797)) - `AppSettings::NoAutoVersion` with `ArgAction` or `Command::disable_version_flag` ([#&#8203;3800](https://github.com/clap-rs/clap/issues/3800)) - `AppSettings::NoHelpVersion` with `ArgAction` or `Command::disable_help_flag` / `Command::disable_help_subcommand` ([#&#8203;3800](https://github.com/clap-rs/clap/issues/3800)) - `ArgMatches::{value_of, value_of_os, value_of_os_lossy, value_of_t}` with `ArgMatches::{get_one,remove_one}` ([#&#8203;3753](https://github.com/clap-rs/clap/issues/3753)) - `ArgMatches::{values_of, values_of_os, values_of_os_lossy, values_of_t}` with `ArgMatches::{get_many,remove_many}` ([#&#8203;3753](https://github.com/clap-rs/clap/issues/3753)) - `ArgMatches::is_valid_arg` with `ArgMatches::{try_get_one,try_get_many}` ([#&#8203;3753](https://github.com/clap-rs/clap/issues/3753)) - `ArgMatches::occurrences_of` with `ArgMatches::value_source` or `ArgAction::Count` ([#&#8203;3797](https://github.com/clap-rs/clap/issues/3797)) - `ArgMatches::is_present` with `ArgMatches::contains_id` or `ArgAction::SetTrue` ([#&#8203;3797](https://github.com/clap-rs/clap/issues/3797)) - `ArgAction::StoreValue` with `ArgAction::Set` or `ArgAction::Append` ([#&#8203;3797](https://github.com/clap-rs/clap/issues/3797)) - `ArgAction::IncOccurrences` with `ArgAction::SetTrue` or `ArgAction::Count` ([#&#8203;3797](https://github.com/clap-rs/clap/issues/3797)) - *(derive)* `#[clap(parse(...))]` replaced with: ([#&#8203;3589](https://github.com/clap-rs/clap/issues/3589), [#&#8203;3794](https://github.com/clap-rs/clap/issues/3794)) - For default parsers (no `parse` attribute), deprecation warnings can be silenced by opting into the new behavior by adding either `#[clap(action)]` or `#[clap(value_parser)]` (ie requesting the default behavior for these attributes). Alternatively, the `unstable-v4` feature changes the default away from `parse` to `action`/`value_parser`. - For `#[clap(parse(from_flag))]` replaced with `#[clap(action = ArgAction::SetTrue)]` ([#&#8203;3794](https://github.com/clap-rs/clap/issues/3794)) - For `#[clap(parse(from_occurrences))]` replaced with `#[clap(action = ArgAction::Count)]` though the field's type must be `u8` ([#&#8203;3794](https://github.com/clap-rs/clap/issues/3794)) - For `#[clap(parse(from_os_str)]` for `PathBuf`, replace it with `#[clap(value_parser)]` (as mentioned earlier this will call `value_parser!(PathBuf)` which will auto-select the right `ValueParser` automatically). - For `#[clap(parse(try_from_str = ...)]`, replace it with `#[clap(value_parser = ...)]` - For most other cases, a type implementing `TypedValueParser` will be needed and specify it with `#[clap(value_parser = ...)]` ##### Features - Parsed, typed arguments via `Arg::value_parser` / `ArgMatches::{get_one,get_many}` ([#&#8203;2683](https://github.com/clap-rs/clap/issues/2683), [#&#8203;3732](https://github.com/clap-rs/clap/issues/3732)) - Several built-in `TypedValueParser`s available with an API open for expansion - `value_parser!(T)` macro for selecting a parser for a given type ([#&#8203;3732](https://github.com/clap-rs/clap/issues/3732)) and open to expansion via the `ValueParserFactory` trait ([#&#8203;3755](https://github.com/clap-rs/clap/issues/3755)) - `[&str]` is implicitly a value parser for possible values - All `ArgMatches` getters do not assume required arguments ([#&#8203;2505](https://github.com/clap-rs/clap/issues/2505)) - Add `ArgMatches::remove_*` variants to transfer ownership - Add `ArgMatches::try_*` variants to avoid panics for developer errors ([#&#8203;3621](https://github.com/clap-rs/clap/issues/3621)) - Add a `get_raw` to access the underlying `OsStr`s - `PathBuf` value parsers imply `ValueHint::AnyPath` for completions ([#&#8203;3732](https://github.com/clap-rs/clap/issues/3732)) - Explicit control over parsing via `Arg::action` ([#&#8203;3774](https://github.com/clap-rs/clap/issues/3774)) - `ArgAction::StoreValue`: existing `takes_value(true)` behavior - `ArgAction::IncOccurrences`: existing `takes_value(false)` behavior - `ArgAction::Help`: existing `--help` behavior - `ArgAction::Version`: existing `--version` behavior - `ArgAction::Set`: Overwrite existing values (like `Arg::multiple_occurrences` mixed with `Command::args_override_self`) ([#&#8203;3777](https://github.com/clap-rs/clap/issues/3777)) - `ArgAction::Append`: like `Arg::multiple_occurrences` ([#&#8203;3777](https://github.com/clap-rs/clap/issues/3777)) - `ArgAction::SetTrue`: Treat `--flag` as `--flag=true` ([#&#8203;3775](https://github.com/clap-rs/clap/issues/3775)) - Implies `Arg::default_value("false")` ([#&#8203;3786](https://github.com/clap-rs/clap/issues/3786)) - Parses `Arg::env` via `Arg::value_parser` - `ArgAction::SetFalse`: Treat `--flag` as `--flag=false` ([#&#8203;3775](https://github.com/clap-rs/clap/issues/3775)) - Implies `Arg::default_value("true")` ([#&#8203;3786](https://github.com/clap-rs/clap/issues/3786)) - Parses `Arg::env` via `Arg::value_parser` - `ArgAction::Count`: Treat `--flag --flag --flag` as `--flag=1 --flag=2 --flag=3` ([#&#8203;3775](https://github.com/clap-rs/clap/issues/3775)) - Implies `Arg::default_value("0")` ([#&#8203;3786](https://github.com/clap-rs/clap/issues/3786)) - Parses `Arg::env` via `Arg::value_parser` - *(derive)* Opt-in to new `Arg::value_parser` / `Arg::action` with either `#[clap(value_parser)]` ([#&#8203;3589](https://github.com/clap-rs/clap/issues/3589), [#&#8203;3742](https://github.com/clap-rs/clap/issues/3742)) / `#[clap(action)]` attributes ([#&#8203;3794](https://github.com/clap-rs/clap/issues/3794)) - Default `ValueParser` is determined by `value_parser!` ([#&#8203;3199](https://github.com/clap-rs/clap/issues/3199), [#&#8203;3496](https://github.com/clap-rs/clap/issues/3496)) - Default `ArgAction` is determine by a hard-coded lookup on the type ([#&#8203;3794](https://github.com/clap-rs/clap/issues/3794)) - `Command::multicall` is now stable for busybox-like programs and REPLs ([#&#8203;2861](https://github.com/clap-rs/clap/issues/2861), [#&#8203;3684](https://github.com/clap-rs/clap/issues/3684)) - `ArgMatches::{try_,}contains_id` for checking if there are values for an argument that mirrors the new `get_{one,many}` API ##### Fixes - Don't correct argument id in `default_value_ifs_os`([#&#8203;3815](https://github.com/clap-rs/clap/issues/3815)) *parser* - Set `ArgMatches::value_source` and `ArgMatches::occurrences_of` for external subcommands ([#&#8203;3732](https://github.com/clap-rs/clap/issues/3732)) - Use value delimiter for `Arg::default_missing_values` ([#&#8203;3761](https://github.com/clap-rs/clap/issues/3761), [#&#8203;3765](https://github.com/clap-rs/clap/issues/3765)) - Split`Arg::default_value` / `Arg::env` on value delimiters independent of whether `--` was used ([#&#8203;3765](https://github.com/clap-rs/clap/issues/3765)) - Allow applying defaults to flags ([#&#8203;3294](https://github.com/clap-rs/clap/issues/3294), 3775) - Defaults no longer satisfy `required` and its variants ([#&#8203;3793](https://github.com/clap-rs/clap/issues/3793)) ### [`v3.1.18`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3118---2022-05-10) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.17...v3.1.18) ##### Fixes - Fix deprecated `arg_enum!` for users migrating to clap3 ([#&#8203;3717](https://github.com/clap-rs/clap/issues/3717)) - Verify all `required_unless_present_all` arguments exist - Verify group members exist before processing group members ([#&#8203;3711](https://github.com/clap-rs/clap/issues/3711)) - *(help)* Use `...` when not enough `value_names` are supplied **gated behind `unstable-v4`** - Verify `required` is not used with conditional required settings ([#&#8203;3660](https://github.com/clap-rs/clap/issues/3660)) - Disallow more `value_names` than `number_of_values` ([#&#8203;2695](https://github.com/clap-rs/clap/issues/2695)) - *(parser)* Assert on unknown args when using external subcommands ([#&#8203;3703](https://github.com/clap-rs/clap/issues/3703)) - *(parser)* Always fill in `""` argument for external subcommands ([#&#8203;3263](https://github.com/clap-rs/clap/issues/3263)) - *(derive)* Detect escaped external subcommands that look like built-in subcommands ([#&#8203;3703](https://github.com/clap-rs/clap/issues/3703)) - *(derive)* Leave `Arg::id` as `verbatim` casing ([#&#8203;3282](https://github.com/clap-rs/clap/issues/3282)) ### [`v3.1.17`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3117---2022-05-06) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.16...v3.1.17) ##### Fixes - Allow value names for `arg!` macro to have dashes when quoted, like longs ### [`v3.1.16`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3116---2022-05-06) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.15...v3.1.16) ##### Fixes - *(parser)* `Arg::exclusive` overrides `Arg::required`, like other conflicts - *(error)* Don't duplicate arguments in usage - *(error)* Don't show hidden arguments in conflict error usage - *(help)* New `help_template` variable `{name}` to fix problems with `{bin}` - *(help)* Don't wrap URLs **gated behind `unstable-v4`** - Leading dashes in `Arg::long` are no longer allowed - *(help)* Use `Command::display_name` in the help title rather than `Command::bin_name` ### [`v3.1.15`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3115---2022-05-02) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.14...v3.1.15) ##### Fixes - *(error)* Render actual usage for unrecognized subcommands - *(multicall)* Improve bad command error - *(multicall)* Always require a multicall command - *(multicall)* Disallow arguments on multicall parent command - *(multicall)* More consistent with rest of clap errors ### [`v3.1.14`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3114---2022-05-01) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.13...v3.1.14) ##### Fixes - Panic when calling `Command::build` with a required positional argument nested several layers in subcommands ### [`v3.1.13`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3113---2022-04-30) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.12...v3.1.13) ##### Fixes - Help subcommand and `Command::write_help` now report required arguments in usage in more circumstances - Unknown subcommand for help subcommand flag now reports an error with more context - More details reported when using `debug` feature - Allow disabling `color` feature with `debug` feature enabled ### [`v3.1.12`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3112---2022-04-22) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.11...v3.1.12) ##### Fixes - Regression in 3.1.11 where the (output) streams were crossed ### [`v3.1.11`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3111---2022-04-22) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.10...v3.1.11) ##### Fixes - Implied conflicts override `Arg::required`, making the behavior consistent with how we calculate conflicts for error reporting - Members of a mutually exclusive `ArgGroup` override `Arg::required`, making the behavior consistent with how we calculate conflicts for error reporting - `Arg::overrides_with` always override `Arg::required`, not just when the parser processes an override ### [`v3.1.10`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3110---2022-04-19) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.9...v3.1.10) ##### Features - Expose `Command::build` for custom help generation or other command introspection needs ### [`v3.1.9`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;319---2022-04-15) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.8...v3.1.9) ##### Fixes - Pin the `clap_derive` version so a compatible version is always used with `clap` ### [`v3.1.8`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;318---2022-04-01) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.7...v3.1.8) ##### Fixes - Add `Debug` impls to more types ### [`v3.1.7`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;317---2022-03-31) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.6...v3.1.7) ##### Fixes - *(derive)* Abort, rather than ignore, when deriving `ArgEnum` with non-unit unskipped variants ### [`v3.1.6`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;316---2022-03-07) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.5...v3.1.6) ##### Fixes - Don't panic when validating delimited defaults ([#&#8203;3541](https://github.com/clap-rs/clap/issues/3541)) - Make it clearer that `cargo` feature is needed - Documentation improvements ### [`v3.1.5`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;315---2022-03-02) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.4...v3.1.5) ##### Fixes - Dependency upgrade ### [`v3.1.4`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;314---2022-03-02) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.3...v3.1.4) ##### Features - *(help)* Show `PossibleValue::help` in long help (`--help`) **(gated behind `unstable-v4`)** ([#&#8203;3312](https://github.com/clap-rs/clap/issues/3312)) ### [`v3.1.3`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;313---2022-02-28) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.2...v3.1.3) ##### Fixes - Don't panic when validating delimited defaults ([#&#8203;3514](https://github.com/clap-rs/clap/issues/3514)) ### [`v3.1.2`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;312---2022-02-23) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.1...v3.1.2) ##### Fixes - *(derive)* Allow other attribute with a subcommand that has subcommands ##### Documentation - *(examples)* List example topics - *(derive)* Clarify syntax and relation to builder API ### [`v3.1.1`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3118---2022-05-10) [Compare Source](https://github.com/clap-rs/clap/compare/v3.1.0...v3.1.1) ##### Fixes - Fix deprecated `arg_enum!` for users migrating to clap3 ([#&#8203;3717](https://github.com/clap-rs/clap/issues/3717)) - Verify all `required_unless_present_all` arguments exist - Verify group members exist before processing group members ([#&#8203;3711](https://github.com/clap-rs/clap/issues/3711)) - *(help)* Use `...` when not enough `value_names` are supplied **gated behind `unstable-v4`** - Verify `required` is not used with conditional required settings ([#&#8203;3660](https://github.com/clap-rs/clap/issues/3660)) - Disallow more `value_names` than `number_of_values` ([#&#8203;2695](https://github.com/clap-rs/clap/issues/2695)) - *(parser)* Assert on unknown args when using external subcommands ([#&#8203;3703](https://github.com/clap-rs/clap/issues/3703)) - *(parser)* Always fill in `""` argument for external subcommands ([#&#8203;3263](https://github.com/clap-rs/clap/issues/3263)) - *(derive)* Detect escaped external subcommands that look like built-in subcommands ([#&#8203;3703](https://github.com/clap-rs/clap/issues/3703)) - *(derive)* Leave `Arg::id` as `verbatim` casing ([#&#8203;3282](https://github.com/clap-rs/clap/issues/3282)) ### [`v3.1.0`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;310---2022-02-16) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.14...v3.1.0) ##### Compatibility Changes in behavior of note that are not guaranteed to be compatible across releases: - *(help)* `help` subcommand shows long help like `--help`, rather than short help (`-h`), deprecated `clap::AppSettings::UseLongFormatForHelpSubcommand` ([#&#8203;3440](https://github.com/clap-rs/clap/issues/3440)) - *(help)* Pacman-style subcommands are now ordered the same as usage errors ([#&#8203;3470](https://github.com/clap-rs/clap/issues/3470)) - *(help)* Pacman-style subcommands use standard alternate syntax in usage ([#&#8203;3470](https://github.com/clap-rs/clap/issues/3470)) ##### Deprecations - `clap::Command` is now preferred over `clap::App` ([#&#8203;3089](https://github.com/clap-rs/clap/issues/3089) in [#&#8203;3472](https://github.com/clap-rs/clap/issues/3472)) - `clap::command!` is now preferred over `clap::app_from_crate` ([#&#8203;3089](https://github.com/clap-rs/clap/issues/3089) in [#&#8203;3474](https://github.com/clap-rs/clap/issues/3474)) - `clap::CommandFactory::command` is now preferred over `clap::IntoApp::into_app` ([#&#8203;3089](https://github.com/clap-rs/clap/issues/3089) in [#&#8203;3473](https://github.com/clap-rs/clap/issues/3473)) - *(help)* `help` subcommand shows long help like `--help`, rather than short help (`-h`), deprecated `clap::AppSettings::UseLongFormatForHelpSubcommand` ([#&#8203;3440](https://github.com/clap-rs/clap/issues/3440)) - *(error)* Deprecate `clap::AppSettings::WaitOnError`, leaving it to the user to implement - *(validation)* `clap::Command::subcommand_required(true).arg_required_else_help(true)` is now preferred over `clap::AppSettings::SubcommandRequiredElseHelp` ([#&#8203;3280](https://github.com/clap-rs/clap/issues/3280)) - *(builder)* `clap::AppSettings` are nearly all deprecated and replaced with builder methods and getters ([#&#8203;2717](https://github.com/clap-rs/clap/issues/2717)) - *(builder)* `clap::ArgSettings` is deprecated and replaced with builder methods and getters ([#&#8203;2717](https://github.com/clap-rs/clap/issues/2717)) - *(builder)* `clap::Arg::id` and `clap::ArgGroup::id` are now preferred over `clap::Arg::name` and `clap::ArgGroup::name` ([#&#8203;3335](https://github.com/clap-rs/clap/issues/3335)) - *(help)* `clap::Command::next_help_heading` is now preferred over `clap::Command::help_heading` ([#&#8203;1807](https://github.com/clap-rs/clap/issues/1807), [#&#8203;1553](https://github.com/clap-rs/clap/issues/1553)) - *(error)* `clap::error::ErrorKind` is now preferred over `clap::ErrorKind` ([#&#8203;3395](https://github.com/clap-rs/clap/issues/3395)) - *(error)* `clap::Error::kind()` is now preferred over `clap::Error::kind` - *(error)* `clap::Error::context()` is now preferred over `clap::Error::info` ([#&#8203;2628](https://github.com/clap-rs/clap/issues/2628)) Note: All items deprecated in 3.0.0 are now hidden in the documentation. ([#&#8203;3458](https://github.com/clap-rs/clap/issues/3458)) ##### Features - *(matches)* Add `clap::ArgMatches::value_source` to determine what insert the value ([#&#8203;1345](https://github.com/clap-rs/clap/issues/1345)) - *(help)* Override derived display order with `clap::Command::next_display_order` ([#&#8203;1807](https://github.com/clap-rs/clap/issues/1807)) - *(error)* Show possible values when an argument doesn't have a value ([#&#8203;3320](https://github.com/clap-rs/clap/issues/3320)) - *(error)* New `clap::Error::context` API to open the door for fully-custom error messages ([#&#8203;2628](https://github.com/clap-rs/clap/issues/2628)) - *(error)* `clap::error::ErrorKind` now implements `Display` ##### Fixes - *(builder)* Some functions were renamed for consistency and fixing spelling issues - *(builder)* Allow `clap::Command::color` to override previous calls ([#&#8203;3449](https://github.com/clap-rs/clap/issues/3449)) - *(parse)* Propagate globals with multiple subcommands ([#&#8203;3428](https://github.com/clap-rs/clap/issues/3428)) - *(validation)* Give `ArgRequiredElseHelp` precedence over `SubcommandRequired` ([#&#8203;3456](https://github.com/clap-rs/clap/issues/3456)) - *(validation)* Default values no longer count as "present" for conflicts, requires, `clap::Command::arg_required_else_help`, etc ([#&#8203;3076](https://github.com/clap-rs/clap/issues/3076), [#&#8203;1264](https://github.com/clap-rs/clap/issues/1264)) - *(assert)* Report invalid defaults ([#&#8203;3202](https://github.com/clap-rs/clap/issues/3202)) - *(help)* Clarify how to handle `-h` conflicts ([#&#8203;3403](https://github.com/clap-rs/clap/issues/3403)) - *(help)* Make it easier to debug the addition of help flags ([#&#8203;3425](https://github.com/clap-rs/clap/issues/3425)) - *(help)* Pacman-style subcommands are now separated with spaces ([#&#8203;3470](https://github.com/clap-rs/clap/issues/3470)) - *(help)* Pacman-style subcommands are now ordered the same as usage errors ([#&#8203;3470](https://github.com/clap-rs/clap/issues/3470)) - *(help)* Pacman-style subcommands use standard alternate syntax in usage ([#&#8203;3470](https://github.com/clap-rs/clap/issues/3470)) - *(error)* Be consistent in showing of required attributes between errors / usage ([#&#8203;3390](https://github.com/clap-rs/clap/issues/3390)) - *(error)* Show user's order of possible values, like in `--help` ([#&#8203;1549](https://github.com/clap-rs/clap/issues/1549)) - *(error)* Allow customizing error type in `clap::error::Result` ([#&#8203;3395](https://github.com/clap-rs/clap/issues/3395)) ##### Performance - *(error)* Reduced stack size of `clap::Error` ([#&#8203;3395](https://github.com/clap-rs/clap/issues/3395)) ##### Documentation - *(builder)* Correct data take accepted for `clap::Arg::validator` - *(derive)* Clarify `parse` attribute - *(tutorial)* Demonstrate custom parsing - *(example)* Consistently list out required feature flags ([#&#8203;3448](https://github.com/clap-rs/clap/issues/3448)) ### [`v3.0.14`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3014---2022-02-01) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.13...v3.0.14) ##### Features - Added `ArgMatches::args_present()` to check if any args are present - Added `Error::kind()` as we work to deprecate direct member access for `Error` - Added `App::get_version` - Added `App::get_long_version` - Added `App::get_author` - Added `App::get_subcommand_help_heading` - Added `App::get_subcommand_value_name` - Added `App::get_after_help` - Added `App::get_after_long_help` ##### Performance - Misc binary size reductions ### [`v3.0.13`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3013---2022-01-26) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.12...v3.0.13) ##### Fixes - Show optional flag values wrapped in `[]` ### [`v3.0.12`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3012---2022-01-24) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.11...v3.0.12) ##### Features - *(derive)* Support for `default_value_os_t` ### [`v3.0.11`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3011---2022-01-24) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.10...v3.0.11) ##### Fixes - Ensure conflicts work when they target a group with a default value ### [`v3.0.10`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3010---2022-01-18) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.9...v3.0.10) ##### Fixes - Resolve `panic!` from v3.0.8 when using `global_setting(PropagateVersion)`. ### [`v3.0.9`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;309---2022-01-17) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.8...v3.0.9) ##### Features - Added `App::find_subcommand_mut` ### [`v3.0.8`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;308---2022-01-17) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.7...v3.0.8) ##### Fixes - Respected `DisableColoredHelp` on `cmd help help` - Provide a little more context when completing arguments for `cmd help` - Provide more context for some asserts - Small documentation improvements ### [`v3.0.7`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;307---2022-01-12) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.6...v3.0.7) ##### Fixes - Shift more asserts from parsing to `App` building (ie will now run in `App::debug_assert`) **derive** - Documentation fixes ### [`v3.0.6`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;306---2022-01-10) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.5...v3.0.6) ##### Fixes **derive** - Don't assume user does `use clap::ArgEnum` ([#&#8203;3277](https://github.com/clap-rs/clap/issues/3277)) - Documentation fixes ### [`v3.0.5`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;305---2022-01-05) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.4...v3.0.5) ##### Fixes - Provide hack to workaround [inability to detect external subcommands aliasing when escaped](https://github.com/clap-rs/clap/issues/3263) ([#&#8203;3264](https://github.com/clap-rs/clap/issues/3264)) **docs:** - Cleaned up code blocks in tutorials ([#&#8203;3261](https://github.com/clap-rs/clap/issues/3261)) - Clean up quotes in `ArgMatches` asserts - List correct replacement for deprecated `Parser::from_clap` ([#&#8203;3257](https://github.com/clap-rs/clap/issues/3257)) ### [`v3.0.4`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;304---2022-01-04) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.3...v3.0.4) ##### Features - For very limited cases, like `cargo`, expose `ArgMatches::is_valid_arg` to avoid panicing on undefined arguments ### [`v3.0.3`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;303---2022-01-04) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.2...v3.0.3) ##### Fixes - Specify cause of debug assert failure ### [`v3.0.2`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;302---2022-01-04) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.1...v3.0.2) ##### Fixes - Ignore `Last` when checking hyphen values (see [#&#8203;3249](https://github.com/clap-rs/clap/issues/3249) for details) - Help catch bugs with `#[must_use]` ### [`v3.0.1`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;3014---2022-02-01) [Compare Source](https://github.com/clap-rs/clap/compare/v3.0.0...v3.0.1) ##### Features - Added `ArgMatches::args_present()` to check if any args are present - Added `Error::kind()` as we work to deprecate direct member access for `Error` - Added `App::get_version` - Added `App::get_long_version` - Added `App::get_author` - Added `App::get_subcommand_help_heading` - Added `App::get_subcommand_value_name` - Added `App::get_after_help` - Added `App::get_after_long_help` ##### Performance - Misc binary size reductions </details> <details> <summary>asomers/mockall</summary> ### [`v0.11.3`](https://github.com/asomers/mockall/compare/v0.11.2...v0.11.3) [Compare Source](https://github.com/asomers/mockall/compare/v0.11.2...v0.11.3) ### [`v0.11.2`](https://github.com/asomers/mockall/blob/HEAD/CHANGELOG.md#&#8203;0112---2022-07-24) [Compare Source](https://github.com/asomers/mockall/compare/v0.11.1...v0.11.2) ##### Fixed - Suppress "dead code" warnings when automocking a struct's private method. It might be used only by other public methods in the same struct. ([#&#8203;397](https://github.com/asomers/mockall/pull/397)) - Fixed using Mockall when a function named `Ok` is in scope. The `anyhow` crate, for example, creates a function by this name. ([#&#8203;389](https://github.com/asomers/mockall/pull/389)) </details> <details> <summary>serde-rs/serde</summary> ### [`v1.0.147`](https://github.com/serde-rs/serde/releases/tag/v1.0.147) [Compare Source](https://github.com/serde-rs/serde/compare/v1.0.146...v1.0.147) - Add `serde::de::value::EnumAccessDeserializer` which transforms an `EnumAccess` into a `Deserializer` ([#&#8203;2305](https://github.com/serde-rs/serde/issues/2305)) ### [`v1.0.146`](https://github.com/serde-rs/serde/releases/tag/v1.0.146) [Compare Source](https://github.com/serde-rs/serde/compare/v1.0.145...v1.0.146) - Allow internally tagged newtype variant to contain unit ([#&#8203;2303](https://github.com/serde-rs/serde/issues/2303), thanks [@&#8203;tage64](https://github.com/tage64)) ### [`v1.0.145`](https://github.com/serde-rs/serde/releases/tag/v1.0.145) [Compare Source](https://github.com/serde-rs/serde/compare/v1.0.144...v1.0.145) - Allow RefCell\<T>, Mutex\<T>, and RwLock\<T> to be serialized regardless of whether T is `Sized` ([#&#8203;2282](https://github.com/serde-rs/serde/issues/2282), thanks [@&#8203;ChayimFriedman2](https://github.com/ChayimFriedman2)) ### [`v1.0.144`](https://github.com/serde-rs/serde/releases/tag/v1.0.144) [Compare Source](https://github.com/serde-rs/serde/compare/v1.0.143...v1.0.144) - Change atomic ordering used by Serialize impl of atomic types to match ordering used by Debug impl of those same types ([#&#8203;2263](https://github.com/serde-rs/serde/issues/2263), thanks [@&#8203;taiki-e](https://github.com/taiki-e)) ### [`v1.0.143`](https://github.com/serde-rs/serde/releases/tag/v1.0.143) [Compare Source](https://github.com/serde-rs/serde/compare/v1.0.142...v1.0.143) - Invert build.rs cfgs in serde_test to produce the most modern configuration in the default case ([#&#8203;2253](https://github.com/serde-rs/serde/issues/2253), thanks [@&#8203;taiki-e](https://github.com/taiki-e)) ### [`v1.0.142`](https://github.com/serde-rs/serde/releases/tag/v1.0.142) [Compare Source](https://github.com/serde-rs/serde/compare/v1.0.141...v1.0.142) - Add keywords to crates.io metadata ### [`v1.0.141`](https://github.com/serde-rs/serde/releases/tag/v1.0.141) [Compare Source](https://github.com/serde-rs/serde/compare/v1.0.140...v1.0.141) - Add `no-std` category to crates.io metadata ### [`v1.0.140`](https://github.com/serde-rs/serde/releases/tag/v1.0.140) [Compare Source](https://github.com/serde-rs/serde/compare/v1.0.139...v1.0.140) - Invert serde_derive cfgs to convenience non-Cargo builds on a modern toolchain ([#&#8203;2251](https://github.com/serde-rs/serde/issues/2251), thanks [@&#8203;taiki-e](https://github.com/taiki-e)) ### [`v1.0.139`](https://github.com/serde-rs/serde/releases/tag/v1.0.139) [Compare Source](https://github.com/serde-rs/serde/compare/v1.0.138...v1.0.139) - Add `new` constructor function for all `IntoDeserializer` impls ([#&#8203;2246](https://github.com/serde-rs/serde/issues/2246)) ### [`v1.0.138`](https://github.com/serde-rs/serde/releases/tag/v1.0.138) [Compare Source](https://github.com/serde-rs/serde/compare/v1.0.137...v1.0.138) - Documentation improvements ### [`v1.0.137`](https://github.com/serde-rs/serde/releases/tag/v1.0.137) [Compare Source](https://github.com/serde-rs/serde/compare/v1.0.136...v1.0.137) - Update documentation links to some data formats whose repos have moved ([#&#8203;2201](https://github.com/serde-rs/serde/issues/2201), thanks [@&#8203;atouchet](https://github.com/atouchet)) - Fix declared `rust-version` of serde and serde_test ([#&#8203;2168](https://github.com/serde-rs/serde/issues/2168)) </details> <details> <summary>serde-rs/json</summary> ### [`v1.0.87`](https://github.com/serde-rs/json/releases/tag/v1.0.87) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.86...v1.0.87) - Add `write_i128` and `write_u128` methods to `serde_json::Formatter` to control the formatting of 128-bit integers ([#&#8203;940](https://github.com/serde-rs/json/issues/940), thanks [@&#8203;Lucretiel](https://github.com/Lucretiel)) ### [`v1.0.86`](https://github.com/serde-rs/json/releases/tag/v1.0.86) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.85...v1.0.86) - Support `arbitrary_precision` feature even in no-std mode ([#&#8203;928](https://github.com/serde-rs/json/issues/928), thanks [@&#8203;kvinwang](https://github.com/kvinwang)) ### [`v1.0.85`](https://github.com/serde-rs/json/releases/tag/v1.0.85) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.84...v1.0.85) - Make `Display` for `Number` produce the same representation as serializing ([#&#8203;919](https://github.com/serde-rs/json/issues/919)) ### [`v1.0.84`](https://github.com/serde-rs/json/releases/tag/v1.0.84) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.83...v1.0.84) - Make `Debug` impl of `serde_json::Value` more compact ([#&#8203;918](https://github.com/serde-rs/json/issues/918)) ### [`v1.0.83`](https://github.com/serde-rs/json/releases/tag/v1.0.83) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.82...v1.0.83) - Add categories to crates.io metadata ### [`v1.0.82`](https://github.com/serde-rs/json/releases/tag/v1.0.82) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.81...v1.0.82) - Implement `From<Option<T>>` for serde_json::Value where `T: Into<Value>` ([#&#8203;900](https://github.com/serde-rs/json/issues/900), thanks [@&#8203;kvnvelasco](https://github.com/kvnvelasco)) ### [`v1.0.81`](https://github.com/serde-rs/json/releases/tag/v1.0.81) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.80...v1.0.81) - Work around `indexmap`/`autocfg` not always properly detecting whether a `std` sysroot crate is available ([#&#8203;885](https://github.com/serde-rs/json/issues/885), thanks [@&#8203;cuviper](https://github.com/cuviper)) ### [`v1.0.80`](https://github.com/serde-rs/json/releases/tag/v1.0.80) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.79...v1.0.80) - Documentation improvements ### [`v1.0.79`](https://github.com/serde-rs/json/releases/tag/v1.0.79) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.78...v1.0.79) - Allow `RawValue` deserialization to propagate `\u` escapes for unmatched surrogates, which can later by deserialized to Vec\<u8> ([#&#8203;830](https://github.com/serde-rs/json/issues/830), thanks [@&#8203;lucacasonato](https://github.com/lucacasonato)) ### [`v1.0.78`](https://github.com/serde-rs/json/releases/tag/v1.0.78) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.77...v1.0.78) - Support deserializing as `&RawValue` in map key position, which would previously fail with *"invalid type: newtype struct"* ([#&#8203;851](https://github.com/serde-rs/json/issues/851)) ### [`v1.0.77`](https://github.com/serde-rs/json/releases/tag/v1.0.77) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.76...v1.0.77) - Include discord invite links in the published readme - Improve compile error on compiling with neither `std` nor `alloc` feature enabled - Include integration tests in published package ([#&#8203;578](https://github.com/serde-rs/json/issues/578)) ### [`v1.0.76`](https://github.com/serde-rs/json/releases/tag/v1.0.76) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.75...v1.0.76) - Fix a build error when features `raw_value` and `alloc` are enabled while `std` is disabled ([#&#8203;850](https://github.com/serde-rs/json/issues/850)) ### [`v1.0.75`](https://github.com/serde-rs/json/releases/tag/v1.0.75) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.74...v1.0.75) - Fix deserialization of small integers in arbitrary_precision mode ([#&#8203;845](https://github.com/serde-rs/json/issues/845)) ### [`v1.0.74`](https://github.com/serde-rs/json/releases/tag/v1.0.74) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.73...v1.0.74) - Allow creating RawValues from references to unsized values ([#&#8203;841](https://github.com/serde-rs/json/issues/841), thanks [@&#8203;EFanZh](https://github.com/EFanZh)) ### [`v1.0.73`](https://github.com/serde-rs/json/releases/tag/v1.0.73) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.72...v1.0.73) - Update `itoa` dependency to 1.0 ### [`v1.0.72`](https://github.com/serde-rs/json/releases/tag/v1.0.72) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.71...v1.0.72) - Interpret `\u`-encoded lone surrogates when deserializing into a byte string ([#&#8203;828](https://github.com/serde-rs/json/issues/828), [#&#8203;829](https://github.com/serde-rs/json/issues/829), thanks [@&#8203;lucacasonato](https://github.com/lucacasonato)) ### [`v1.0.71`](https://github.com/serde-rs/json/releases/tag/v1.0.71) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.70...v1.0.71) - Add serde_json::Map::get_key_value ([#&#8203;821](https://github.com/serde-rs/json/issues/821), thanks [@&#8203;timothee-haudebourg](https://github.com/timothee-haudebourg)) - Add impl From\<Box\<RawValue>> for Box\<str> ([#&#8203;824](https://github.com/serde-rs/json/issues/824), thanks [@&#8203;jplatte](https://github.com/jplatte)) ### [`v1.0.70`](https://github.com/serde-rs/json/releases/tag/v1.0.70) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.69...v1.0.70) - Add `serde_json::Map::retain` method ([#&#8203;822](https://github.com/serde-rs/json/issues/822), thanks [@&#8203;deankarn](https://github.com/deankarn)) ### [`v1.0.69`](https://github.com/serde-rs/json/releases/tag/v1.0.69) [Compare Source](https://github.com/serde-rs/json/compare/v1.0.68...v1.0.69) - Implement Hash for serde_json::Number ([#&#8203;814](https://github.com/serde-rs/json/issues/814), thanks [@&#8203;timothee-haudebourg](https://github.com/timothee-haudebourg)) </details> <details> <summary>launchbadge/sqlx</summary> ### [`v0.6.2`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;062---2022-09-14) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.6.1...v0.6.2) [25 pull requests][0.6.2-prs] were merged this release cycle. ##### Added - \[[#&#8203;1081]]: Add `try_from` attribute for `FromRow` derive \[\[[@&#8203;zzhengzhuo](https://github.com/zzhengzhuo)]] - Exemplifies "out of sight, out of mind." It's surprisingly easy to forget about PRs when they get pushed onto the second page. We'll be sure to clean out the backlog for 0.7.0. - \[[#&#8203;2014]]: Support additional SQLCipher options in SQLite driver. \[\[[@&#8203;szymek156](https://github.com/szymek156)]] - \[[#&#8203;2052]]: Add issue templates \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;2053]]: Add documentation for `IpAddr` support in Postgres \[\[[@&#8203;rakshith-ravi](https://github.com/rakshith-ravi)]] - \[[#&#8203;2062]]: Add extension support for SQLite \[\[[@&#8203;bradfier](https://github.com/bradfier)]] - \[[#&#8203;2063]]: customizable db locking during migration \[\[[@&#8203;fuzzbuck](https://github.com/fuzzbuck)]] ##### Changed - \[[#&#8203;2025]]: Bump sqlformat to 2.0 \[\[[@&#8203;NSMustache](https://github.com/NSMustache)]] - \[[#&#8203;2056]]: chore: Switch to sha1 crate \[\[[@&#8203;stoically](https://github.com/stoically)]] - \[[#&#8203;2071]]: Use cargo check consistently in `prepare` \[\[[@&#8203;cycraig](https://github.com/cycraig)]] ##### Fixed - \[[#&#8203;1991]]: Ensure migration progress is not lost for Postgres, MySQL and SQLite. \[\[[@&#8203;crepererum](https://github.com/crepererum)]] - \[[#&#8203;2023]]: Fix expansion of `#[sqlx(flatten)]` for `FromRow` derive \[\[[@&#8203;RustyYato](https://github.com/RustyYato)]] - \[[#&#8203;2028]]: Use fully qualified path when forwarding to `#[test]` from `#[sqlx::test]` \[\[[@&#8203;alexander-jackson](https://github.com/alexander-jackson)]] - \[[#&#8203;2040]]: Fix typo in `FromRow` docs \[\[[@&#8203;zlidner](https://github.com/zlidner)]] - \[[#&#8203;2046]]: added flag for PIPES_AS_CONCAT connection setting for MySQL to fix [#&#8203;2034](https://github.com/launchbadge/sqlx/issues/2034) \[\[[@&#8203;marcustut](https://github.com/marcustut)]] - \[[#&#8203;2055]]: Use unlock notify also on `sqlite3_exec` \[\[[@&#8203;madadam](https://github.com/madadam)]] - \[[#&#8203;2057]]: Make begin,commit,rollback cancel-safe in sqlite \[\[[@&#8203;madadam](https://github.com/madadam)]] - \[[#&#8203;2058]]: fix typo in documentation \[\[[@&#8203;lovasoa](https://github.com/lovasoa)]] - \[[#&#8203;2067]]: fix(docs): close code block in query_builder.rs \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;2069]]: Fix `prepare` race condition in workspaces \[\[[@&#8203;cycraig](https://github.com/cycraig)]]\\ - NOTE: this changes the directory structure under `target/` that `cargo sqlx prepare` depends on. If you use offline mode in your workflow, please rerun `cargo install sqlx-cli` to upgrade. - \[[#&#8203;2072]]: SqliteConnectOptions typo \[\[[@&#8203;fasterthanlime](https://github.com/fasterthanlime)]] - \[[#&#8203;2074]]: fix: mssql uses unsigned for tinyint instead of signed \[\[[@&#8203;he4d](https://github.com/he4d)]] - \[[#&#8203;2081]]: close unnamed portal after each executed extended query \[\[[@&#8203;DXist](https://github.com/DXist)]] - \[[#&#8203;2086]]: PgHasArrayType for transparent types fix. \[\[[@&#8203;Wopple](https://github.com/Wopple)]] - NOTE: this is a breaking change and has been postponed to 0.7.0. - \[[#&#8203;2089]]: fix: Remove default chrono dep on time for sqlx-cli \[\[[@&#8203;TravisWhitehead](https://github.com/TravisWhitehead)]] - \[[#&#8203;2091]]: Sqlite explain plan log efficiency \[\[[@&#8203;tyrelr](https://github.com/tyrelr)]] [0.6.2-prs]: https://github.com/launchbadge/sqlx/pulls?q=is%3Apr+is%3Aclosed+merged%3A2022-08-04..2022-09-14+ [#&#8203;1081]: https://github.com/launchbadge/sqlx/pull/1081 [#&#8203;1991]: https://github.com/launchbadge/sqlx/pull/1991 [#&#8203;2014]: https://github.com/launchbadge/sqlx/pull/2014 [#&#8203;2023]: https://github.com/launchbadge/sqlx/pull/2023 [#&#8203;2025]: https://github.com/launchbadge/sqlx/pull/2025 [#&#8203;2028]: https://github.com/launchbadge/sqlx/pull/2028 [#&#8203;2040]: https://github.com/launchbadge/sqlx/pull/2040 [#&#8203;2046]: https://github.com/launchbadge/sqlx/pull/2046 [#&#8203;2052]: https://github.com/launchbadge/sqlx/pull/2052 [#&#8203;2053]: https://github.com/launchbadge/sqlx/pull/2053 [#&#8203;2055]: https://github.com/launchbadge/sqlx/pull/2055 [#&#8203;2056]: https://github.com/launchbadge/sqlx/pull/2056 [#&#8203;2057]: https://github.com/launchbadge/sqlx/pull/2057 [#&#8203;2058]: https://github.com/launchbadge/sqlx/pull/2058 [#&#8203;2062]: https://github.com/launchbadge/sqlx/pull/2062 [#&#8203;2063]: https://github.com/launchbadge/sqlx/pull/2063 [#&#8203;2067]: https://github.com/launchbadge/sqlx/pull/2067 [#&#8203;2069]: https://github.com/launchbadge/sqlx/pull/2069 [#&#8203;2071]: https://github.com/launchbadge/sqlx/pull/2071 [#&#8203;2072]: https://github.com/launchbadge/sqlx/pull/2072 [#&#8203;2074]: https://github.com/launchbadge/sqlx/pull/2074 [#&#8203;2081]: https://github.com/launchbadge/sqlx/pull/2081 [#&#8203;2086]: https://github.com/launchbadge/sqlx/pull/2086 [#&#8203;2089]: https://github.com/launchbadge/sqlx/pull/2089 [#&#8203;2091]: https://github.com/launchbadge/sqlx/pull/2091 ### [`v0.6.1`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;061---2022-08-02) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.6.0...v0.6.1) [33 pull requests][0.6.1-prs] were merged this release cycle. ##### Added - \[[#&#8203;1495]]: Add example for manual implementation of the `FromRow` trait \[\[[@&#8203;Erik1000](https://github.com/Erik1000)]] - \[[#&#8203;1822]]: (Postgres) Add support for `std::net::IpAddr` \[\[[@&#8203;meh](https://github.com/meh)]] - Decoding returns an error if the `INET` value in Postgres is a prefix and not a full address (`/32` for IPv4, `/128` for IPv6). - \[[#&#8203;1865]]: Add SQLite support for the `time` crate \[\[[@&#8203;johnbcodes](https://github.com/johnbcodes)]] - \[[#&#8203;1902]]: Add an example of how to use `QueryBuilder::separated()` \[\[[@&#8203;sbeckeriv](https://github.com/sbeckeriv)]] - \[[#&#8203;1917]]: Added docs for `sqlx::types::Json` \[\[[@&#8203;jayy-lmao](https://github.com/jayy-lmao)]] - \[[#&#8203;1919]]: Implement `Clone` for `PoolOptions` \[\[[@&#8203;Thomasdezeeuw](https://github.com/Thomasdezeeuw)]] - \[[#&#8203;1953]]: Support Rust arrays in Postgres \[\[[@&#8203;e00E](https://github.com/e00E)]] - \[[#&#8203;1954]]: Add `push_tuples` for `QueryBuilder` \[\[[@&#8203;0xdeafbeef](https://github.com/0xdeafbeef)]] - \[[#&#8203;1959]]: Support `#[sqlx(flatten)]` attribute in `FromRow` \[\[[@&#8203;TheoOiry](https://github.com/TheoOiry)]] - \[[#&#8203;1967]]: Add example with external query files \[\[[@&#8203;JoeyMckenzie](https://github.com/JoeyMckenzie)]] - \[[#&#8203;1985]]: Add `query_builder::Separated::push_bind_unseparated()` \[\[[@&#8203;0xdeafbeef](https://github.com/0xdeafbeef)]] - \[[#&#8203;2001]]: Implement `#[sqlx::test]` for general use - Includes automatic database management, migration and fixture application. - Drops support for end-of-lifed database versions, see PR for details. - \[[#&#8203;2005]]: `QueryBuilder` improvements \[\[[@&#8203;abonander](https://github.com/abonander)]] - Raw SQL getters, new method to build `QueryAs` instead of `Query`. - \[[#&#8203;2013]]: (SQLite) Allow VFS to be set as URL query parameter \[\[[@&#8203;liningpan](https://github.com/liningpan)]] ##### Changed - \[[#&#8203;1679]]: refactor: alias actix-\* features to their equivalent tokio-\* features \[\[[@&#8203;robjtede](https://github.com/robjtede)]] - \[[#&#8203;1906]]: replaced all uses of "uri" to "url" \[\[[@&#8203;RomainStorai](https://github.com/RomainStorai)]] - \[[#&#8203;1965]]: SQLite improvements \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;1977]]: Docs: clarify relationship between `query_as!()` and `FromRow` \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;2003]]: Replace `dotenv` with `dotenvy` \[\[[@&#8203;abonander](https://github.com/abonander)]] ##### Fixed - \[[#&#8203;1802]]: Try avoiding a full clean in `cargo sqlx prepare --merged` \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]] - \[[#&#8203;1848]]: Fix type info access in `Any` database driver \[\[[@&#8203;raviqqe](https://github.com/raviqqe)]] - \[[#&#8203;1910]]: Set `CARGO_TARGET_DIR` when compiling queries \[\[[@&#8203;sedrik](https://github.com/sedrik)]] - \[[#&#8203;1915]]: Pool: fix panic when using callbacks \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;1930]]: Don't cache SQLite connection for macros \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]] - \[[#&#8203;1948]]: Fix panic in Postgres `BYTEA` decode \[\[[@&#8203;e00E](https://github.com/e00E)]] - \[[#&#8203;1955]]: Fix typo in FAQ \[\[[@&#8203;kenkoooo](https://github.com/kenkoooo)]] - \[[#&#8203;1968]]: (Postgres) don't panic if `S` or `V` notice fields are not UTF-8 \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;1969]]: Fix sqlx-cli build \[\[[@&#8203;ivan](https://github.com/ivan)]] - \[[#&#8203;1974]]: Use the `rust-cache` action for CI \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;1988]]: Agree on a single default runtime for the whole workspace \[\[[@&#8203;crepererum](https://github.com/crepererum)]] - \[[#&#8203;1989]]: Fix panics in `PgListener` \[\[[@&#8203;crepererum](https://github.com/crepererum)]] - \[[#&#8203;1990]]: Switch `master` to `main` in docs \[\[[@&#8203;crepererum](https://github.com/crepererum)]] - The change had already been made in the repo, the docs were out of date. - \[[#&#8203;1993]]: Update versions in quickstart examples in README \[\[[@&#8203;UramnOIL](https://github.com/UramnOIL)]] [0.6.1-prs]: https://github.com/launchbadge/sqlx/pulls?page=1&q=is%3Apr+is%3Aclosed+merged%3A2022-06-17..2022-08-02 [#&#8203;1906]: https://github.com/launchbadge/sqlx/pull/1906 [#&#8203;1495]: https://github.com/launchbadge/sqlx/pull/1495 [#&#8203;1679]: https://github.com/launchbadge/sqlx/pull/1679 [#&#8203;1802]: https://github.com/launchbadge/sqlx/pull/1802 [#&#8203;1822]: https://github.com/launchbadge/sqlx/pull/1822 [#&#8203;1848]: https://github.com/launchbadge/sqlx/pull/1848 [#&#8203;1865]: https://github.com/launchbadge/sqlx/pull/1865 [#&#8203;1902]: https://github.com/launchbadge/sqlx/pull/1902 [#&#8203;1910]: https://github.com/launchbadge/sqlx/pull/1910 [#&#8203;1915]: https://github.com/launchbadge/sqlx/pull/1915 [#&#8203;1917]: https://github.com/launchbadge/sqlx/pull/1917 [#&#8203;1919]: https://github.com/launchbadge/sqlx/pull/1919 [#&#8203;1930]: https://github.com/launchbadge/sqlx/pull/1930 [#&#8203;1948]: https://github.com/launchbadge/sqlx/pull/1948 [#&#8203;1953]: https://github.com/launchbadge/sqlx/pull/1953 [#&#8203;1954]: https://github.com/launchbadge/sqlx/pull/1954 [#&#8203;1955]: https://github.com/launchbadge/sqlx/pull/1955 [#&#8203;1959]: https://github.com/launchbadge/sqlx/pull/1959 [#&#8203;1965]: https://github.com/launchbadge/sqlx/pull/1965 [#&#8203;1967]: https://github.com/launchbadge/sqlx/pull/1967 [#&#8203;1968]: https://github.com/launchbadge/sqlx/pull/1968 [#&#8203;1969]: https://github.com/launchbadge/sqlx/pull/1969 [#&#8203;1974]: https://github.com/launchbadge/sqlx/pull/1974 [#&#8203;1977]: https://github.com/launchbadge/sqlx/pull/1977 [#&#8203;1985]: https://github.com/launchbadge/sqlx/pull/1985 [#&#8203;1988]: https://github.com/launchbadge/sqlx/pull/1988 [#&#8203;1989]: https://github.com/launchbadge/sqlx/pull/1989 [#&#8203;1990]: https://github.com/launchbadge/sqlx/pull/1990 [#&#8203;1993]: https://github.com/launchbadge/sqlx/pull/1993 [#&#8203;2001]: https://github.com/launchbadge/sqlx/pull/2001 [#&#8203;2003]: https://github.com/launchbadge/sqlx/pull/2003 [#&#8203;2005]: https://github.com/launchbadge/sqlx/pull/2005 [#&#8203;2013]: https://github.com/launchbadge/sqlx/pull/2013 ### [`v0.6.0`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;060---2022-06-16) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.13...v0.6.0) This release marks the end of the 0.5.x series of releases and contains a number of breaking changes, mainly to do with backwards-incompatible dependency upgrades. As we foresee many more of these in the future, we [surveyed the community] on how to handle this; the consensus appears to be "just release breaking changes more often." As such, we expect the 0.6.x release series to be a shorter one. [39 pull requests(!)][0.6.0-prs] (not counting "prepare 0.5.12 release", of course) were merged this release cycle. ##### Breaking - \[[#&#8203;1384]]: (Postgres) Move `server_version_num` from trait to inherent impl \[\[[@&#8203;AtkinsChang](https://github.com/AtkinsChang)]] - \[[#&#8203;1426]]: Bump `ipnetwork` to 0.19 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - \[[#&#8203;1455]]: Upgrade `time` to 0.3 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - \[[#&#8203;1505]]: Upgrade `rustls` to 0.20 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - Fortunately, future upgrades should not be breaking as `webpki` is no longer exposed in the API. - \[[#&#8203;1529]]: Upgrade `bigdecimal` to 0.3 \[\[[@&#8203;e00E](https://github.com/e00E)]] - \[[#&#8203;1602]]: postgres: use `Oid` everywhere instead of `u32` \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - This drops the `Type`, `Decode`, `Encode` impls for `u32` for Postgres as it was misleading. Postgres doesn't support unsigned ints without using an extension. These impls were decoding Postgres `OID`s as bare `u32`s without any context (and trying to bind a `u32` to a query would produce an `OID` value in SQL). This changes that to use a newtype instead, for clarity. - \[[#&#8203;1612]]: Make all `ConnectOptions` types cloneable \[\[[@&#8203;05storm26](https://github.com/05storm26)]] - \[[#&#8203;1618]]: SQLite `chrono::DateTime<FixedOffset>` timezone fix \[\[[@&#8203;05storm26](https://github.com/05storm26)]] - `DateTime<FixedOffset>` will be stored in SQLite with the correct timezone instead of always in UTC. This was flagged as a "potentially breaking change" since it changes how dates are sent to SQLite. - \[[#&#8203;1733]]: Update `git2` to 0.14 \[\[[@&#8203;joshtriplett](https://github.com/joshtriplett)]] - \[[#&#8203;1734]]: Make `PgLTree::push()` infallible and take `PgLTreeLabel` directly \[\[[@&#8203;sebpuetz](https://github.com/sebpuetz)]] - \[[#&#8203;1785]]: Fix Rust type for SQLite `REAL` \[\[[@&#8203;pruthvikar](https://github.com/pruthvikar)]] - Makes the macros always map a `REAL` column to `f64` instead of `f32` as SQLite uses **only** 64-bit floats. - \[[#&#8203;1816]]: Improve SQLite support for sub-queries and CTEs \[\[[@&#8203;tyrelr](https://github.com/tyrelr)]] - This likely will change the generated code for some invocations `sqlx::query!()` with SQLite. - \[[#&#8203;1821]]: Update `uuid` crate to v1 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - \[[#&#8203;1901]]: Pool fixes and breaking changes \[\[[@&#8203;abonander](https://github.com/abonander)]] - Renamed `PoolOptions::connect_timeout` to `acquire_timeout` for clarity. - Changed the expected signatures for `PoolOptions::after_connect`, `before_acquire`, `after_release` - Changed the signature for `Pool::close()` slightly - Now eagerly starts the pool closing, `.await`ing is only necessary if you want to ensure a graceful shutdown. - Deleted `PoolConnection::release()` which was previously deprecated in favor of `PoolConnection::detach()`. - Fixed connections getting leaked even when calling `.close()`. - \[\[[#&#8203;1748](https://github.com/launchbadge/sqlx/issues/1748)]]: Derive `PgHasArrayType` for `#[sqlx(transparent)]` types \[\[[@&#8203;carols10cents](https://github.com/carols10cents)]] - This change was released with 0.5.12 but [we didn't realize it was a breaking change] at the time.\ It was reverted in 0.5.13 and postponed until this release. ##### Added - \[[#&#8203;1843]]: Expose some useful methods on `PgValueRef` \[\[[@&#8203;mfreeborn](https://github.com/mfreeborn)]] - \[[#&#8203;1889]]: SQLx-CLI: add `--connect-timeout` \[\[[@&#8203;abonander](https://github.com/abonander)]] - Adds a default 10 second connection timeout to all commands. - \[[#&#8203;1890]]: Added test for mssql LoginAck \[\[[@&#8203;walf443](https://github.com/walf443)]] - \[[#&#8203;1891]]: Added test for mssql ProtocolInfo \[\[[@&#8203;walf443](https://github.com/walf443)]] - \[[#&#8203;1892]]: Added test for mssql ReturnValue \[\[[@&#8203;walf443](https://github.com/walf443)]] - \[[#&#8203;1895]]: Add support for `i16` to `Any` driver \[\[[@&#8203;EthanYuan](https://github.com/EthanYuan)]] - \[[#&#8203;1897]]: Expose `ConnectOptions` and `PoolOptions` on `Pool` and database name on `PgConnectOptions` \[\[[@&#8203;Nukesor](https://github.com/Nukesor)]] ##### Changed - \[[#&#8203;1782]]: Reuse a cached DB connection instead of always opening a new one for `sqlx-macros` \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]] - \[[#&#8203;1807]]: Bump remaining dependencies \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - \[[#&#8203;1808]]: Update to edition 2021 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - Note that while SQLx [does not officially track an MSRV] and only officially supports the latest stable Rust, this effectively places a lower bound of 1.56.0 on the range of versions it may work with. - \[[#&#8203;1823]]: (sqlx-macros) Ignore deps when getting metadata for workspace root \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]] - \[[#&#8203;1831]]: Update `crc` to 3.0 \[\[[@&#8203;djc](https://github.com/djc)]] - \[[#&#8203;1887]]: query_as: don't stop stream after decoding error \[\[[@&#8203;lovasoa](https://github.com/lovasoa)]] ##### Fixed - \[[#&#8203;1814]]: SQLx-cli README: move `Usage` to the same level as `Install` \[\[[@&#8203;tobymurray](https://github.com/tobymurray)]] - \[[#&#8203;1815]]: SQLx-cli README: reword "building in offline mode" \[\[[@&#8203;tobymurray](https://github.com/tobymurray)]] - \[[#&#8203;1818]]: Trim `[]` from host string before passing to TcpStream \[\[[@&#8203;smonv](https://github.com/smonv)]] - This fixes handling of database URLs with IPv6 hosts. - \[[#&#8203;1842]]: Fix usage of `serde_json` in macros \[\[[@&#8203;mfreeborn](https://github.com/mfreeborn)]] - \[[#&#8203;1855]]: Postgres: fix panics on unknown type OID when decoding \[\[[@&#8203;demurgos](https://github.com/demurgos)]] - \[[#&#8203;1856]]: MySQL: support COLLATE_UTF8MB4\_0900\_AI_CI \[\[[@&#8203;scottwey](https://github.com/scottwey)]] - Fixes the MySQL driver thinking text columns are bytestring columns when querying against a Planetscale DB. - \[[#&#8203;1861]]: MySQL: avoid panic when streaming packets are empty \[\[[@&#8203;e-rhodes](https://github.com/e-rhodes)]] - \[[#&#8203;1863]]: Fix nullability check for inner joins in Postgres \[\[[@&#8203;OskarPersson](https://github.com/OskarPersson)]] - \[[#&#8203;1881]]: Fix `field is never read` warnings on Postgres test \[\[[@&#8203;walf443](https://github.com/walf443)]] - \[[#&#8203;1882]]: Fix `unused result must be used` warnings \[\[[@&#8203;walf443](https://github.com/walf443)]] - \[[#&#8203;1888]]: Fix migration checksum comparison during `sqlx migrate info` \[\[[@&#8203;mdtusz](https://github.com/mdtusz)]] - \[[#&#8203;1894]]: Fix typos \[\[[@&#8203;kianmeng](https://github.com/kianmeng)]] [surveyed the community]: https://github.com/launchbadge/sqlx/issues/1796 [0.6.0-prs]: https://github.com/launchbadge/sqlx/pulls?page=2&q=is%3Apr+is%3Amerged+merged%3A2022-04-14..2022-06-16 [does not officially track an MSRV]: /FAQ.md#what-versions-of-rust-does-sqlx-support-what-is-sqlxs-msrv [we didn't realize it was a breaking change]: https://github.com/launchbadge/sqlx/pull/1800#issuecomment-1099898932 [#&#8203;1384]: https://github.com/launchbadge/sqlx/pull/1384 [#&#8203;1426]: https://github.com/launchbadge/sqlx/pull/1426 [#&#8203;1455]: https://github.com/launchbadge/sqlx/pull/1455 [#&#8203;1505]: https://github.com/launchbadge/sqlx/pull/1505 [#&#8203;1529]: https://github.com/launchbadge/sqlx/pull/1529 [#&#8203;1602]: https://github.com/launchbadge/sqlx/pull/1602 [#&#8203;1612]: https://github.com/launchbadge/sqlx/pull/1612 [#&#8203;1618]: https://github.com/launchbadge/sqlx/pull/1618 [#&#8203;1733]: https://github.com/launchbadge/sqlx/pull/1733 [#&#8203;1734]: https://github.com/launchbadge/sqlx/pull/1734 [#&#8203;1782]: https://github.com/launchbadge/sqlx/pull/1782 [#&#8203;1785]: https://github.com/launchbadge/sqlx/pull/1785 [#&#8203;1807]: https://github.com/launchbadge/sqlx/pull/1807 [#&#8203;1808]: https://github.com/launchbadge/sqlx/pull/1808 [#&#8203;1814]: https://github.com/launchbadge/sqlx/pull/1814 [#&#8203;1815]: https://github.com/launchbadge/sqlx/pull/1815 [#&#8203;1816]: https://github.com/launchbadge/sqlx/pull/1816 [#&#8203;1818]: https://github.com/launchbadge/sqlx/pull/1818 [#&#8203;1821]: https://github.com/launchbadge/sqlx/pull/1821 [#&#8203;1823]: https://github.com/launchbadge/sqlx/pull/1823 [#&#8203;1831]: https://github.com/launchbadge/sqlx/pull/1831 [#&#8203;1842]: https://github.com/launchbadge/sqlx/pull/1842 [#&#8203;1843]: https://github.com/launchbadge/sqlx/pull/1843 [#&#8203;1855]: https://github.com/launchbadge/sqlx/pull/1855 [#&#8203;1856]: https://github.com/launchbadge/sqlx/pull/1856 [#&#8203;1861]: https://github.com/launchbadge/sqlx/pull/1861 [#&#8203;1863]: https://github.com/launchbadge/sqlx/pull/1863 [#&#8203;1881]: https://github.com/launchbadge/sqlx/pull/1881 [#&#8203;1882]: https://github.com/launchbadge/sqlx/pull/1882 [#&#8203;1887]: https://github.com/launchbadge/sqlx/pull/1887 [#&#8203;1888]: https://github.com/launchbadge/sqlx/pull/1888 [#&#8203;1889]: https://github.com/launchbadge/sqlx/pull/1889 [#&#8203;1890]: https://github.com/launchbadge/sqlx/pull/1890 [#&#8203;1891]: https://github.com/launchbadge/sqlx/pull/1891 [#&#8203;1892]: https://github.com/launchbadge/sqlx/pull/1892 [#&#8203;1894]: https://github.com/launchbadge/sqlx/pull/1894 [#&#8203;1895]: https://github.com/launchbadge/sqlx/pull/1895 [#&#8203;1897]: https://github.com/launchbadge/sqlx/pull/1897 [#&#8203;1901]: https://github.com/launchbadge/sqlx/pull/1901 ### [`v0.5.13`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;0513---2022-04-15) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.12...v0.5.13) This is a hotfix that reverts \[[#&#8203;1748](https://github.com/launchbadge/sqlx/issues/1748)] as that was an accidental breaking change:\ the generated `PgHasArrayType` impl conflicts with manual impls of the trait.\ This change will have to wait for 0.6.0. ### [`v0.5.12`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;0512---2022-04-13-Yanked-use-0513) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.11...v0.5.12) [27 pull requests][0.5.12-prs] were merged this release cycle. ##### Added - \[[#&#8203;1641]]: Postgres: Convenient wrapper for advisory locks \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;1675]]: Add function to undo migrations \[\[[@&#8203;jdrouet](https://github.com/jdrouet)]] - \[[#&#8203;1722]]: Postgres: implement `PgHasArrayType` for `serde_json::{Value, RawValue}` \[\[[@&#8203;abreis](https://github.com/abreis)]] - \[[#&#8203;1736]]: Derive `Clone` for `MySqlArguments` and `MssqlArguments` \[\[[@&#8203;0xdeafbeef](https://github.com/0xdeafbeef)]] - \[[#&#8203;1748]]: Derive `PgHasArrayType` for `#[sqlx(transparent)]` types \[\[[@&#8203;carols10cents](https://github.com/carols10cents)]] - \[[#&#8203;1754]]: Include affected rows alongside returned rows in query logging \[\[[@&#8203;david-mcgillicuddy-moixa](https://github.com/david-mcgillicuddy-moixa)]] - \[[#&#8203;1757]]: Implement `Type` for `Cow<str>` for MySQL, MSSQL and SQLite \[\[[@&#8203;ipetkov](https://github.com/ipetkov)]] - \[[#&#8203;1769]]: sqlx-cli: add `--source` to migration subcommands \[\[[@&#8203;pedromfedricci](https://github.com/pedromfedricci)]] - \[[#&#8203;1774]]: Postgres: make `extra_float_digits` settable \[\[[@&#8203;abonander](https://github.com/abonander)]] - Can be set to `None` for Postgres or third-party database servers that don't support the option. - \[[#&#8203;1776]]: Implement close-event notification for Pool \[\[[@&#8203;abonander](https://github.com/abonander)]] - Also fixes `PgListener` preventing `Pool::close()` from resolving. - \[[#&#8203;1780]]: Implement query builder \[\[[@&#8203;crajcan](https://github.com/crajcan)]] - See also \[[#&#8203;1790]]: Document and expand query builder \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;1781]]: Postgres: support `NUMERIC[]` using `decimal` feature \[\[[@&#8203;tm-drtina](https://github.com/tm-drtina)]] - \[[#&#8203;1784]]: SQLite: add `FromStr`, `Copy`, `PartialEq`, `Eq` impls for options enums \[\[[@&#8203;andrewwhitehead](https://github.com/andrewwhitehead)]] ##### Changed - \[[#&#8203;1625]]: Update RustCrypto crates \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - \[[#&#8203;1725]]: Update `heck` to 0.4 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - \[[#&#8203;1738]]: Update `regex` \[\[[@&#8203;Dylan-DPC](https://github.com/Dylan-DPC)]] - \[[#&#8203;1763]]: SQLite: update `libsqlite3-sys` \[\[[@&#8203;espindola](https://github.com/espindola)]] ##### Fixed - \[[#&#8203;1719]]: Fix a link in `query!()` docs \[\[[@&#8203;vbmade2000](https://github.com/vbmade2000)]] - \[[#&#8203;1731]]: Postgres: fix option passing logic \[\[[@&#8203;liushuyu](https://github.com/liushuyu)]] - \[[#&#8203;1735]]: sqlx-cli: pass `DATABASE_URL` to command spawned in `prepare` \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]] - \[[#&#8203;1741]]: Postgres: fix typo in `TSTZRANGE` \[\[[@&#8203;mgrachev](https://github.com/mgrachev)]] - \[[#&#8203;1761]]: Fix link from `QueryAs` to `query_as()` in docs \[\[[@&#8203;mgrachev](https://github.com/mgrachev)]] - \[[#&#8203;1786]]: MySQL: silence compile warnings for unused fields \[\[[@&#8203;andrewwhitehead](https://github.com/andrewwhitehead)]] - \[[#&#8203;1789]]: SQLite: fix left-joins breaking `query!()` macros \[\[[@&#8203;tyrelr](https://github.com/tyrelr)]] - \[[#&#8203;1791]]: Postgres: fix newline parsing of `.pgpass` files \[\[[@&#8203;SebastienGllmt](https://github.com/SebastienGllmt)]] - \[[#&#8203;1799]]: `PoolConnection`: don't leak connection permit if drop task fails to run \[\[[@&#8203;abonander](https://github.com/abonander)]] [#&#8203;1625]: https://github.com/launchbadge/sqlx/pull/1625 [#&#8203;1641]: https://github.com/launchbadge/sqlx/pull/1641 [#&#8203;1675]: https://github.com/launchbadge/sqlx/pull/1675 [#&#8203;1719]: https://github.com/launchbadge/sqlx/pull/1719 [#&#8203;1722]: https://github.com/launchbadge/sqlx/pull/1722 [#&#8203;1725]: https://github.com/launchbadge/sqlx/pull/1725 [#&#8203;1731]: https://github.com/launchbadge/sqlx/pull/1731 [#&#8203;1735]: https://github.com/launchbadge/sqlx/pull/1735 [#&#8203;1736]: https://github.com/launchbadge/sqlx/pull/1736 [#&#8203;1738]: https://github.com/launchbadge/sqlx/pull/1738 [#&#8203;1741]: https://github.com/launchbadge/sqlx/pull/1741 [#&#8203;1748]: https://github.com/launchbadge/sqlx/pull/1748 [#&#8203;1754]: https://github.com/launchbadge/sqlx/pull/1754 [#&#8203;1757]: https://github.com/launchbadge/sqlx/pull/1757 [#&#8203;1761]: https://github.com/launchbadge/sqlx/pull/1761 [#&#8203;1763]: https://github.com/launchbadge/sqlx/pull/1763 [#&#8203;1769]: https://github.com/launchbadge/sqlx/pull/1769 [#&#8203;1774]: https://github.com/launchbadge/sqlx/pull/1774 [#&#8203;1776]: https://github.com/launchbadge/sqlx/pull/1776 [#&#8203;1780]: https://github.com/launchbadge/sqlx/pull/1780 [#&#8203;1781]: https://github.com/launchbadge/sqlx/pull/1781 [#&#8203;1784]: https://github.com/launchbadge/sqlx/pull/1784 [#&#8203;1786]: https://github.com/launchbadge/sqlx/pull/1786 [#&#8203;1789]: https://github.com/launchbadge/sqlx/pull/1789 [#&#8203;1790]: https://github.com/launchbadge/sqlx/pull/1790 [#&#8203;1791]: https://github.com/launchbadge/sqlx/pull/1791 [#&#8203;1799]: https://github.com/launchbadge/sqlx/pull/1799 [0.5.12-prs]: https://github.com/launchbadge/sqlx/pulls?q=is%3Apr+is%3Amerged+merged%3A2022-02-19..2022-04-13 ### [`v0.5.11`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;0511---2022-02-17) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.10...v0.5.11) [20 pull requests][0.5.11-prs] were merged this release cycle. ##### Added - \[[#&#8203;1610]]: Allow converting `AnyConnectOptions` to a specific `ConnectOptions` \[\[[@&#8203;05storm26](https://github.com/05storm26)]] - \[[#&#8203;1652]]: Implement `From` for `AnyConnection` \[\[[@&#8203;genusistimelord](https://github.com/genusistimelord)]] - \[[#&#8203;1658]]: Handle `SQLITE_LOCKED` \[\[[@&#8203;madadam](https://github.com/madadam)]] - \[[#&#8203;1665]]: Document offline mode usage with feature flags \[\[[@&#8203;sedrik](https://github.com/sedrik)]] - \[[#&#8203;1680]]: Show checksum mismatches in `sqlx migrate info` \[\[[@&#8203;ifn3](https://github.com/ifn3)]] - \[[#&#8203;1685]]: Add tip for setting `opt-level` for `sqlx-macros` \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]] - \[[#&#8203;1687]]: Docs: `Acquire` examples and alternative \[\[[@&#8203;stoically](https://github.com/stoically)]] - \[[#&#8203;1696]]: Postgres: support for `ltree` \[\[[@&#8203;cemoktra](https://github.com/cemoktra)]] - \[[#&#8203;1710]]: Postgres: support for `lquery` \[\[[@&#8203;cemoktra](https://github.com/cemoktra)]] ##### Changed - \[[#&#8203;1605]]: Remove unused dependencies \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - \[[#&#8203;1606]]: Add target context to Postgres `NOTICE` logs \[\[[@&#8203;dbeckwith](https://github.com/dbeckwith)]] - \[[#&#8203;1684]]: Macros: Cache parsed `sqlx-data.json` instead of reparsing \[\[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)]] ##### Fixed - \[[#&#8203;1608]]: Drop worker shared state in shutdown (SQLite) \[\[[@&#8203;andrewwhitehead](https://github.com/andrewwhitehead)]] - \[[#&#8203;1619]]: Docs(macros): remove sentences banning usage of `as _` \[\[[@&#8203;k-jun](https://github.com/k-jun)]] - \[[#&#8203;1626]]: Simplify `cargo-sqlx` command-line definition \[\[[@&#8203;tranzystorek-io](https://github.com/tranzystorek-io)]] - \[[#&#8203;1636]]: Fix and extend Postgres transaction example \[\[[@&#8203;taladar](https://github.com/taladar)]] - \[[#&#8203;1657]]: Fix typo in macro docs \[\[[@&#8203;p9s](https://github.com/p9s)]] - \[[#&#8203;1661]]: Fix binding `Option<T>` for `Any` driver \[\[[@&#8203;ArGGu](https://github.com/ArGGu)]] - \[[#&#8203;1667]]: MySQL: Avoid panicking if packet is empty \[\[[@&#8203;nappa85](https://github.com/nappa85)]] - \[[#&#8203;1692]]: Postgres: Fix power calculation when encoding `BigDecimal` into `NUMERIC` \[\[[@&#8203;VersBinarii](https://github.com/VersBinarii)]] Additionally, we have introduced two mitigations for [the issue of the cyclic dependency on `ahash`][aHash#&#8203;95]: - We re-downgraded our version requirement on `indexmap` from `1.7.0` back to `1.6.2` so users can pin it to that version [as recommended in aHash#&#8203;95][ahash-fix]. - [This was regressed accidentally during a sweeping dependency upgrade before the last release][indexmap-regression], sorry about that. - Thanks to the work of \[[@&#8203;LovecraftianHorror](https://github.com/LovecraftianHorror)] in [#&#8203;1684], we no longer require the `preserve_order` feature of `serde_json` which gives users another place to break the cycle by simply not enabling that feature. - This may introduce extra churn in Git diffs for `sqlx-data.json`, however. If this is an issue for you but the dependency cycle isn't, you can re-enable the `preserve_order` feature: ```toml [dependencies] serde_json = { version = "1", features = ["preserve_order"] } ``` [aHash#&#8203;95]: https://github.com/tkaitchuck/aHash/issues/95 [ahash-fix]: https://github.com/tkaitchuck/aHash/issues/95#issuecomment-874150078 [indexmap-regression]: https://github.com/launchbadge/sqlx/pull/1603#issuecomment-1010827637 [#&#8203;1605]: https://github.com/launchbadge/sqlx/pull/1605 [#&#8203;1606]: https://github.com/launchbadge/sqlx/pull/1606 [#&#8203;1608]: https://github.com/launchbadge/sqlx/pull/1608 [#&#8203;1610]: https://github.com/launchbadge/sqlx/pull/1610 [#&#8203;1619]: https://github.com/launchbadge/sqlx/pull/1619 [#&#8203;1626]: https://github.com/launchbadge/sqlx/pull/1626 [#&#8203;1636]: https://github.com/launchbadge/sqlx/pull/1636 [#&#8203;1652]: https://github.com/launchbadge/sqlx/pull/1652 [#&#8203;1657]: https://github.com/launchbadge/sqlx/pull/1657 [#&#8203;1658]: https://github.com/launchbadge/sqlx/pull/1658 [#&#8203;1661]: https://github.com/launchbadge/sqlx/pull/1661 [#&#8203;1665]: https://github.com/launchbadge/sqlx/pull/1665 [#&#8203;1667]: https://github.com/launchbadge/sqlx/pull/1667 [#&#8203;1680]: https://github.com/launchbadge/sqlx/pull/1680 [#&#8203;1684]: https://github.com/launchbadge/sqlx/pull/1684 [#&#8203;1685]: https://github.com/launchbadge/sqlx/pull/1685 [#&#8203;1687]: https://github.com/launchbadge/sqlx/pull/1687 [#&#8203;1692]: https://github.com/launchbadge/sqlx/pull/1692 [#&#8203;1696]: https://github.com/launchbadge/sqlx/pull/1696 [#&#8203;1710]: https://github.com/launchbadge/sqlx/pull/1710 [0.5.11-prs]: https://github.com/launchbadge/sqlx/pulls?q=is%3Apr+is%3Amerged+merged%3A2021-12-30..2022-02-17 ### [`v0.5.10`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;0510---2021-12-29) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.9...v0.5.10) [A whopping 31 pull requests][0.5.10-prs] were merged this release cycle! According to this changelog, we saw 18 new contributors! However, some of these folks may have missed getting mentioned in previous entries since we only listed highlights. To avoid anyone feeling left out, I put in the effort this time and tried to list every single one here. ##### Added - \[[#&#8203;1228]]: Add `Pool::any_kind()` \[\[[@&#8203;nitnelave](https://github.com/nitnelave)]] - \[[#&#8203;1343]]: Add `Encode/Decode` impl for `Cow<'_, str>` \[\[[@&#8203;Drevoed](https://github.com/Drevoed)]] - \[[#&#8203;1474]]: Derive `Clone`, `Copy` for `AnyKind` \[\[[@&#8203;yuyawk](https://github.com/yuyawk)]] - \[[#&#8203;1497]]: Update FAQ to explain how to configure docs.rs to build a project using SQLx \[\[[@&#8203;russweas](https://github.com/russweas)]] - \[[#&#8203;1498]]: Add description of migration file structure to `migrate!()` docs \[\[[@&#8203;zbigniewzolnierowicz](https://github.com/zbigniewzolnierowicz)]] - \[[#&#8203;1508]]: Add `.persistent(bool)` to `QueryAs`, `QueryScalar` \[\[[@&#8203;akiradeveloper](https://github.com/akiradeveloper)]] - \[[#&#8203;1514]]: Add support for serialized threading mode to SQLite \[\[[@&#8203;LLBlumire](https://github.com/LLBlumire)]] - \[[#&#8203;1523]]: Allow `rust_decimal::Decimal` in `PgRange` \[\[[@&#8203;meh](https://github.com/meh)]] - \[[#&#8203;1539]]: Support `PGOPTIONS` and adding custom configuration options in `PgConnectOptions` \[\[[@&#8203;liushuyu](https://github.com/liushuyu)]] - \[[#&#8203;1562]]: Re-export `either::Either` used by `Executor::fetch_many()` \[\[[@&#8203;DoumanAsh](https://github.com/DoumanAsh)]] - \[[#&#8203;1584]]: Add feature to use RusTLS instead of `native-tls` for `sqlx-cli` \[\[[@&#8203;SonicZentropy](https://github.com/SonicZentropy)]] - \[[#&#8203;1592]]: Add `AnyConnection::kind()` \[\[[@&#8203;05storm26](https://github.com/05storm26)]] ##### Changes - \[[#&#8203;1385]]: Rewrite Postgres array handling to reduce boilerplate and allow custom types \[\[[@&#8203;jplatte](https://github.com/jplatte)]] - \[[#&#8203;1479]]: Remove outdated mention of `runtime-async-std-native-tls` as the default runtime in README.md \[\[[@&#8203;yerke](https://github.com/yerke)]] - \[[#&#8203;1526]]: Revise `Pool` docs in a couple places \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;1535]]: Bump `libsqlite-sys` to `0.23.1` \[\[[@&#8203;nitsky](https://github.com/nitsky)]] - \[[#&#8203;1551]]: SQLite: make worker thread responsible for all FFI calls \[\[[@&#8203;abonander](https://github.com/abonander)]] - If you were encountering segfaults with the SQLite driver, there's a good chance this will fix it! - \[[#&#8203;1557]]: CI: test with Postgres 14 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - \[[#&#8203;1571]]: Make `whoami` dep optional, only pull it in for Postgres \[\[[@&#8203;joshtriplett](https://github.com/joshtriplett)]] - \[[#&#8203;1572]]: Update `rsa` crate to 0.5 \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] - \[[#&#8203;1591]]: List SeaORM as an ORM option in the README \[\[[@&#8203;kunjee17](https://github.com/kunjee17)]] - \[[#&#8203;1601]]: Update `itoa` and `dirs` \[\[[@&#8203;paolobarbolini](https://github.com/paolobarbolini)]] ##### Fixes - \[[#&#8203;1475]]: Fix panic when converting a negative `chrono::Duration` to `PgInterval` \[\[[@&#8203;yuyawk](https://github.com/yuyawk)]] - \[[#&#8203;1483]]: Fix error when decoding array of custom types from Postgres \[\[[@&#8203;demurgos](https://github.com/demurgos)] - \[[#&#8203;1501]]: Reduce `indexmap` version requirement to `1.6.2` \[\[[@&#8203;dimfeld](https://github.com/dimfeld)]] - \[[#&#8203;1511]]: Fix element type given to Postgres for arrays of custom enums \[\[[@&#8203;chesedo](https://github.com/chesedo)]] - \[[#&#8203;1517]]: Fix mismatched type errors in MySQL type tests \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;1537]]: Fix missing re-export of `PgCopyIn` \[\[[@&#8203;akiradeveloper](https://github.com/akiradeveloper)]] - \[[#&#8203;1566]]: Match `~/.pgpass` password after URL parsing and fix user and database ordering \[\[[@&#8203;D1plo1d](https://github.com/D1plo1d)]] - \[[#&#8203;1582]]: `cargo sqlx prepare`: Append to existing `RUSTFLAGS` instead of overwriting \[\[[@&#8203;tkintscher](https://github.com/tkintscher)]] - \[[#&#8203;1587]]: SQLite: if set, send `PRAGMA key` on a new connection before anything else. \[\[[@&#8203;parazyd](https://github.com/parazyd)]] - This should fix problems with being unable to open databases using SQLCipher. [#&#8203;1228]: https://github.com/launchbadge/sqlx/pull/1228 [#&#8203;1343]: https://github.com/launchbadge/sqlx/pull/1343 [#&#8203;1385]: https://github.com/launchbadge/sqlx/pull/1385 [#&#8203;1474]: https://github.com/launchbadge/sqlx/pull/1474 [#&#8203;1475]: https://github.com/launchbadge/sqlx/pull/1475 [#&#8203;1479]: https://github.com/launchbadge/sqlx/pull/1479 [#&#8203;1483]: https://github.com/launchbadge/sqlx/pull/1483 [#&#8203;1497]: https://github.com/launchbadge/sqlx/pull/1497 [#&#8203;1498]: https://github.com/launchbadge/sqlx/pull/1498 [#&#8203;1501]: https://github.com/launchbadge/sqlx/pull/1501 [#&#8203;1508]: https://github.com/launchbadge/sqlx/pull/1508 [#&#8203;1511]: https://github.com/launchbadge/sqlx/pull/1511 [#&#8203;1514]: https://github.com/launchbadge/sqlx/pull/1514 [#&#8203;1517]: https://github.com/launchbadge/sqlx/pull/1517 [#&#8203;1523]: https://github.com/launchbadge/sqlx/pull/1523 [#&#8203;1526]: https://github.com/launchbadge/sqlx/pull/1526 [#&#8203;1535]: https://github.com/launchbadge/sqlx/pull/1535 [#&#8203;1537]: https://github.com/launchbadge/sqlx/pull/1537 [#&#8203;1539]: https://github.com/launchbadge/sqlx/pull/1539 [#&#8203;1551]: https://github.com/launchbadge/sqlx/pull/1551 [#&#8203;1557]: https://github.com/launchbadge/sqlx/pull/1557 [#&#8203;1562]: https://github.com/launchbadge/sqlx/pull/1562 [#&#8203;1566]: https://github.com/launchbadge/sqlx/pull/1566 [#&#8203;1571]: https://github.com/launchbadge/sqlx/pull/1571 [#&#8203;1572]: https://github.com/launchbadge/sqlx/pull/1572 [#&#8203;1582]: https://github.com/launchbadge/sqlx/pull/1582 [#&#8203;1584]: https://github.com/launchbadge/sqlx/pull/1584 [#&#8203;1587]: https://github.com/launchbadge/sqlx/pull/1587 [#&#8203;1591]: https://github.com/launchbadge/sqlx/pull/1591 [#&#8203;1592]: https://github.com/launchbadge/sqlx/pull/1592 [#&#8203;1601]: https://github.com/launchbadge/sqlx/pull/1601 [0.5.10-prs]: https://github.com/launchbadge/sqlx/pulls?page=1&q=is%3Apr+merged%3A2021-10-02..2021-12-31+sort%3Acreated-asc ### [`v0.5.9`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;059---2021-10-01) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.8...v0.5.9) A hotfix release to address the issue of the `sqlx` crate itself still depending on older versions of `sqlx-core` and `sqlx-macros`. No other changes from `0.5.8`. ### [`v0.5.8`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;058---2021-10-01-Yanked-use-059) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.7...v0.5.8) [A total of 24 pull requests][0.5.8-prs] were merged this release cycle! Some highlights: - \[[#&#8203;1289]] Support the `immutable` option on SQLite connections \[\[[@&#8203;djmarcin](https://github.com/djmarcin)]] - \[[#&#8203;1295]] Support custom initial options for SQLite \[\[[@&#8203;ghassmo](https://github.com/ghassmo)]] - Allows specifying custom `PRAGMA`s and overriding those set by SQLx. - \[[#&#8203;1345]] Initial support for Postgres `COPY FROM/TO`\[\[[@&#8203;montanalow](https://github.com/montanalow)], \[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;1439]] Handle multiple waiting results correctly in MySQL \[\[[@&#8203;eagletmt](https://github.com/eagletmt)]] [#&#8203;1289]: https://github.com/launchbadge/sqlx/pull/1289 [#&#8203;1295]: https://github.com/launchbadge/sqlx/pull/1295 [#&#8203;1345]: https://github.com/launchbadge/sqlx/pull/1345 [#&#8203;1439]: https://github.com/launchbadge/sqlx/pull/1439 [0.5.8-prs]: https://github.com/launchbadge/sqlx/pulls?q=is%3Apr+is%3Amerged+merged%3A2021-08-21..2021-10-01 ### [`v0.5.7`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;057---2021-08-20) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.6...v0.5.7) - \[[#&#8203;1392]] use `resolve_path` when getting path for `include_str!()` \[\[[@&#8203;abonander](https://github.com/abonander)]] - Fixes a regression introduced by \[\[[#&#8203;1332](https://github.com/launchbadge/sqlx/issues/1332)]]. - \[[#&#8203;1393]] avoid recursively spawning tasks in `PgListener::drop()` \[\[[@&#8203;abonander](https://github.com/abonander)]] - Fixes a panic that occurs when `PgListener` is dropped in `async fn main()`. [#&#8203;1392]: https://github.com/launchbadge/sqlx/pull/1392 [#&#8203;1393]: https://github.com/launchbadge/sqlx/pull/1393 ### [`v0.5.6`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;056---2021-08-16) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.5...v0.5.6) A large bugfix release, including but not limited to: - \[[#&#8203;1329]] Implement `MACADDR` type for Postgres \[\[[@&#8203;nomick](https://github.com/nomick)]] - \[[#&#8203;1363]] Fix `PortalSuspended` for array of composite types in Postgres \[\[[@&#8203;AtkinsChang](https://github.com/AtkinsChang)]] - \[[#&#8203;1320]] Reimplement `sqlx::Pool` internals using `futures-intrusive` \[\[[@&#8203;abonander](https://github.com/abonander)]] - This addresses a number of deadlocks/stalls on acquiring connections from the pool. - \[[#&#8203;1332]] Macros: tell the compiler about external files/env vars to watch \[\[[@&#8203;abonander](https://github.com/abonander)]] - Includes `sqlx build-script` to create a `build.rs` to watch `migrations/` for changes. - Nightly users can try `RUSTFLAGS=--cfg sqlx_macros_unstable` to tell the compiler to watch `migrations/` for changes instead of using a build script. - See the new section in the docs for `sqlx::migrate!()` for details. - \[[#&#8203;1351]] Fix a few sources of segfaults/errors in SQLite driver \[\[[@&#8203;abonander](https://github.com/abonander)]] - Includes contributions from \[\[[@&#8203;link2ext](https://github.com/link2ext)]] and \[\[[@&#8203;madadam](https://github.com/madadam)]]. - \[[#&#8203;1323]] Keep track of column typing in SQLite EXPLAIN parsing \[\[[@&#8203;marshoepial](https://github.com/marshoepial)]] - This fixes errors in the macros when using `INSERT/UPDATE/DELETE ... RETURNING ...` in SQLite. [A total of 25 pull requests][0.5.6-prs] were merged this release cycle! [#&#8203;1329]: https://github.com/launchbadge/sqlx/pull/1329 [#&#8203;1363]: https://github.com/launchbadge/sqlx/pull/1363 [#&#8203;1320]: https://github.com/launchbadge/sqlx/pull/1320 [#&#8203;1332]: https://github.com/launchbadge/sqlx/pull/1332 [#&#8203;1351]: https://github.com/launchbadge/sqlx/pull/1351 [#&#8203;1323]: https://github.com/launchbadge/sqlx/pull/1323 [0.5.6-prs]: https://github.com/launchbadge/sqlx/pulls?q=is%3Apr+is%3Amerged+merged%3A2021-05-24..2021-08-17 ### [`v0.5.5`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;055---2021-05-24) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.4...v0.5.5) - \[[#&#8203;1242]] Fix infinite loop at compile time when using query macros \[\[[@&#8203;toshokan](https://github.com/toshokan)]] [#&#8203;1242]: https://github.com/launchbadge/sqlx/pull/1242 ### [`v0.5.4`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;054---2021-05-22) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.3...v0.5.4) - \[[#&#8203;1235]] Fix compilation with rustls from an eager update to webpki \[\[[@&#8203;ETCaton](https://github.com/ETCaton)]] [#&#8203;1235]: https://github.com/launchbadge/sqlx/pull/1235 ### [`v0.5.3`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;053---2021-05-21) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.2...v0.5.3) - \[[#&#8203;1211]] Even more tweaks and fixes to the Pool internals \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;1213]] Add support for bytes and `chrono::NaiveDateTime` to `Any` \[\[[@&#8203;guylapid](https://github.com/guylapid)]] - \[[#&#8203;1224]] Add support for `chrono::DateTime<Local>` to `Any` with `MySQL` \[\[[@&#8203;NatPRoach](https://github.com/NatPRoach)]] - \[[#&#8203;1216]] Skip empty lines and comments in pgpass files \[\[[@&#8203;feikesteenbergen](https://github.com/feikesteenbergen)]] - \[[#&#8203;1218]] Add support for `PgMoney` to the compile-time type-checking \[\[[@&#8203;iamsiddhant05](https://github.com/iamsiddhant05)]] [#&#8203;1211]: https://github.com/launchbadge/sqlx/pull/1211 [#&#8203;1213]: https://github.com/launchbadge/sqlx/pull/1213 [#&#8203;1216]: https://github.com/launchbadge/sqlx/pull/1216 [#&#8203;1218]: https://github.com/launchbadge/sqlx/pull/1218 [#&#8203;1224]: https://github.com/launchbadge/sqlx/pull/1224 ### [`v0.5.2`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#&#8203;052---2021-04-15) [Compare Source](https://github.com/launchbadge/sqlx/compare/v0.5.1...v0.5.2) - \[[#&#8203;1149]] Tweak and optimize Pool internals \[\[[@&#8203;abonander](https://github.com/abonander)]] - \[[#&#8203;1132]] Remove `'static` bound on `Connection::transaction` \[\[[@&#8203;argv-minus-one](https://github.com/argv-minus-one)]] - \[[#&#8203;1128]] Fix `-y` flag for `sqlx db reset -y` \[\[[@&#8203;qqwa](https://github.com/qqwa)]] - \[[#&#8203;1099]] \[[#&#8203;1097]] Truncate buffer when `BufStream` is dropped \[\[[@&#8203;Diggsey](https://github.com/Diggsey)]] [#&#8203;1132]: https://github.com/launchbadge/sqlx/pull/1132 [#&#8203;1149]: https://github.com/launchbadge/sqlx/pull/1149 [#&#8203;1128]: https://github.com/launchbadge/sqlx/pull/1128 [#&#8203;1099]: https://github.com/launchbadge/sqlx/pull/1099 [#&#8203;1097]: https://github.com/launchbadge/sqlx/issues/1097 ##### PostgreSQL - \[[#&#8203;1170]] Remove `Self: Type` bounds in `Encode` / `Decode` implementations for arrays \[\[[@&#8203;jplatte](https://github.com/jplatte)]] Enables working around the lack of support for user-defined array types: ```rust #[derive(sqlx::Encode)] struct Foos<'a>(&'a [Foo]); impl sqlx::Type<sqlx::Postgres> for Foos<'_> { fn type_info() -> PgTypeInfo { PgTypeInfo::with_name("_foo") } } query_as!( Whatever, "<QUERY with $1 of type foo[]>", Foos(&foo_vec) as _, ) ``` - \[[#&#8203;1141]] Use `u16::MAX` instead of `i16::MAX` for a check against the largest number of parameters in a query \[\[[@&#8203;crajcan](https://github.com/crajcan)]] - \[[#&#8203;1112]] Add support for `DOMAIN` types \[\[[@&#8203;demurgos](https://github.com/demurgos)]] - \[[#&#8203;1100]] Explicitly `UNLISTEN` before returning connections to the pool in `PgListener` \[\[[@&#8203;Diggsey](https://github.com/Diggsey)]] [#&#8203;1170]: https://github.com/launchbadge/sqlx/pull/1170 [#&#8203;1141]: https://github.com/launchbadge/sqlx/pull/1141 [#&#8203;1112]: https://github.com/launchbadge/sqlx/pull/1112 [#&#8203;1100]: https://github.com/launchbadge/sqlx/pull/1100 ##### SQLite - \[[#&#8203;1161]] Catch `SQLITE_MISUSE` on connection close and panic \[\[[@&#8203;link2xt](https://github.com/link2xt)]] - \[[#&#8203;1160]] Do not cast pointers to `i32` (cast to `usize`) \[\[[@&#8203;link2xt](https://github.com/link2xt)]] - \[[#&#8203;1156]] Reset the statement when `fetch_many` stream is dropped \[\[[@&#8203;link2xt](https://github.com/link2xt)]] [#&#8203;1161]: https://github.com/launchbadge/sqlx/pull/1161 [#&#8203;1160]: https://github.com/launchbadge/sqlx/pull/1160 [#&#8203;1156]: https://github.com/launchbadge/sqlx/pull/1156 </details> <details> <summary>time-rs/time</summary> ### [`v0.3.17`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0317-2022-11-06) [Compare Source](https://github.com/time-rs/time/compare/v0.3.16...v0.3.17) ##### Changed - The amount of code generated by `time::serde::format_description!` is reduced if not all feature flags are active. - `cargo test --tests` works with any configuration of feature flags. This occurs by spawning a subprocess that passes `--all-features`. `cargo test --doc` works with most combinations of feature flags, including the default. The combination of these changes means that crater will now run on `time`. - `libc` and `num_threads` are only included as dependencies when needed. They were previously unconditionally included. ##### Added - `time::format_description::parse_owned`, which returns an `OwnedFormatItem`. This avoids "lifetime hell", where all your structs now need a lifetime because a single field has one. Note that when possible, the borrowed format item (just called `FormatItem`) is still preferred, as it has significantly fewer allocations. The new `OwnedFormatItem` is usable for both formatting and parsing, as you would expect. ##### Compatibility - The parser for runtime format descriptions has been rewritten. A side effect of this is that some errors have slightly changed. No existing API has been altered, so this is not a breaking change. However, you may notice different errors, which are hopefully better! The parser for compile-time format descriptions has not yet been swapped out. If you notice any bugs, please file an issue. ### [`v0.3.16`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0316-2022-10-24) [Compare Source](https://github.com/time-rs/time/compare/v0.3.15...v0.3.16) ##### Changed - The minimum supported Rust version is now 1.60.0. - The `serde-well-known` feature flag is deprecated. The necessary features for an item to be enabled are indicated in documentation. - Feature gates have been loosened for well-known formats. ##### Added - `const`s can now be provided as the format description for `time::serde::format_description!`. The `const` must be of type `&[FormatItem<'_>]`, which is what is returned by the `time::macros::format_description!` macro. ```rust const TIME_FORMAT_ALT: &[FormatItem<'_>] = time::macros::format_description!("[hour]:[minute]"); time::serde::format_description!(time_format_alt, Time, TIME_FORMAT_ALT); ``` ##### Compatibility - Some feature flags have been removed. None of these have ever been documented as flags, so any use was unsupported. These flags are: - `js-sys` - `quickcheck-dep` - `itoa` - `time-macros` ### [`v0.3.15`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0315-2022-10-03) [Compare Source](https://github.com/time-rs/time/compare/v0.3.14...v0.3.15) ##### Changed - Better gating for `tm_gmtoff` extension. This should eliminate build failures on some untested platforms. - `Debug` output for types are now human-readable. While this should not be relied upon, it is currently the same as the output with `Display`. - Eliminate overflows in the constructors for \`Duration. When there is an overflow, the methods now panic. This was previously only the case in debug mode. - Panic if `NaN` is passed to `Duration::from_secs_f32` or `Duration::from_secs_f64`. ##### Fixed - Fix error when deserializing data types from bytes. This affects formats such as JSON. - Eliminate a panic in an edge case when converting `OffsetDateTime` to another `UtcOffset`. This occurred due to an old assumption in code that was no longer the case. ### [`v0.3.14`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0314-2022-08-24) [Compare Source](https://github.com/time-rs/time/compare/v0.3.13...v0.3.14) ##### Changed - The minimum supported Rust version is now 1.59.0. - `Duration::unsigned_abs` is now `const fn`. - The const parameter for `time::format_description::well_known::Iso8601` now has a default. This means `Iso8601` is the same as `Iso8601::DEFAULT`. - The `Parsed` struct has been reduced in size from 56 to 32 bytes (a 43% reduction). ### [`v0.3.13`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0313-2022-08-09) [Compare Source](https://github.com/time-rs/time/compare/v0.3.12...v0.3.13) ##### Fixed - wasm builds other than those using `wasm-bindgen` work again. ### [`v0.3.12`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0312-2022-08-01) [Compare Source](https://github.com/time-rs/time/compare/v0.3.11...v0.3.12) ##### Added - `js-sys` now supports obtaining the system's local UTC offset. ##### Changed - Performance of many `Date` operations has improved when using the `large-dates` feature. - While an internal change, `OffsetDateTime` now stores the value in the attached `UtcOffset`, not UTC. This leads to significant performance gains on nearly all `OffsetDateTime` methods. ##### Fixed - Subtracting two `Time`s can no longer panic. This previously occurred in some situations where the result was invalid. - ISO 8601 parsing rounds the subseconds to avoid incorrectly truncating the value. ### [`v0.3.11`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0311-2022-06-21) [Compare Source](https://github.com/time-rs/time/compare/v0.3.10...v0.3.11) ##### Fixed - \[[#&#8203;479](https://github.com/time-rs/time/issues/479)]: regression when parsing optional values with `serde` - \[[#&#8203;481](https://github.com/time-rs/time/issues/481)]: `Time` subtracted from `Time` can panic. This was caused by a bug that has always existed, in that an internal invariant was not upheld. Memory safety was not violated. ### [`v0.3.10`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0310-2022-06-19) [Compare Source](https://github.com/time-rs/time/compare/v0.3.9...v0.3.10) ##### Added - Serde support for non-self-describing formats - `Duration::unsigned_abs`, which returns a `std::time::Duration` - ISO 8601 well-known format - `Duration` can now be formatted with a `.N` specifier, providing a shorter representation when using `Display`. - Parse `null` as `None` on serde structs ##### Fixed - Fix incorrect parsing of UTC offset in `Rfc3339`. ##### Changed - The minimum supported Rust version is now 1.57.0. - Performance for `Rfc2822` has been improved. - Debug assertions have been added in a few places. This should have no user facing impact, as it only serves to catch bugs and is disabled in release mode. ### [`v0.3.9`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;039-2022-03-22) ##### Added - `time::serde::format_description!` - This macro is similar to `time::format_description!`, but it generates a module that can be used in `#[serde(with = "foo")]`. This makes it far easier to serialize/deserialize a custom format. - `Date::replace_year` - `Date::replace_month` - `Date::replace_day` - `Time::replace_hour` - `Time::replace_minute` - `Time::replace_second` - `Time::replace_millisecond` - `Time::replace_microsecond` - `Time::replace_nanosecond` - `PrimitiveDateTime::replace_year` - `PrimitiveDateTime::replace_month` - `PrimitiveDateTime::replace_day` - `PrimitiveDateTime::replace_hour` - `PrimitiveDateTime::replace_minute` - `PrimitiveDateTime::replace_second` - `PrimitiveDateTime::replace_millisecond` - `PrimitiveDateTime::replace_microsecond` - `PrimitiveDateTime::replace_nanosecond` - `OffsetDateTime::replace_year` - `OffsetDateTime::replace_month` - `OffsetDateTime::replace_day` - `OffsetDateTime::replace_hour` - `OffsetDateTime::replace_minute` - `OffsetDateTime::replace_second` - `OffsetDateTime::replace_millisecond` - `OffsetDateTime::replace_microsecond` - `OffsetDateTime::replace_nanosecond` - `Parsed::offset_minute_signed` - `Parsed::offset_second_signed` - `Parsed::set_offset_minute_signed` - `Parsed::set_offset_second_signed` - `Parsed::with_offset_minute_signed` - `Parsed::with_offset_second_signed` - `error::InvalidVariant` - `impl FromStr` for `Weekday` - `impl FromStr` for `Month` - `impl Display for Duration` ##### Deprecated The following methods have been deprecated in favor of the new, signed equivalent methods. The pre-existing methods - `Parsed::offset_minute` - `Parsed::offset_second` - `Parsed::set_offset_minute` - `Parsed::set_offset_second` - `Parsed::with_offset_minute` - `Parsed::with_offset_second` ##### Changed - Well-known formats that support leap seconds now return the `TryFromParsed::ComponentRange` error variant if the leap second could not occur at that given moment. ### [`v0.3.8`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;038-2022-02-22-YANKED) This release is broken and has been yanked. ### [`v0.3.7`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;037-2022-01-26) [Compare Source](https://github.com/time-rs/time/compare/v0.3.6...v0.3.7) ##### Fixed Solaris and Illumos build again. ### [`v0.3.6`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;036-2022-01-20) [Compare Source](https://github.com/time-rs/time/compare/v0.3.5...v0.3.6) ##### Added - `Date::saturating_add` - `Date::saturating_sub` - `PrimitiveDateTime::saturating_add` - `PrimitiveDateTime::saturating_sub` - `OffsetDateTime::saturating_add` - `OffsetDateTime::saturating_sub` - `PrimitiveDatetime::MIN` - `PrimitiveDatetime::MAX` - `Rfc2822` format description - Serde support for well-known formats - This is placed behind the new `serde-well-known` feature flag. ##### Changed - MacOS and FreeBSD are supported obtaining the local offset when single-threaded. - Starting with this version, this is delegated to the `num_threads` crate. - Leap seconds are now parsed as the final nanosecond of the preceding second. - The minimum supported Rust version is now 1.53.0. - Deserializers for human readable formats will fall back to the binary format if the human readable format fails to deserialize. ##### Fixed - Deserialization will no longer fail when given a non-borrowed string. ### [`v0.3.5`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;035-2021-11-12) [Compare Source](https://github.com/time-rs/time/compare/v0.3.4...v0.3.5) ##### Added - `Date::checked_add` - `Date::checked_sub` - `PrimitiveDateTime::checked_add` - `PrimitiveDateTime::checked_sub` - `OffsetDateTime::checked_add` - `OffsetDateTime::checked_sub` ##### Changed - Attempts to obtain the local UTC offset will now succeed on Linux if the process is single-threaded. This does not affect other Unix platforms. As a reminder, the relevant methods are fallible and may return an `Err` value for any reason. ### [`v0.3.4`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;034-2021-10-26) [Compare Source](https://github.com/time-rs/time/compare/v0.3.3...v0.3.4) ##### Added - `error::DifferentVariant` and `Error::DifferentVariant` - `impl From<Component> for FormatItem<'_>` - `impl TryFrom<FormatItem<'_>> for Component` - `impl<'a> From<&'a [FormatItem<'_>]> for FormatItem<'a>` - `impl<'a> TryFrom<FormatItem<'a>> for &[FormatItem<'a>]` - `impl PartialEq<Component> for FormatItem<'_>` - `impl PartialEq<FormatItem<'_>> for Component` - `impl PartialEq<&[FormatItem<'_>]> for FormatItem<'_>` - `impl PartialEq<FormatItem<'_>> for &[FormatItem<'_>]` - `impl TryFrom<Error> for error::TryFromParsed` - `impl TryFrom<Error> for error::Parse` - `impl TryFrom<Error> for error::ParseFromDescription` - `impl TryFrom<Error> for error::InvalidFormatDescription` - `impl TryFrom<Error> for error::IndeterminateOffset` - `impl TryFrom<Error> for error::Format` - `impl TryFrom<Error> for error::ConversionRange` - `impl TryFrom<Error> for error::ComponentRange` - `impl TryFrom<error::TryFromParsed> for error::ComponentRange` - `impl TryFrom<error::Parse> for error::TryFromParsed` - `impl TryFrom<error::Parse> for error::ParseFromDescription` - `impl TryFrom<error::Format> for std::io::Error` - `impl Sum for Duration` - `impl Sum<&Duration> for Duration` - A `const fn default()` has been added to all modifiers that are `struct`s. These methods exist to permit construction in `const` contexts and may be removed (without being considered a breaking change) once `impl const Default` is stabilized. - `FormatItem::Optional`, which will consume the contained value if present but still succeed otherwise. - `FormatItem::First`, which will consume the first successful parse, ignoring any prior errors. ##### Fixed - Cross-building to Windows now succeeds. - A parse error on a `UtcOffset` component now indicates the error comes from the offset. - Some arithmetic no longer panics in edge cases. ### [`v0.3.3`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;033-2021-09-25) [Compare Source](https://github.com/time-rs/time/compare/v0.3.2...v0.3.3) ##### Added - `Parsed::parse_item` - `Parsed::parse_items` - `Parsed::parse_literal` - Builder methods for `Parsed` - The `format_description!` macro now supports the `case_sensitive` modifier. ##### Changed The minimum supported version is now 1.51.0. ### [`v0.3.2`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;032-2021-08-25) [Compare Source](https://github.com/time-rs/time/compare/v0.3.1...v0.3.2) ##### Added - `Instant` is now `#[repr(transparent)]` ##### Fixed - Constructing a `Date` from its ISO year, week, and weekday now returns the correct value in all circumstances. Previously, dates with an ISO year less than zero may have returned incorrect values. This affects both the `Date::from_iso_week_date` method and the `date!` macro. ### [`v0.3.1`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0317-2022-11-06) [Compare Source](https://github.com/time-rs/time/compare/v0.3.0...v0.3.1) ##### Changed - The amount of code generated by `time::serde::format_description!` is reduced if not all feature flags are active. - `cargo test --tests` works with any configuration of feature flags. This occurs by spawning a subprocess that passes `--all-features`. `cargo test --doc` works with most combinations of feature flags, including the default. The combination of these changes means that crater will now run on `time`. - `libc` and `num_threads` are only included as dependencies when needed. They were previously unconditionally included. ##### Added - `time::format_description::parse_owned`, which returns an `OwnedFormatItem`. This avoids "lifetime hell", where all your structs now need a lifetime because a single field has one. Note that when possible, the borrowed format item (just called `FormatItem`) is still preferred, as it has significantly fewer allocations. The new `OwnedFormatItem` is usable for both formatting and parsing, as you would expect. ##### Compatibility - The parser for runtime format descriptions has been rewritten. A side effect of this is that some errors have slightly changed. No existing API has been altered, so this is not a breaking change. However, you may notice different errors, which are hopefully better! The parser for compile-time format descriptions has not yet been swapped out. If you notice any bugs, please file an issue. ### [`v0.3.0`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;030-2021-07-30) [Compare Source](https://github.com/time-rs/time/compare/v0.2.27...v0.3.0) ##### Added - `datetime!` macro, which allows the construction of a statically verified `PrimitiveDateTime` or `OffsetDateTime`. - `PrimitiveDateTime::replace_time` - `PrimitiveDateTime::replace_date` - `OffsetDateTime::replace_time` - `OffsetDateTime::replace_date` - `OffsetDateTime::replace_date_time` - `OffsetDateTime::replace_offset` - `#![no_alloc]` support - `Date::to_iso_week_date`, replacing `Date::iso_year_week` - `Date::MIN` - `Date::MAX` - `UtcOffset::from_hms` - `UtcOffset::from_whole_seconds` - `UtcOffset::as_hms` - `UtcOffset::whole_hours` - `UtcOffset::whole_minutes` - `UtcOffset::minutes_past_hour` - `UtcOffset::seconds_past_minute` - `UtcOffset::is_utc` - `UtcOffset::is_positive` - `UtcOffset::is_negative` - `OffsetDateTime::sunday_based_week` - `OffsetDateTime::monday_based_week` - `PrimitiveDateTime::to_calendar_date` - `PrimitiveDateTime::to_ordinal_date` - `PrimitiveDateTime::to_iso_week_date` - `PrimitiveDateTime::to_julian_day` - `OffsetDateTime::to_calendar_date` - `OffsetDateTime::to_ordinal_date` - `OffsetDateTime::to_iso_week_date` - `OffsetDateTime::to_julian_day` - `Time::as_hms` - `Time::as_hms_milli` - `Time::as_hms_micro` - `Time::as_hms_nano` - `PrimitiveDateTime::as_hms` - `PrimitiveDateTime::as_hms_milli` - `PrimitiveDateTime::as_hms_micro` - `PrimitiveDateTime::as_hms_nano` - `OffsetDateTime::to_hms` - `OffsetDateTime::to_hms_milli` - `OffsetDateTime::to_hms_micro` - `OffsetDateTime::to_hms_nano` - `Duration::saturating_add` - `Duration::saturating_sub` - `Duration::saturating_mul` - `util::days_in_year_month` - `Month` - `Instant::into_inner` - `impl AsRef<StdInstant>` and `impl Borrow<StdInstant>` for `Instant` - Support for obtaining the local UTC offset on Unix-like systems has been re-added under a user-provided flag. This functionality is not tested in any way and is not guaranteed to work. Library authors are unable to enable this feature, as it must be passed via `RUSTFLAGS`. Further information is available in the documentation. ##### Changed - The minimum supported Rust version is now 1.48.0. Per the policy in the README, this may be bumped within the 0.3 series without being a breaking change. - rand has been updated to 0.8. - quickcheck has been updated to 1.0. - Macros are placed behind the `macros` feature flag. - Renamed - `OffsetDatetime::timestamp` → `OffsetDateTime::unix_timestamp` - `OffsetDatetime::timestamp_nanos` → `OffsetDateTime::unix_timestamp_nanos` - `Date::try_from_ymd` → `Date::from_calendar_date` - `Date::try_from_yo` → `Date::from_ordinal_date` - `Date::try_from_iso_ywd` → `Date::from_iso_week_date` - `Date::as_ymd` → `Date::to_calendar_date` - `Date::as_yo` → `Date::to_ordinal_date` - `Date::try_with_hms` → `Date::with_hms` - `Date::try_with_hms_milli` → `Date::with_hms_milli` - `Date::try_with_hms_micro` → `Date::with_hms_micro` - `Date::try_with_hms_nano` → `Date::with_hms_nano` - `Time::try_from_hms` → `Time::from_hms` - `Time::try_from_hms_milli` → `Time::from_hms_milli` - `Time::try_from_hms_micro` → `Time::from_hms_micro` - `Time::try_from_hms_nano` → `Time::from_hms_nano` - `UtcOffset::try_local_offset_at` → `UtcOffset::local_offset_at` - `UtcOffset::as_seconds` → `UtcOffset::whole_seconds` - `OffsetDateTime::try_now_local` → `OffsetDateTime::now_local` - `Date::week` → `Date::iso_week` - `PrimitiveDateTime::week` → `PrimitiveDateTime::iso_week` - `OffsetDateTime::week` → `OffsetDateTime::iso_week` - `Date::julian_day` → `Date::to_julian_day` - All `Duration` unit values, as well as the minimum and maximum, are now associated constants. - `OffsetDateTime::unix_epoch()` → `OffsetDateTime::UNIX_EPOCH` - `Time::midnight()` → `Time::MIDNIGHT` - Now `const fn` (on at least newer compilers) - `Date::weekday` - `Date::next_day` - `Date::previous_day` - `PrimitiveDateTime::assume_offset` - `PrimitiveDateTime::weekday` - `Duration::checked_add` - `Duration::checked_sub` - `Duration::checked_mul` - `OffsetDateTime::from_unix_timestamp` - `OffsetDateTime::from_unix_timestamp_nanos` - `OffsetDateTime::date` - `OffsetDateTime::time` - `OffsetDateTime::year` - `OffsetDateTime::month` - `OffsetDateTime::day` - `OffsetDateTime::ordinal` - `OffsetDateTime::to_iso_week_date` - `OffsetDateTime::week` - `OffsetDateTime::weekday` - `OffsetDateTime::hour` - `OffsetDateTime::minute` - `OffsetDateTime::second` - `OffsetDateTime::millisecond` - `OffsetDateTime::microsecond` - `OffsetDateTime::nanosecond` - `OffsetDateTime::unix_timestamp` - `OffsetDateTime::unix_timestamp_nanos` - The following functions now return a `Result`: - `Date::from_julian_day` - `OffsetDateTime::from_unix_timestamp` - `OffsetDateTime::from_unix_timestamp_nanos` - The following functions now return an `Option`: - `Date::next_day` - `Date::previous_day` - The range of valid years has changed. By default, it is ±9999. When using the `large-dates` feature, this is increased to ±999,999. Enabling the feature has performance implications and introduces ambiguities when parsing. - The following are now gated under the `local-offset` feature: - `UtcOffset::local_offset_at` - `OffsetDateTime::now_local` - `Instant` is now guaranteed to be represented as a tuple struct containing a `std::time::Instant`. - Macros are guaranteed to be evaluated at compile time. - `Date::to_julian_day` now returns an `i32` (was `i64`). - `Date::from_julian_day` now accepts an `i32` (was `i64`). - Extension traits are only implemented for some types and are now sealed. As they are intended to be used with value literals, the breakage caused by this should be minimal. - The new `Month` enum is used instead of numerical values where appropriate. ##### Removed - v0.1 APIs, previously behind an enabled-by-default feature flag - `PreciseTime` - `SteadyTime` - `precise_time_ns` - `precise_time_s` - `Instant::to` - `Duration::num_weeks` - `Duration::num_days` - `Duration::num_hours` - `Duration::num_minutes` - `Duration::num_seconds` - `Duration::num_milliseconds` - `Duration::num_microseconds` - `Duration::num_nanoseconds` - `Duration::span` - `Duration::from_std` - `Duration::to_std` - Panicking APIs, previously behind a non-default feature flag - `Date::from_ymd` - `Date::from_yo` - `Date::from_iso_ywd` - `Date::with_hms` - `Date::with_hms_milli` - `Date::with_hms_micro` - `Date::with_hms_nano` - `Time::from_hms` - `Time::from_hms_milli` - `Time::from_hms_micro` - `Time::from_hms_nano` - APIs that assumed an offset of UTC, previously enabled unconditionally - `Date::today` - `Time::now` - `PrimitiveDateTime::now` - `PrimitiveDateTime::unix_epoch` - `PrimitiveDateTime::from_unix_timestamp` - `PrimitiveDateTime::timestamp` - `OffsetDateTime::now` - `impl Sub<SystemTime> for PrimitiveDateTime` - `impl Sub<PrimitiveDateTime> for SystemTime` - `impl PartialEq<SystemTime> for PrimitiveDateTime` - `impl PartialEq<PrimitiveDateTime> for SystemTime` - `impl PartialOrd<SystemTime> for PrimitiveDateTime` - `impl PartialOrd<PrimitiveDateTime> for SystemTime` - `impl From<SystemTime> for PrimitiveDateTime` - `impl From<PrimitiveDateTime> for SystemTime` - `UtcOffset::local_offset_at` — assumed UTC if unable to determine local offset - `OffsetDateTime::now_local` — assumed UTC if unable to determine local offset - Other APIs deprecated during the course of 0.2, previously enabled unconditionally - `Duration::sign` - `PrimitiveDateTime::using_offset` - `Sign` - Re-exports of APIs moved during the course of 0.2 - `days_in_year` - `is_leap_year` - `validate_format_string` - `weeks_in_year` - `ComponentRangeError` - `ConversionRangeError` - `IndeterminateOffsetError` - `ParseError` - `NumericalDuration` - `NumericalStdDuration` - `NumericalStdDurationShort` - All top-level macros - Lazy formatting, which was unidiomatic as a failure would have returned `fmt::Error`, indicating an error unrelated to the time crate. - `Time::lazy_format` - `Date::lazy_format` - `UtcOffset::lazy_format` - `PrimitiveDateTime::lazy_format` - `OffsetDateTime::lazy_format` - Support for stdweb has been removed, as the crate is unmaintained. - The `prelude` module has been removed in its entirety. - `Date::iso_year_week` in favor of `Date::to_iso_week_date` - `PrimitiveDateTime::iso_year_week` - `OffsetDateTime::iso_year_week` - `UtcOffset::east_hours` - `UtcOffset::west_hours` - `UtcOffset::hours` - `UtcOffset::east_minutes` - `UtcOffset::west_minutes` - `UtcOffset::minutes` - `UtcOffset::east_seconds` - `UtcOffset::west_seconds` - `UtcOffset::seconds` - `Date::month_day` - `PrimitiveDateTime::month_day` - `OffsetDateTime::month_day` - `Weekday::iso_weekday_number` (identical to `Weekday::number_from_monday`) - `ext::NumericalStdDurationShort` ### [`v0.2.27`](https://github.com/time-rs/time/compare/v0.2.26...v0.2.27) [Compare Source](https://github.com/time-rs/time/compare/v0.2.26...v0.2.27) ### [`v0.2.26`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0226-2021-03-16) [Compare Source](https://github.com/time-rs/time/compare/v0.2.25...v0.2.26) ##### Fixed - [#&#8203;316](https://github.com/time-rs/time/issues/316), where the build script was wrongly unable to determine the correct compiler version - Dependencies have been bumped to the latest patch version, ensuring compatibility. ### [`v0.2.25`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0225-2021-01-24) [Compare Source](https://github.com/time-rs/time/compare/v0.2.24...v0.2.25) ##### Fixed - Fix [#&#8203;309](https://github.com/time-rs/time/issues/309), which can cause panics in certain situations. ### [`v0.2.24`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0224-2021-01-08) [Compare Source](https://github.com/time-rs/time/compare/v0.2.23...v0.2.24) ##### Fixed - The implementation of `OffsetDateTime::timestamp`, `OffsetDateTime::unix_timestamp`, `PrimitiveDatetime::timestamp`, and `OffsetDateTime::unix_timestamp` have been corrected. This affects all negative timestamps with a nonzero subsecond value. ### [`v0.2.23`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0223-2020-11-17) [Compare Source](https://github.com/time-rs/time/compare/v0.2.22...v0.2.23) ##### Compatibility notes Due to [#&#8203;293](https://github.com/time-rs/time/issues/293), any method that requires knowledge of the local offset will now *fail* on Linux. For `try_` methods, this means returning an error. For others, it means assuming UTC. ##### Deprecated - `UtcOffset::timestamp` (moved to `UtcOffset::unix_timestamp`) - `UtcOffset::timestamp_nanos` (moved to `UtcOffset::unix_timestamp_nanos`) - `date` (moved to `macros::date`) - `time` (moved to `macros::time`) - `offset` (moved to `macros::offset`) - `OffsetDateTime::now_local` (assumes UTC if unable to be determined) - `UtcOffset::local_offset_at` (assumes UTC if unable to be determined) - `UtcOffset::current_local_offset` (assumes UTC if unable to be determined) ### [`v0.2.22`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0222-2020-09-25) [Compare Source](https://github.com/time-rs/time/compare/v0.2.21...v0.2.22) ##### Fixed - Solaris & Illumos now successfully build. - `Duration::new` could previously result in an inconsistent internal state. This led to some odd situations where a `Duration` could be both positive and negative. This has been fixed such that the internal state maintains its invariants. ### [`v0.2.21`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0221-2020-09-20) [Compare Source](https://github.com/time-rs/time/compare/v0.2.20...v0.2.21) ##### Changed - Implementation details of some error types have been exposed. This means that data about a component being out of range can be directly obtained, while an invalid offset or conversion error is guaranteed to be a zero-sized type. - The following functions are `const fn` on rustc ≥ 1.46: - `Date::try_from_iso_ywd` - `Date::iso_year_week` - `Date::week` - `Date::sunday_based_week` - `Date::monday_based_week` - `Date::try_with_hms` - `Date::try_with_hms_milli` - `Date::try_with_hms_micro` - `Date::try_with_hms_nano` - `PrimitiveDateTime::iso_year_week` - `PrimitiveDateTime::week` - `PrimitiveDateTime::sunday_based_week` - `PrimitiveDateTime::monday_based_week` - `util::weeks_in_year` ### [`v0.2.20`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0220-2020-09-16) [Compare Source](https://github.com/time-rs/time/compare/v0.2.19...v0.2.20) ##### Added - `OffsetDateTime::timestamp_nanos` - `OffsetDateTime::from_unix_timestamp_nanos` ##### Fixed A bug with far-reaching consequences has been fixed. See [#&#8203;276](https://github.com/time-rs/time/issues/276) for complete details, but the gist is that the constructing a `Date` from a valid Julian day may result in an invalid value or even panic. As a consequence of implementation details, this affects nearly all arithmetic with `Date`s (and as a result also `PrimitiveDateTime`s and `OffsetDateTime`s). ##### Improvements - Document how to construct an `OffsetDateTime` from a timestamp-nanosecond pair ### [`v0.2.19`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0219-2020-09-12) [Compare Source](https://github.com/time-rs/time/compare/v0.2.18...v0.2.19) ##### Fixed - The build script now declares a dependency on the `COMPILING_UNDER_CARGO_WEB` environment variable. - Parsing the `%D` specifier no longer requires padding on the month. Previously, `Err(InvalidMonth)` was incorrectly returned. - A `std::time::Duration` that is larger than `time::Duration::max_value()` now correctly returns `Ordering::Greater` when compared. - Multiplying and assigning an integer by `Sign::Zero` now sets the integer to be zero. This previously left the integer unmodified. ### [`v0.2.18`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0218-2020-09-08) [Compare Source](https://github.com/time-rs/time/compare/v0.2.17...v0.2.18) ##### Changed - The following functions are `const fn` on rustc ≥ 1.46: - `Date::try_from_ymd` - `Date::try_from_yo` - `Time::try_from_hms` - `Time::try_from_hms_milli` - `Time::try_from_hms_micro` - `Time::try_from_hms_nano` - An `error` module has been created where all existing error types are contained. The `Error` suffix has been dropped from these types. - An `ext` module has been created where extension traits are contained. - A `util` module has been created where utility functions are contained. - `error::ComponentRange` now implements `Copy`. For back-compatibility, all items that were moved to newly-contained modules have been re-exported from their previous locations (and in the case of the `error` module, with their previous name). ##### Fixes Parsing `format::Rfc3339` now correctly handles the UTC offset ([#&#8203;274](https://github.com/time-rs/time/issues/274)). ### [`v0.2.17`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0217-2020-09-01) [Compare Source](https://github.com/time-rs/time/compare/v0.2.16...v0.2.17) ##### Changed The following functions are `const fn` on rustc ≥ 1.46: - `Date::year` - `Date::month` - `Date::day` - `Date::month_day` - `Date::ordinal` - `Date::as_ymd` - `Date::as_yo` - `Date::julian_day` - `Duration::checked_div` - `PrimitiveDateTime::year` - `PrimitiveDateTime::month` - `PrimitiveDateTime::day` - `PrimitiveDateTime::month_day` - `PrimitiveDateTime::ordinal` - `Weekday::previous` - `Weekday::next` ##### Improvements - `size_of::<Date>()` has been reduced from 8 to 4. As a consequence, `size_of::<PrimitiveDatetime>()` went from 16 to 12 and `size_of::<OffsetDateTime>()` from 20 to 16. This change also results in a performance improvement of approximately 30% on the `Date::year` and `Date::ordinal` methods. - `cfg-if` has been removed as a dependency. ##### Fixed - `cfg` flags passed to rustc will no longer collide with other crates (at least unless they're doing something very stupid). - The crate will successfully compile with any combination of feature flags. Previously, some combinations would fail. ### [`v0.2.16`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0216-2020-05-12) [Compare Source](https://github.com/time-rs/time/compare/v0.2.15...v0.2.16) ##### Added `OffsetDateTime`s can now be represented as Unix timestamps with serde. To do this, you can use the `time::serde::timestamp` and `time::serde::timestamp::option` modules. ### [`v0.2.15`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0215-2020-05-04) [Compare Source](https://github.com/time-rs/time/compare/v0.2.14...v0.2.15) ##### Fixed `cargo-web` support works, and is now explicitly checked in CI. A previous change was made that made a method call ambiguous. ### [`v0.2.14`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0214-2020-05-02) [Compare Source](https://github.com/time-rs/time/compare/v0.2.13...v0.2.14) ##### Fixed Adding/subtracting a `core::time::Duration` now correctly takes subsecond values into account. This also affects `PrimitiveDateTime` and `OffsetDateTime`. ### [`v0.2.13`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0213-2020-05-01) [Compare Source](https://github.com/time-rs/time/compare/v0.2.12...v0.2.13) ##### Fixed Panicking APIs are re-exposed. ### [`v0.2.12`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0212-2020-04-30) [Compare Source](https://github.com/time-rs/time/compare/v0.2.11...v0.2.12) ##### Fixed Subtracting `Instant`s can correctly result in a negative duration, rather than resulting in the absolute value of it. ### [`v0.2.11`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0211-2020-04-27) [Compare Source](https://github.com/time-rs/time/compare/v0.2.10...v0.2.11) ##### Added - `OffsetDateTime::now_utc` ##### Deprecated - `OffsetDateTime::now` due to the offset not being clear from the method name alone. ##### Fixed `Date`s are now uniformly random when using the `rand` crate. Previously, both the year and day within the year were uniform, but this meant that any given day in a leap year was slightly less likely to be chosen than a day in a non-leap year. ##### Changed - MSRV is lowered to 1.32.0. ### [`v0.2.10`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0210-2020-04-19) [Compare Source](https://github.com/time-rs/time/compare/v0.2.9...v0.2.10) ##### Added - Support for formatting and parsing `OffsetDateTime`s as RFC3339. - Lazy formatting. To avoid exposing implementation details, we're just returning `impl Display`, rather than a concrete type. - Add support for Illumos. ##### Fixed - Deprecated APIs from time v0.1 are public again. They were previously hidden by accident in 0.2.9. ### [`v0.2.9`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;029-2020-03-13) [Compare Source](https://github.com/time-rs/time/compare/v0.2.8...v0.2.9) ##### Fixed `cfg-if` now has a mandatory minimum of 0.1.10, rather than just 0.1. This is because compilation fails when using 0.1.9. ### [`v0.2.8`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;028-2020-03-12) [Compare Source](https://github.com/time-rs/time/compare/v0.2.7...v0.2.8) ##### Added - `cargo_web` support has been added for getting a local offset. A general catch-all defaulting to UTC has also been added. - `Error::source` has been implemented for the wrapper `time::Error`. - `UtcOffset::try_local_offset`, `UtcOffset::try_current_local_offset`, `OffsetDateTime::try_now_local()` provide fallible alternatives when the default of UTC is not desired. To facilitate this change, `IndeterminateOffsetError` has been added. - Support for parsing and formatting subsecond nanoseconds. ##### Changed - `#[non_exhaustive]` is simulated on compilers prior to 1.40.0. ### [`v0.2.7`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;027-2020-02-22) [Compare Source](https://github.com/time-rs/time/compare/v0.2.6...v0.2.7) ##### Added - `Display` has been implemented for `Date`, `OffsetDateTime`, `PrimitiveDateTime`, `Time`, `UtcOffset`, and `Weekday`. - `Hash` is now derived for `Duration`. - `SystemTime` can be converted to and from `OffsetDateTime`. The following trait implementations have been made for interoperability: - `impl Sub<SystemTime> for OffsetDateTime` - `impl Sub<OffsetDateTime> for SystemTime` - `impl PartialEq<SystemTime> for OffsetDateTime` - `impl PartialEq<OffsetDateTime> for SystemTime` - `impl PartialOrd<SystemTime> for OffsetDateTime` - `impl PartialOrd<OffsetDateTime> for SystemTime` - `impl From<SystemTime> for OffsetDateTime` - `impl From<OffsetDateTime> for SystemTime` - All structs now `impl Duration<T> for Standard`, allowing usage with the `rand` crate. This is gated behind the `rand` feature flag. - Documentation can now be built on stable. Some annotations will be missing if you do this. - `NumericalDuration` has been implemented for `f32` and `f64`. `NumericalStdDuration` and `NumericalStdDurationShort` have been implemented for `f64` only. - `UtcOffset::local_offset_at(OffsetDateTime)`, which will obtain the system's local offset at the provided moment in time. - `OffsetDateTime::now_local()` is equivalent to calling `OffsetDateTime::now().to_offset(UtcOffset::local_offset_at(OffsetDateTime::now()))` (but more efficient). - `UtcOffset::current_local_offset()` will return the equivalent of `OffsetDateTime::now_local().offset()`. ##### Changed - All formatting and parsing methods now accept `impl AsRef<str>` as parameters, rather than just `&str`. `time::validate_format_string` does this as well. - The requirement of a `Date` being between the years -100,000 and +100,000 (inclusive) is now strictly enforced. - Overflow checks for `Duration` are now enabled by default. This behavior is the identical to what the standard library does. - The `time`, `date`, and `offset` macros have been added to the prelude. ##### Deprecated - `Sign` has been deprecated in its entirety, along with `Duration::sign`. To obtain the sign of a `Duration`, you can use the `Duration::is_positive`, `Duration::is_negative`, and `Duration::is_zero` methods. - A number of functions and trait implementations that implicitly assumed a timezone (generally UTC) have been deprecated. These are: - `Date::today` - `Time::now` - `PrimitiveDateTime::now` - `PrimitiveDateTime::unix_epoch` - `PrimitiveDateTime::from_unix_timestamp` - `PrimitiveDateTime::timestamp` - `impl Sub<SystemTime> for PrimitiveDateTime` - `impl Sub<PrimitiveDateTime> for SystemTime` - `impl PartialEq<SystemTime> for PrimitiveDateTime` - `impl PartialEq<PrimitiveDateTime> for SystemTime>` - `impl PartialOrd<SystemTime> for PrimitiveDateTime` - `impl PartialOrd<PrimitiveDateTime> for SystemTime>` - `impl From<SystemTime> for PrimitiveDateTime` - `impl From<PrimitiveDateTime> for SystemTime` ##### Fixed - Avoid panics when parsing an empty string ([#&#8203;215](https://github.com/time-rs/time/issues/215)). - The nanoseconds component of a `Duration` is now always in range. Previously, it was possible (via addition and/or subtraction) to obtain a value that was not internally consistent. - `Time::parse` erroneously returned an `InvalidMinute` error when it was actually the second that was invalid. - `Date::parse("0000-01-01", "%Y-%m-%d")` incorrectly returned an `Err` ([#&#8203;221](https://github.com/time-rs/time/issues/221)). ### [`v0.2.6`](https://github.com/time-rs/time/releases/tag/v0.2.6) [Compare Source](https://github.com/time-rs/time/compare/v0.2.5...v0.2.6) ##### Bug fixes v0.2.5 introduces a major inconsistency, not just in its behavior for `PrimitiveDateTime::using_offset`, but also changes its signature, rendering it incapable of being used in `const` contexts. Both the behavior and the function signature have been fixed, while still fixing the underlying issue. `PrimitiveDateTime::using_offset` mentions in the docs that the `PrimitiveDateTime` is assumed to be UTC, and is converted to the provided offset. This was the previous behavior. The following functionality had bugs that were fixed (from v0.2.4): - `OffsetDateTime::timestamp` - `OffsetDateTime::parse` - Equality, comparison for `OffsetDateTime` — Subsecond values were not checked previously. They also relied on the faulty timestamp implementation. - Hashing of `OffsetDateTime` — Same as equality and comparison. Additionally, hashes would collide with `PrimitiveDateTime` if the underlying UTC was the same. - Subtraction of two `OffsetDateTime`s previously disregarded the subsecond values. All of these changes are now checked in CI, so regressions will be caught. ### [`v0.2.5`](https://github.com/time-rs/time/releases/tag/v0.2.5) [Compare Source](https://github.com/time-rs/time/compare/v0.2.4...v0.2.5) ##### Bug fixes `PrimitiveDateTime::using_offset` was poorly defined, leading to an ambiguity that cause some methods to treat the existing datetime as UTC, while others treated it as the time in the provided offset. This release ensures that the behavior is what I intended — the datetime is assumed to be in the provided offset. NB: This release has been yanked from crates.io due to major back-compatibility issues. These have been fixed in 0.2.6. ### [`v0.2.4`](https://github.com/time-rs/time/releases/tag/v0.2.4) [Compare Source](https://github.com/time-rs/time/compare/v0.2.3...v0.2.4) v0.2.4 is identical to v0.2.3 with the exception of the breaking change, which has been reverted. v0.2.4 is backwards-compatible with v0.2.2. ### [`v0.2.3`](https://github.com/time-rs/time/releases/tag/v0.2.3) [Compare Source](https://github.com/time-rs/time/compare/v0.2.2...v0.2.3) v0.2.3 has been yanked from crates.io. The breaking change (with regard to feature flags) should not have been made. By yanking this version, any existing code will continue to work, while new code will not have potential backwards-incompatible behavior. The change was reverted in v0.2.4. ##### Additions - `time!`, `date!`, `offset!` macros - Top-level `parse` function, allowing for type inference. - `time::Result<T>` alias to `time::Result<T, time::Error>` ##### Deprecated Panicking APIs have been deprecated in favor of the new macros. ##### Changes Minimum supported Rust version is now 1.34, changed from 1.40. This permits a number of crates to upgrade without breaking MSRV. ##### Bug fixes A number of parsing methods used unchecked constructors. This was because the values *should* have been checked prior. They are now. ##### Breaking changes The "std" feature has been renamed to "alloc", which *disables* the standard library. This was necessary to bring MSRV down to 1.34. ### [`v0.2.2`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0226-2021-03-16) [Compare Source](https://github.com/time-rs/time/compare/v0.2.1...v0.2.2) ##### Fixed - [#&#8203;316](https://github.com/time-rs/time/issues/316), where the build script was wrongly unable to determine the correct compiler version - Dependencies have been bumped to the latest patch version, ensuring compatibility. ### [`v0.2.1`](https://github.com/time-rs/time/blob/HEAD/CHANGELOG.md#&#8203;0219-2020-09-12) [Compare Source](https://github.com/time-rs/time/compare/v0.2.0...v0.2.1) ##### Fixed - The build script now declares a dependency on the `COMPILING_UNDER_CARGO_WEB` environment variable. - Parsing the `%D` specifier no longer requires padding on the month. Previously, `Err(InvalidMonth)` was incorrectly returned. - A `std::time::Duration` that is larger than `time::Duration::max_value()` now correctly returns `Ordering::Greater` when compared. - Multiplying and assigning an integer by `Sign::Zero` now sets the integer to be zero. This previously left the integer unmodified. </details> <details> <summary>tokio-rs/tokio</summary> ### [`v1.21.2`](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.21.2): Tokio v1.21.2 [Compare Source](https://github.com/tokio-rs/tokio/compare/tokio-1.21.1...tokio-1.21.2) ### 1.21.2 (September 27, 2022) This release removes the dependency on the `once_cell` crate to restore the MSRV of 1.21.x, which is the latest minor version at the time of release. ([#&#8203;5048]) [#&#8203;5048]: https://github.com/tokio-rs/tokio/pull/5048 ### [`v1.21.1`](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.21.1): Tokio v1.21.1 [Compare Source](https://github.com/tokio-rs/tokio/compare/tokio-1.21.0...tokio-1.21.1) ### 1.21.1 (September 13, 2022) ##### Fixed - net: fix dependency resolution for socket2 ([#&#8203;5000]) - task: ignore failure to set TLS in `LocalSet` Drop ([#&#8203;4976]) [#&#8203;4976]: https://github.com/tokio-rs/tokio/pull/4976 [#&#8203;5000]: https://github.com/tokio-rs/tokio/pull/5000 ### [`v1.21.0`](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.21.0): Tokio v1.21.0 [Compare Source](https://github.com/tokio-rs/tokio/compare/tokio-1.20.2...tokio-1.21.0) ### 1.21.0 (September 2, 2022) This release is the first release of Tokio to intentionally support WASM. The `sync,macros,io-util,rt,time` features are stabilized on WASM. Additionally the wasm32-wasi target is given unstable support for the `net` feature. ##### Added - net: add `device` and `bind_device` methods to TCP/UDP sockets ([#&#8203;4882]) - net: add `tos` and `set_tos` methods to TCP and UDP sockets ([#&#8203;4877]) - net: add security flags to named pipe `ServerOptions` ([#&#8203;4845]) - signal: add more windows signal handlers ([#&#8203;4924]) - sync: add `mpsc::Sender::max_capacity` method ([#&#8203;4904]) - sync: implement Weak version of `mpsc::Sender` ([#&#8203;4595]) - task: add `LocalSet::enter` ([#&#8203;4765]) - task: stabilize `JoinSet` and `AbortHandle` ([#&#8203;4920]) - tokio: add `track_caller` to public APIs ([#&#8203;4805], [#&#8203;4848], [#&#8203;4852]) - wasm: initial support for `wasm32-wasi` target ([#&#8203;4716]) ##### Fixed - miri: improve miri compatibility by avoiding temporary references in `linked_list::Link` impls ([#&#8203;4841]) - signal: don't register write interest on signal pipe ([#&#8203;4898]) - sync: add `#[must_use]` to lock guards ([#&#8203;4886]) - sync: fix hang when calling `recv` on closed and reopened broadcast channel ([#&#8203;4867]) - task: propagate attributes on task-locals ([#&#8203;4837]) ##### Changed - fs: change panic to error in `File::start_seek` ([#&#8203;4897]) - io: reduce syscalls in `poll_read` ([#&#8203;4840]) - process: use blocking threadpool for child stdio I/O ([#&#8203;4824]) - signal: make `SignalKind` methods const ([#&#8203;4956]) ##### Internal changes - rt: extract `basic_scheduler::Config` ([#&#8203;4935]) - rt: move I/O driver into `runtime` module ([#&#8203;4942]) - rt: rename internal scheduler types ([#&#8203;4945]) ##### Documented - chore: fix typos and grammar ([#&#8203;4858], [#&#8203;4894], [#&#8203;4928]) - io: fix typo in `AsyncSeekExt::rewind` docs ([#&#8203;4893]) - net: add documentation to `try_read()` for zero-length buffers ([#&#8203;4937]) - runtime: remove incorrect panic section for `Builder::worker_threads` ([#&#8203;4849]) - sync: doc of `watch::Sender::send` improved ([#&#8203;4959]) - task: add cancel safety docs to `JoinHandle` ([#&#8203;4901]) - task: expand on cancellation of `spawn_blocking` ([#&#8203;4811]) - time: clarify that the first tick of `Interval::tick` happens immediately ([#&#8203;4951]) ##### Unstable - rt: add unstable option to disable the LIFO slot ([#&#8203;4936]) - task: fix incorrect signature in `Builder::spawn_on` ([#&#8203;4953]) - task: make `task::Builder::spawn*` methods fallible ([#&#8203;4823]) [#&#8203;4595]: https://github.com/tokio-rs/tokio/pull/4595 [#&#8203;4716]: https://github.com/tokio-rs/tokio/pull/4716 [#&#8203;4765]: https://github.com/tokio-rs/tokio/pull/4765 [#&#8203;4805]: https://github.com/tokio-rs/tokio/pull/4805 [#&#8203;4811]: https://github.com/tokio-rs/tokio/pull/4811 [#&#8203;4823]: https://github.com/tokio-rs/tokio/pull/4823 [#&#8203;4824]: https://github.com/tokio-rs/tokio/pull/4824 [#&#8203;4837]: https://github.com/tokio-rs/tokio/pull/4837 [#&#8203;4840]: https://github.com/tokio-rs/tokio/pull/4840 [#&#8203;4841]: https://github.com/tokio-rs/tokio/pull/4841 [#&#8203;4845]: https://github.com/tokio-rs/tokio/pull/4845 [#&#8203;4848]: https://github.com/tokio-rs/tokio/pull/4848 [#&#8203;4849]: https://github.com/tokio-rs/tokio/pull/4849 [#&#8203;4852]: https://github.com/tokio-rs/tokio/pull/4852 [#&#8203;4858]: https://github.com/tokio-rs/tokio/pull/4858 [#&#8203;4867]: https://github.com/tokio-rs/tokio/pull/4867 [#&#8203;4877]: https://github.com/tokio-rs/tokio/pull/4877 [#&#8203;4882]: https://github.com/tokio-rs/tokio/pull/4882 [#&#8203;4886]: https://github.com/tokio-rs/tokio/pull/4886 [#&#8203;4893]: https://github.com/tokio-rs/tokio/pull/4893 [#&#8203;4894]: https://github.com/tokio-rs/tokio/pull/4894 [#&#8203;4897]: https://github.com/tokio-rs/tokio/pull/4897 [#&#8203;4898]: https://github.com/tokio-rs/tokio/pull/4898 [#&#8203;4901]: https://github.com/tokio-rs/tokio/pull/4901 [#&#8203;4904]: https://github.com/tokio-rs/tokio/pull/4904 [#&#8203;4920]: https://github.com/tokio-rs/tokio/pull/4920 [#&#8203;4924]: https://github.com/tokio-rs/tokio/pull/4924 [#&#8203;4928]: https://github.com/tokio-rs/tokio/pull/4928 [#&#8203;4935]: https://github.com/tokio-rs/tokio/pull/4935 [#&#8203;4936]: https://github.com/tokio-rs/tokio/pull/4936 [#&#8203;4937]: https://github.com/tokio-rs/tokio/pull/4937 [#&#8203;4942]: https://github.com/tokio-rs/tokio/pull/4942 [#&#8203;4945]: https://github.com/tokio-rs/tokio/pull/4945 [#&#8203;4951]: https://github.com/tokio-rs/tokio/pull/4951 [#&#8203;4953]: https://github.com/tokio-rs/tokio/pull/4953 [#&#8203;4956]: https://github.com/tokio-rs/tokio/pull/4956 [#&#8203;4959]: https://github.com/tokio-rs/tokio/pull/4959 ### [`v1.20.2`](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.20.2): Tokio v1.20.2 [Compare Source](https://github.com/tokio-rs/tokio/compare/tokio-1.20.1...tokio-1.20.2) ### 1.20.2 (September 27, 2022) This release removes the dependency on the `once_cell` crate to restore the MSRV of the 1.20.x LTS release. ([#&#8203;5048]) [#&#8203;5048]: https://github.com/tokio-rs/tokio/pull/5048 </details> <details> <summary>tokio-rs/tracing</summary> ### [`v0.1.37`](https://github.com/tokio-rs/tracing/releases/tag/tracing-0.1.37): tracing 0.1.37 [Compare Source](https://github.com/tokio-rs/tracing/compare/tracing-0.1.36...tracing-0.1.37) This release of `tracing` incorporates changes from `tracing-core` [v0.1.30][core-0.1.30] and `tracing-attributes` [v0.1.23][attrs-0.1.23], including the new `Subscriber::on_register_dispatch` method for performing late initialization after a `Subscriber` is registered as a `Dispatch`, and bugfixes for the `#[instrument]` attribute. Additionally, it fixes instances of the `bare_trait_objects` lint, which is now a warning on `tracing`'s MSRV and will become an error in the next edition. ##### Fixed - **attributes**: Incorrect handling of inner attributes in `#[instrument]`ed functions ([#&#8203;2307]) - **attributes**: Incorrect location of compiler diagnostic spans generated for type errors in `#[instrument]`ed `async fn`s ([#&#8203;2270]) - **attributes**: Updated `syn` dependency to fix compilation with `-Z minimal-versions` ([#&#8203;2246]) - `bare_trait_objects` warning in `valueset!` macro expansion ([#&#8203;2308]) ##### Added - **core**: `Subscriber::on_register_dispatch` method ([#&#8203;2269]) - **core**: `WeakDispatch` type and `Dispatch::downgrade()` function ([#&#8203;2293]) ##### Changed - `tracing-core`: updated to [0.1.30][core-0.1.30] - `tracing-attributes`: updated to [0.1.23][attrs-0.1.23] ##### Documented - Added [`tracing-web`][tracing-web] and [`reqwest-tracing`][reqwest-tracing] to related crates ([#&#8203;2283], [#&#8203;2331]) Thanks to new contributors [@&#8203;compiler-errors](https://github.com/compiler-errors), [@&#8203;e-nomem](https://github.com/e-nomem), [@&#8203;WorldSEnder](https://github.com/WorldSEnder), [@&#8203;Xiami2012](https://github.com/Xiami2012), and [@&#8203;tl-rodrigo-gryzinski](https://github.com/tl-rodrigo-gryzinski), as well as [@&#8203;jswrenn](https://github.com/jswrenn) and [@&#8203;CAD97](https://github.com/CAD97), for contributing to this release! [core-0.1.30]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.30 [attrs-0.1.23]: https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.23 [`tracing-web`]: https://crates.io/crates/tracing-web/ [`reqwest-tracing`]: https://crates.io/crates/reqwest-tracing/ [#&#8203;2246]: https://github.com/tokio-rs/tracing/pull/2246 [#&#8203;2269]: https://github.com/tokio-rs/tracing/pull/2269 [#&#8203;2283]: https://github.com/tokio-rs/tracing/pull/2283 [#&#8203;2270]: https://github.com/tokio-rs/tracing/pull/2270 [#&#8203;2293]: https://github.com/tokio-rs/tracing/pull/2293 [#&#8203;2307]: https://github.com/tokio-rs/tracing/pull/2307 [#&#8203;2308]: https://github.com/tokio-rs/tracing/pull/2308 [#&#8203;2331]: https://github.com/tokio-rs/tracing/pull/2331 </details> <details> <summary>uuid-rs/uuid</summary> ### [`v1.2.2`](https://github.com/uuid-rs/uuid/releases/tag/1.2.2) [Compare Source](https://github.com/uuid-rs/uuid/compare/1.2.1...1.2.2) #### What's Changed - CI Cleanups by [@&#8203;KodrAus](https://github.com/KodrAus) in https://github.com/uuid-rs/uuid/pull/640 - Remove extern crate alloc by [@&#8203;KodrAus](https://github.com/KodrAus) in https://github.com/uuid-rs/uuid/pull/645 - Prepare for 1.2.2 release by [@&#8203;KodrAus](https://github.com/KodrAus) in https://github.com/uuid-rs/uuid/pull/646 **Full Changelog**: https://github.com/uuid-rs/uuid/compare/1.2.1...1.2.2 ### [`v1.2.1`](https://github.com/uuid-rs/uuid/releases/tag/1.2.1) [Compare Source](https://github.com/uuid-rs/uuid/compare/1.2.0...1.2.1) #### What's Changed - Fix up lost re-export of v1 Timestamp by [@&#8203;KodrAus](https://github.com/KodrAus) in https://github.com/uuid-rs/uuid/pull/636 - Prepare for 1.2.1 release by [@&#8203;KodrAus](https://github.com/KodrAus) in https://github.com/uuid-rs/uuid/pull/637 **Full Changelog**: https://github.com/uuid-rs/uuid/compare/1.2.0...1.2.1 ### [`v1.2.0`](https://github.com/uuid-rs/uuid/releases/tag/1.2.0) [Compare Source](https://github.com/uuid-rs/uuid/compare/1.1.2...1.2.0) #### What's Changed - formatting changes by [@&#8203;pintariching](https://github.com/pintariching) in https://github.com/uuid-rs/uuid/pull/610 - Remove outdated Travis CI reference by [@&#8203;atouchet](https://github.com/atouchet) in https://github.com/uuid-rs/uuid/pull/616 - refactors Timestamp, Context and ClockSequence, and adds UUIDS v6, v7, v8 by [@&#8203;rrichardson](https://github.com/rrichardson) in https://github.com/uuid-rs/uuid/pull/611 - migrate from winapi to windows_sys in examples by [@&#8203;sn99](https://github.com/sn99) in https://github.com/uuid-rs/uuid/pull/626 - Update windows-sys requirement from 0.36.1 to 0.42.0 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/uuid-rs/uuid/pull/628 - Some work on the new version features by [@&#8203;KodrAus](https://github.com/KodrAus) in https://github.com/uuid-rs/uuid/pull/625 - Implement now in wasm by [@&#8203;KodrAus](https://github.com/KodrAus) in https://github.com/uuid-rs/uuid/pull/630 - More work on docs by [@&#8203;KodrAus](https://github.com/KodrAus) in https://github.com/uuid-rs/uuid/pull/631 - hide draft versions behind the unstable cfg by [@&#8203;KodrAus](https://github.com/KodrAus) in https://github.com/uuid-rs/uuid/pull/633 - Prepare for 1.2.0 release by [@&#8203;KodrAus](https://github.com/KodrAus) in https://github.com/uuid-rs/uuid/pull/634 #### New Contributors - [@&#8203;pintariching](https://github.com/pintariching) made their first contribution in https://github.com/uuid-rs/uuid/pull/610 - [@&#8203;atouchet](https://github.com/atouchet) made their first contribution in https://github.com/uuid-rs/uuid/pull/616 - [@&#8203;sn99](https://github.com/sn99) made their first contribution in https://github.com/uuid-rs/uuid/pull/626 **Full Changelog**: https://github.com/uuid-rs/uuid/compare/1.1.2...1.2.0 </details> <details> <summary>Keats/validator</summary> ### [`v0.16.0`](https://github.com/Keats/validator/blob/HEAD/CHANGELOG.md#&#8203;0160-20220627) - Allow passing code/message to `required` - Add `does_not_contain` validator - Check email length before validating it </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yNDEuMTEiLCJ1cGRhdGVkSW5WZXIiOiIzNC4yMy4xIn0=-->
kjuulh force-pushed renovate/all from 329c971295 to a2849908a1 2022-11-06 00:49:45 +01:00 Compare
kjuulh force-pushed renovate/all from a2849908a1 to 29e8a96233 2022-11-06 01:40:36 +01:00 Compare
kjuulh force-pushed renovate/all from 29e8a96233 to 3e9e0469f9 2022-11-15 18:01:43 +01:00 Compare
kjuulh merged commit 3e9e0469f9 into main 2022-11-15 18:26:39 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kjuulh/como#13
No description provided.