Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deps): upgrade all dependencies and migrate as required #50

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

LeoniePhiline
Copy link

@LeoniePhiline LeoniePhiline commented Mar 20, 2024

I have signed the individual CLA.

I am working on an implementation of #49.

In preparation, dependencies need to be brought up to date.

chore(deps): update transitive dependencies

This changeset updates transitive dependencies, while keeping Cargo.toml untouched.

fix(deps): upgrade assert_cmd to 2

Migrate assert_cmd from version 1 to 2. No relevant breaking changes.

fix(deps): upgrade crossterm to 0.27

Migrate crossterm from version 0.24 to 0.27. No relevant breaking changes.

fix(deps): upgrade rprompt to 2.1.1

Migrate rprompt from version 1 to 2.

Code migration was applied, adapting fastmod to rprompt breaking API changes:

https://github.com/conradkleinespel/rprompt/releases/tag/v2.0.2

feat(deps): upgrade clap from 2 to 4, migrating to clap derive

This changeset migrates fastmod from clap 2.x to the latest clap 4.x, migrating code around breaking changes.

The arguments setup and retrieval is migrated to clap's much more maintainable derive syntax.

All arguments are migrated to function identically to their clap 2 counterparts.

fix(deps): update grep from 0.2 to 0.3

Migrate grep from version 0.2 to 0.3. No relevant breaking changes. (grep-searcher was upgraded from 0.1.7 to 0.2.1, but re-export grep::searcher is unused in fastmod.)

style: fix all clippy lints

Fixes all clippy lints, while not changing application behavior.


I will provide further patches updating direct crate dependencies.

@facebook-github-bot
Copy link
Contributor

Hi @LeoniePhiline!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@LeoniePhiline LeoniePhiline force-pushed the chore/update-transitive-dependencies branch from d574195 to 09dea5f Compare March 20, 2024 22:38
This changeset migrates `fastmod` from clap 2.x
to the latest clap 4.x, migrating code around
breaking changes.

The arguments setup and retrieval is migrated
to clap's much more maintainable `derive` syntax.

All arguments are migrated to function identically
to their clap 2 counterparts.
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 20, 2024
@LeoniePhiline LeoniePhiline changed the title chore(deps): update transitive dependencies update dependencies, then implement optional PCRE2 mode Mar 20, 2024
@LeoniePhiline LeoniePhiline changed the title update dependencies, then implement optional PCRE2 mode update dependencies, then implement optional PCRE2 mode, supporting lookarounds Mar 20, 2024
@LeoniePhiline LeoniePhiline force-pushed the chore/update-transitive-dependencies branch from 6bc7096 to 948e996 Compare March 20, 2024 23:48
@LeoniePhiline LeoniePhiline changed the title update dependencies, then implement optional PCRE2 mode, supporting lookarounds update dependencies, then implement optional --fancy mode, supporting lookarounds Mar 21, 2024
@LeoniePhiline LeoniePhiline changed the title update dependencies, then implement optional --fancy mode, supporting lookarounds Upgrade all dependencies Mar 21, 2024
@LeoniePhiline
Copy link
Author

LeoniePhiline commented Mar 21, 2024

@swolchok

This PR is meant as base for implementing opt-in fancy-regex support to allow for regex lookarounds.
However, the dependency upgrades are worth their own merge, and the fancy-regex feature might take some time.

If you can find time at all, I would very much appreciate if you could review this PR, and optionally cut a release (0.5.0).

All changes are logically grouped into individual commits and should be rather simple to review.
I definitely recommend reviewing commit by commit, rather than the combined PR diff.

Thank you very much!

@LeoniePhiline LeoniePhiline changed the title Upgrade all dependencies feat(deps): upgrade all dependencies and migrate as required Mar 21, 2024
Copy link
Contributor

@swolchok swolchok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the long delay; just now getting to my task backlog thanks to the impending holiday. In the future, using the GitHub request review feature on the PR. will give things a better chance of getting noticed.

let (maybe_escaped_regex, subst) = if matches.is_present("fixed_strings") {
(regex::escape(regex_str), subst.replace("$", "$$"))

let file_set = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, inlining this function does not make the code better. Why do we need to do it?


/// Regular expression to match.
#[arg(value_name = "REGEX")]
r#match: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is there a # in the middle of this identifier?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants