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

Dep Upgrade: fix tests and linter errors #1

Merged
merged 2 commits into from
Oct 12, 2022

Conversation

russmatney
Copy link
Collaborator

@russmatney russmatney commented Oct 12, 2022

I've been curious about neil and looking for more open source clojure contributions for a while - I saw this clojurians share, I thought I'd take a shot at it.

The problem is that the :dry-run flag was being ignored when used like this:

(test-util/neil "dep upgrade" :deps-file test-file-path :dry-run true)

(call site in the code)

In fact, :deps-file is ignored here too.

test-util/neil expects all the neil args in a string as the first argument - the rest are ignored (except for :out).

This PR:

  • updates test-util/neil to handle :deps-file and :dry-run explicitly
  • fixes a small linter error in babashka/neil.clj

It might be preferred to instead rewrite the call sites such that :dry-run is included in the first string arg:

(test-util/neil "dep upgrade :dry-run true" :deps-file test-file-path)

Supporting a passed :deps-file may one day be useful for allowing tests to run in parallel.

Feel free to merge or take whatever inspiration from this! Thanks for all the maintenance effort on these great tools!

This test helper now supports the args used by `dep_upgrade_test`, which
expected to set the :deps-file and a :dry-run flag.

It may be preferred to leave this as is, and instead build up the neil
command as a string (rather than support neil's args in this test helper).
@russmatney russmatney mentioned this pull request Oct 12, 2022
2 tasks
@teodorlu
Copy link
Owner

teodorlu commented Oct 12, 2022

Hi!

First of all, thanks for taking the time to look into this!

I'm in front of a PC now - I'll test your changes locally.

@russmatney russmatney merged commit b69c592 into teodorlu:dep-upgrade Oct 12, 2022
@russmatney russmatney deleted the dep-upgrade branch October 12, 2022 17:07
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

Successfully merging this pull request may close these issues.

2 participants