Skip to content
Compare
Choose a tag to compare
@BD103 BD103 released this 30 Oct 20:38
· 6 commits to main since this release

This is a major version of cargo-sweep that sports a complete program redesign, faster runtimes, and stability fixes.

- name: Sweep cache for stale files
  uses: BD103/cargo-sweep@v2.0.0

If you'd like to opt-in to bug fixes and non-breaking changes, you can also specify the v2 tag:

- name: Sweep cache for stale files
  uses: BD103/cargo-sweep@v2

Removal of cargo-sweep

This action no longer installs the cargo-sweep binary. Instead, it implements cargo-sweep's logic completely from scratch in Javascript. This completely removes the need to compile, cache, or download anything other than this action, resulting in much faster runtimes. (Both the main and post actions now take less than a second to complete. In comparison, v1.3.0 took about 3 seconds to when cargo-sweep was cached and 17 seconds when it was not.)

Even with this removal in mind, the action name of BD103/cargo-sweep will still be kept in order to prevent breaking changes for existing projects.

Specify Manifest Path

It is now possible to specify the path to Cargo.toml when calling this action. This path is used to locate the target directory that will be swept:

- name: Sweep cache for stale files
  uses: BD103/cargo-sweep@v2
  with:
    manifest-path: path/to/Cargo.toml

All other inputs (use-cache, use-prebuilt, and gh-token) have been removed.

Size Pruning

Many dependencies have been removed, significantly decreasing the size of the bundled Javascript. The source code itself has also been shrunk, as the logic has become simpler, reducing the chances of bugs and edge-cases.

Bundled Javascript v1.3.0 v2.0.0
main/index.js 4.9 MB 970 KB
post/index.js 2.6 MB 973 KB

Diagnostics Improvements

This action now has better diagnostics when debug logging is enabled, meaning failures should be easier to inspect and troubleshoot. Because the sweeping functionality is hand rolled, this action currently does not compute the total amount of bytes cleaned, but that is planned for a future update.

Prebuilt Binaries are now Disabled

Ever since the original v1.0.0 this action had support for installing prebuilt versions of cargo-sweep. Because this action no longer uses cargo-sweep, prebuilt binaries are no longer being generated. The latest run ran last Sunday, on the 27th of October. Its artifacts will expire in 3 weeks, on the 17th of November, meaning all pre-v2.0.0 versions with prebuilt enabled will fail after then.

If you do not want to migrate to v2.0.0, I strongly suggest upgrading to v1.3.0 and using cached binaries instead.

Full Changelog: v1.3.0...v2.0.0