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

Replace strings nicely #2

Open
1 of 3 tasks
justinrubek opened this issue Jan 7, 2023 · 1 comment
Open
1 of 3 tasks

Replace strings nicely #2

justinrubek opened this issue Jan 7, 2023 · 1 comment

Comments

@justinrubek
Copy link
Owner

justinrubek commented Jan 7, 2023

The current implementation is a quick and dirty regex lookup. As a result some care has to be taken with package names. For example, if a short (and common) pattern like "cli" is given then a Cargo.lock might have multiple crates that could be matched and incorrectly replaced.

My strategy this far has been to carefully name packages and manually ensure that dependencies don't get bumped. This isn't ideal and I think it'd be a good idea to try to add support for different types of files. In the config there could be a replacement-type with values such as cargo-toml, cargo-lock, and regex.

@justinrubek
Copy link
Owner Author

Should there be a top-level configuration value for all of these? cargo is currently at the top-level of configuration, but I think it may be a good idea to change the configuration to something like this: ( replacers: [ cargo: ... ])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant