Releases: PaulDance/cargo-liner
Version 0.10.0
Features
-
Completed #27: in order to support Git and path packages more natively, the
shipsub-command now considers any such package as ifskip-checkwas set
for them in their configuration entry, therefore always passing them onto
Cargo that then performs the adequate checks and updates if need be, as
otherwise the version check could never succeed or be meaningful for them. -
Completed #28: a new
jettisonsub-command has been added; it enables one
to uninstall every package that is currently installed but that is not part
of the user configuration. This should help cleaning things up from time to
time and ensuring the configuration is fully applied, not just in an
additive fashion, but also in a subtractive one. A few different flags have
been added to it already, as well as the support for by-config, by-env and
by-CLI settings with negations and precedence, just likeship.
Testing
- Coverage for the new features.
Documentation
README.md- The implications between Git and path package variants and
skip-check
have been added to the user configuration section. - The
jettisonsub-command is now covered as well: a new dedicated section
and the associated configuration defaults part have been added. - Some links have been fixed.
- The implications between Git and path package variants and
CHANGELOG.md: this new version.
Miscellaneous
- The dependencies have been updated.
- The package has been transitioned to the Rust 2024 edition, therefore
necessarily bumping the MSRV to 1.85. - Some new lints regarding safety have been enabled.
- The fixtures have been updated for the small changes in Cargo.
- The
mainmodule has been split into various command modules for clarity,
thus changing some log paths. - The log indicating no package is to install or update with
shipafter its
version check has been changed in order to clarify the situation.
Version 0.9.0
Features
-
human-panichas been integrated into the program. It should enable
getting clearer and more engaging panic messages. Even though they should
not occur in the first place and have never been observed as of yet, having
this should still be useful just in case and give a nice polish. -
Completed #16:
cargo-binstallhas been integrated into theship
command. It effectively serves as an optional alternate installation method
replacingcargo installwhen used. The usual CLI, environment, defaults,
and per-package configuration controls are included. See its dedicated
section of theREADME.mdfor more details. -
Completed #26: a new
--dry-runoption has been added to theship
command. It enables simulating most of the usual operation without going as
far as actually performing the installations. For now, it is also passed
ontocargo-binstalland so is instantiated as per the usual, but not to
cargo installthat does not have it stabilized yet, so its calls are
entirely simulated with a simple log instead.
Testing
- A test has been added in order to confirm self-update customization through
configuration works as expected so the documentation would not lie. - The fixtures have been updated in order to be compatible with Cargo 1.83, so
is now the expected development version. - Coverage for the new features.
cargo-binstall's is somewhat lightweight:
see theREADME.md's section about it for more details.
Documentation
README.md:- A paragraph has been added to the configuration section in order to
clarify that it can also be used to customize self-updating. - Documentation for the new features has been added, including for
cargo-binstalleverywhere applicable and with a dedicated section. --lockedis now mentioned in the installation instruction as a small
reminder in case a problem occurs purely due to the dependencies locking.- The configuration semi-formal specification's boolean sites have been
replaced with actualtrueandfalseexamples instead ofboolean.
This enables proper parsing and syntax highlighting while the rest of the
specification already used examples, so a bit of unification as well. - A comment has been added in order to clarify the distinction between the
default command and theshipsub-command with respect to options so #25
may be compensated a bit. Towards the same objective, the concerned error
message has been adjusted a bit in order to make it more explicit that the
option should be used with the sub-commmand so confusion could be reduced. - A new section has been added for a (resemblance of an) MSRV policy.
- A paragraph has been added to the configuration section in order to
CONTRIBUTING.md: the comment about thecargo-test-*development-only
dependencies has been removed as it is not applicable anymore.CHANGELOG.md: this new version.
Miscellaneous
- The MSRV has been bumped to 1.81 for:
- A few more Clippy lints have been enabled.
- A typo has been fixed in an error message regarding the handling of
environment variables. - The dependencies have been updated.
Version 0.8.0
Features
-
The version check result table now has its status icons also colorized so
that relevant information may be more easily be visible to the observer. Its
actual colorization can be controlled through the usual means, just as the
logging. -
This same table now has its
Statuscolumn split into three:Old version,
New version, andStatusthat now only contains the colored icon. This
should help make things clearer instead of cramping everything into a single
column. -
At the end of its run, the
shipcommand now displays an installation
report. It consists of a table summarizing what was done for each package
that ended up being selected for installation. This should help to more
easily get an understanding of what was performed after all installations
were done as they can output quite a lot of lines. It is not displayed if
nothing was performed at all. It also respects the effects of the
--skip-checkand--no-fail-fastflags. -
An much more important part of the
cargo installCLI is now available
through dedicated package configuration items. This should enable supporting
many more use cases. -
The configuration now enables setting the
--skip-checkand--no-fail-fast
CLI flags of theshipcommand on a package-per-package basis instead of
necessarily on a global basis. The CLI flags keep precedence, however. See
their documentation for more details. -
Flag negations have been implemented for the
shipcommand. They override
with their non-default counterpart. This should enable more script-friendly
usage. -
A new
defaultsconfiguration section has been added. It enables setting
CLI flags to be used by default without having to specify them manually
every time. The CLI keeps precedence, however. See its documentation for
more details. -
These defaults can also be set through dedicated environment variables using
thetrueorfalsevalues, just as the configuration. They have
precedence over the configuration, but the CLI keeps the general precedence.
This completes the usual CLI + environment + configuration triptych.
Testing
- Coverage for the new features.
- The test fixtures now use the new
[ROOT]and[ELAPSED]meta variables of
the latest versions of Snapbox in order to reduce the amount of manual
intervention required when updating fixtures so flakiness may be kept away. - In these same fixtures, the source file redaction has been unified similar
reasons. - The
cargo-test-*dev-dependencies are now taken from crates.io instead of
Cargo's repository, which removes all the peculiar warnings that there were.
Documentation
- The displayed tables and the meaning of their status icons is now documented.
- The example configurations have been fixed as they were actually not valid.
- The new configuration capabilities have been added to the specification and
examples. - The distinction between our
--no-fail-fastand Cargo equivalents has been
clarified in order to ensure no confusion could exist. - The configuration specification is now indented by object depth for clarity.
Miscellaneous
- New development lints have been manually added.
backtraceis now always built with optimizations, even when not building
with--release, so that the performance issues that occur with the debug
build may not impact development as much anymore.- The dependencies have been updated.
- The
shipflag--keep-goinghas been renamed to--no-fail-fastin order
to clarify the distinction with Cargo's flag and enable easier consistency
with the new configuration item without adding useless confusion.
Version 0.7.0
Features
-
Completed #24: a new
completionssubcommand has been introduced in order
to enable one to generate shell CLI auto-completion scripts for the program
this project delivers. More could be added to this in the future, but for
now, the simplest is to add it to one's shell configuration to be loaded at
each startup so it may be dynamically up-to-date. -
Completed #11: a new
--keep-goingCLI option has been added to theship
subcommand. It enables one to bypass the new by-default fail-fast behavior
of the command in order to make it ignorecargo installerrors instead and
continue on calling it for other packages. This can be used as a way to
still install or update the remaining packages when one fails, but not
without having read the error message first and decided what was the best
course for remediation beforehand. -
Completed #23's first part: a new
extra-argumentspackage option has been
added to the user configuration file. It enables one to specify additional
CLI arguments that should be given to the call tocargo installassociated
with the concerned package. They are not used for other packages. -
Completed #23's second part: a new
environmentpackage option has been
added to the user configuration file. It enables one to specify environment
variable names and values that should be set for thecargo installprocess
spawned for the associated package. They are not used for other packages.
Fixes
- Part of #11: previously, whenever some package would fail to install for any
reason reported by Cargo, the overall operation would always ignore the
error as it was simply not checked and continue on with the rest of the
packages, which somewhat worked, but wasn't the clearest as the message
could simply slip by unnoticed among the rest of the numerous Cargo output
lines. Now, the exit status of thecargo installprocess is properly
checked and when unsuccessful, makes the overall operation stop as soon as
possible, thus making it fail-fast by default.
Testing
- The fixtures have been updated to take changes to Cargo, dependencies and
internal refactors into account. - Added coverage for the new fixes and features.
Documentation
README.md:- Fixed a link to cargo install docs.
- Added a clarification about what the
importsubcommand ignores by
default and that was missing in the previous release. - Added the missing documentation about the various configuration sections,
expected and optional, and how and what they are used for. - Documented the new features.
CHANGELOG.md: new version.
Miscellaneous
- The dependencies have been updated.
- Recent changes to Cargo and Clippy have been taken into account.
- More lints have been enabled on the codebase.
- Added a suggestion message to use the
importsubcommand whenshipfails
because of theliner.tomlconfiguration file's not existing. - The global error message displayed when an installation fails has been
adapted to take into account whether--keep-goinghas been used or not so
it may be a bit clearer and explicit. - Added a suggestion message to the error message displayed when
shipis
called andcargo installfails, to use the--keep-goingoption when not
set. This should guide one to use the new feature when appropriate.
Version 0.6.0
Features
-
Merged #19 that closed #13: the version report displayed early in the
execution of theshipsubcommand now usestabledin order to present
it in the form of a table, which looks much better while only requiring
little code to achieve it. An example of it can be found in the updated
README.md. Many thanks to @ToBinio. -
Merged #22 that closed #21: the
importsubcommand now ignores by default
all locally-installed packages, i.e. the ones installed throughcargo
install --path=.... This should help to avoid poluting the destination
configuration file with packages that cannot be updated anyway since they
have no guarantee of existing in the registry used. If the previous behavior
is still desired however, a new--keep-localCLI option has been added for
this reason. As a side-effect,--keep-self's shorthand-khas been
changed to-sin order to make room for the new option's-l. Many thanks
to @ToBinio. -
The error reporting has been completely overhauled in order to add context
through the call stacks. Thanks tocolor-eyre, the errors now transport
additional information indicating what exactly failed, why it could have
happened so and how it could be fixed. This should help users diagnose and
fix the usual issues quicker, such as missing files. It should also combine
well with the CLI verbosity controls in case more precise debugging is still
required as they now also control the verbosity of these error reports: when
-vis given, theRUST_BACKTRACE=1format is used and when-vvor more
is given,RUST_BACKTRACE=fullis used; when-qqqor more is given, the
error report is entirely skipped. It is also not displayed in the logs
anymore, since the whole point is to have a proper termination type.
Fixes
-
Merged #20: the build was broken for Windows because of some Unix-specific
API that slipped in; it is now fixed. GNU/Linux is still the only platform
tested in CI, but the others should work fine. Thanks to @ToBinio. -
Made sure the exit status code of the
cargo searchchild processes spawned
in order to fetch the latest versions of the configured packages was checked
before continuing. Previously, only errors specifically related to spawning
and waiting for them were checked and bubbled up, but no manual check was
actually done on the status code. The reported error should now be clearer.
Testing
The fixtures have been updated and new tests have been added for:
- The change of the version report.
- The new
importfiltering feature and its--keep-localoption. - The new error reporting.
Documentation
CONTRIBUTING.md:- Added a mention for GPG signing as a requirement.
- Added precisions about the development environment used.
- Added a mention for the new error contexts.
README.md:- Updated the CLI help usage messages for the new features: the new import
option and the changed error reporting. - Fixed the link to Cargo's
installdocumentation. - Wrapped the example output lines to 69 columns at most. It was previously
done at 70, but was apparently still too much by one for crates.io.
Hopefully, it is now correct. - Updated the crates.io download stats badge's link to point at the bottom
of the page in order to provide quicker access. Hopefully, it will work.
- Updated the CLI help usage messages for the new features: the new import
CHANGELOG.md:- Fixed a random typo lost somewhere.
- Made a hidden version notes template for quicker releases.
- Added a new version.
Miscellaneous
- The dependencies have been updated, which required updating some testing
code to adapt to the changes included in Snapbox. - Introduced a stricter Rustfmt configuration for more control over the
automatic formatting and to enforce things done manually. - Introduced a Justfile in order to provide some command shortcuts useful
during development. - The MSRV has been bumped to 1.76 in order to use
Result::inspect_err.
Version 0.5.0
Features
-
Added a new global CLI option:
--color. As its name indicates, it controls
the output coloring of logs and calls to Cargo. It takes precedence over any
kind of environment variables. -
When using one
--verboseor more, theshipcommand now allows calls to
the internalcargo searchto inherit its standard error stream. This helps
in debugging. During normal operation, it displays messages related to index
and lock files management. -
The verbosity controls now also control Cargo's own verbosity:
- When
--verboseis used twice, then-vis passed to it. - When
--verboseis used three times or more, then-vvis passed to it. - When
--quietis used three times or more, then-qis passed to it.
- When
Fixes
- Made sure the CLI verbosity controls had precedence over the environment:
its variables were previously parsed after the CLI options were applied on
the logging configuration, which was incorrect; the two have therefore been
switched in order to fix the issue.
Testing
-
Implemented integration tests to ensure the output of
--helpusage
messages and other example outputs in theREADME.mdwere correct and could
be automatically updated, thanks totrycmd. -
Completed #10: using
snapboxand Cargo's own testing framework, many
integration tests have been implemented to cover the various features this
project offers:- The fact that
cargo searchis used in order to check if new versions are
available and that it works. Previously, these tests were disabled in CI
because the external connections were blocked. Thanks to the new testing
framework however, they were refactored to be offline and therefore set to
run again in CI. They were also made single-threaded in order to avoid
some observed flakiness since the framework does not seem to fit unit
tests the best. - The
importsubcommand: ensure all combinations of CLI options produce
correct and expected configurations. - The
shipsubcommand:- Test CLI options combinations.
- Test install, update and no action.
- Test that the feature control of the configuration is correctly passed
onto the installation process.
- The CLI verbosity control: ensure log messages and Cargo verbosity are
controlled correctly. - The bugs previously fixed: regression tests.
- The fact that
Documentation
- Updated
README.mdmultiple times when the above integration tests were
added. This included wrapping to 70 columns instead of 80 in order to make
the blocks present better on crates.io. - Removed a useless newline in the code of conduct.
- Updated the contributing guidelines in order to mention the new tests.
- Documented the new features in the CLI help messages.
- The precedence of the verbosity CLI options over the environment has been
clarified.
Miscellaneous
- The dependencies have been updated.
- The new Git dev-dependencies introduce Cargo warnings that cannot be
disabled. However, it is purely restricted to local usages and will not
affect normal installations whatsoever. The issue is to be fixed in Cargo. - The
actions/checkoutGitHub Action has been updated.
Version 0.4.3
Fixes
- Merged #14: previously, if the
CARGO_TERM_COLORenvironment variable was
set toalways, then the calls tocargo searchandcargo configwould
fail as their respective output contained unexpected control sequences; the
fix was therefore to always disable colors for every such call by adding the
--color=neverargument to each invoked Cargo process.cargo installwas
left untouched in this regard, however. Thanks to @pavel-procopiuc.
Miscellaneous
- The dependencies have been updated.
- The MSRV has been downgraded to
1.70.0. This is effectively a revert of
the previous version's change. The bump has been reported in #14 to be too
restrictive and the previous MSRV to work just fine.
Version 0.4.2
Fixes
-
Fixed #7: previously, if a configured package name started with a
-, then
the underlying call to Cargo would fail as expected since there is no
package starting with such a character, however not on a search failure, but
on a CLI parsing error: the name would be interpreted as a CLI option
because there was no sanitization of package names. In order to fix it,
rather than to implement actual parameter sanitization or validation, the
missing--CLI option-argument separator was added to corresponding calls
tocargo install. This way, any package name may be used and does not
change the overall behavior. The registry is the one that does the
validation, which is the most desirable. -
Fixed #6: before, the version parsing logic used to extract the latest
version from the results of the call tocargo searchwould be too strict
and reject potential metadata suffixes, such asv0.9.62-a.2or
v13.0.0-alpha.0. In order to fix this, the initial extraction was relaxed
to accept a larger set of strings, but still piped into
semver::Version::parse, which means the overall parsing is still strict,
but more correct. -
Merged #9: previously, the global process would always exit on a success
status code, whether an error was encountered or not, which meant users
could not detect such cases in an automated environment. This was fixed by
returning the standard failure exit code of the current platform in case
an error is encountered and a success otherwise. Thanks to @Johnabell.
Miscellaneous
- The error messages related to a
cargo searchhave been extended a bit in
order to give a little bit more help to the user about the potential source
of the true underlying issue: does the package actually exist? - The dependencies have been updated.
- The MSRV has been bumped to
1.75.0.
Version 0.4.1
Fixes
- Fixed #5: before, the Cargo
.crates.tomlfile would be read even if
--skip-checkwas specified although it only used its contents in order to
adjust a small part of the logging display that was somewhat useless; the
option now also ensures reading from this file is avoided as well, which
makes it even more able to work around some potential future bugs. - Fixed #4: the
$CARGO_INSTALL_ROOTconfiguration possibility was previously
not supported by the.crates.toml-reading operations, making the tool thus
completely fail whenever used in such an environment; it now supports it
entirely by wrapping calls tocargo config getin order to retrieve its
value from either the environment or theinstall.rootconfiguration key of
the$CARGO_HOME/config.tomlfile, and falling back to the default
$CARGO_HOME/.crates.tomlif that fails for any reason, the simple absence
of the setting being one of them. Whenever the first fails, it is logged as
aDEBUGmessage before attempting the default, so use-vvto investiguate
if your configuration seems not to be taken into account.
Documentation
README.md:- Updated the verbatim help message of the
shipcommand. - Simplified the description of the default command's operation to be a bit
more summarized and then redirect to the more in-depth description found
in theshipcommand's specific documentation section. - Mention the new
$CARGO_INSTALL_ROOTsupport in various places. - Reformat the configuration examples to wrap long lines: better readability.
- Some small rewordings.
- Updated the verbatim help message of the
Miscellaneous
- The dependencies have been updated.
- Logging now uses pretty debug formatting, which splits arrays and structures
onto multiple lines, therefore making reading long messages more comfortable. - The MSRV has been bumped to
1.70.0.
Version 0.4.0
Features
- The log messages will now display whether a package is already installed
upon running theshipcommand when it is configured: eitherInstalling
when it was not previously installed orUpdatingon the contrary will be
mentionned in the messages. - The
shipcommand now usescargo searchin order to fetch the latest
available version for each configured package before callingcargo install
only for each of them that do indeed need an install or update when either
not installed or installed with a version strictly older than the latest.
The calls tocargo searchare done in parallel, making this version check
quite fast, therefore saving a lot of time by avoiding callingcargo install
sequentially for each already-up-to-date package. - The
shipcommand now displays a summarized update plan before running the
actually necessary calls tocargo install. That makes the overall
operation a bit more transparent and readable. - A new
--skip-checkoption flag has been added to theshipcommand. As
its name suggests, it enables one to skip the version check entirely. That
means it will restore the previous simple behavior: runcargo installfor
each configured package, whether it needs an install or update or not. Most
of the time, when updating already-installed packages for example, it will
not prove very useful. However, it can be a bit quicker to use it when only
very few packages are configured or if all or almost all are not alredy
installed. It overall enables one to have a bit more control over the global
operation of the tool, in case of an unexpected bug for example. - The new
--forceoption flag has been implemented for theshipcommand.
It simply passes it onto each call tocargo install: see its documentation
for more information about it. When used in conjunction with--skip-check
for example, it will redownload, recompile and reinstall each of the
configured packages: use it only when truly necessary.
Documentation
README.md:- Updated the example output to reflect the changes from the previous
release but from this one as well. - Removed some useless trailing spaces.
- New features.
- Updated the example output to reflect the changes from the previous
Testing
- New tests have been added for the new CLI features, but also for the new
functions wrapping calls tocargo search. - The GitHub Actions CI is now configured to skip the tests for these new
search functions: the corresponding network calls seem to be filtered
somehow.