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

Fetch latest stable slipset/deps-deploy, instead of hard-coding #206

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

vedang
Copy link
Contributor

@vedang vedang commented Mar 17, 2024

This is a minor change, which removes the hard-coding of the slipset/deps-deploy version in the build-alias function.

I have tested the change locally using bbin, and see that neil add build now uses slipset/deps-deploy {:mvn/version "0.2.2}

Closes: #205

Please answer the following questions and leave the below in as part of your PR.

This is a minor change, which removes the hard-coding of the
`slipset/deps-deploy` version in the `build-alias` function.

I have tested the change locally using `bbin`, and see that `neil add
build` now uses `slipset/deps-deploy {:mvn/version "0.2.2}`
@vedang vedang force-pushed the fix/fetch-latest-deps-deploy branch from a125f51 to ad8b34e Compare March 17, 2024 16:59
@borkdude
Copy link
Contributor

Some tests need some love I guess

@vedang
Copy link
Contributor Author

vedang commented Mar 19, 2024

My bad! I didn't run the tests locally.

I looked at the test results. They are unrelated to the current PR, but seem easy to fix. I'll fix them in a new commit and push the commit to this PR.

The following tests were breaking before the changes in this commit:

```
FAIL in (latest-version-test) (dep_add_test.clj:9)
expected: (= "1.11.1" (neil/latest-stable-mvn-version (quote org.clojure/clojure)))
  actual: (not (= "1.11.1" "1.11.2"))

FAIL in (dep-upgrade-test-using-git-tags) (dep_upgrade_test.clj:71)
deps can be added with --tag
expected: (= "v2022.03.08" (:git/tag original))
  actual: (not (= "v2022.03.08" "v2024.03.13"))

FAIL in (dep-upgrade-test-using-git-tags) (dep_upgrade_test.clj:79)
deps with :git/tag coords upgrade to latest tags
expected: (= "v2022.03.08" (:git/tag original))
  actual: (not (= "v2022.03.08" "v2024.03.13"))

FAIL in (dep-upgrade-test-using-git-tags) (dep_upgrade_test.clj:84)
deps with :git/tag coords upgrade to latest tags
expected: (not= (:git/tag original) (:git/tag upgraded))
  actual: (not (not= "v2024.03.13" "v2024.03.13"))
```

The reasons for this are:

1. The latest stable version of `org.clojure/clojure` is `1.11.2`
2. Running `git/find-github-tag 'clj-kondo/clj-kondo "v2022.03.08"`
returns `nil`, which makes `neil` fetch the latest github tag instead.

To fix this, we:
1. Bump the latest stable version for Clojure in tests to 1.11.2
2. Bump the tag version used for `clj-kondo/clj-kondo` to
`v2024.03.13` (latest) in `dep add` tests.
3. Bump the tag version used for `clj-kondo/clj-kondo` to
`v2024.03.05` (not latest, but exists) in `dep upgrade` tests.
@vedang
Copy link
Contributor Author

vedang commented Mar 19, 2024

I've fixed the broken tests and explained the issue in the commit message. Please re-review

@borkdude
Copy link
Contributor

@vedang Yes, indeed those failing tests weren't related to your PR, but seem suspicious because when you add a :tag argument, you should get that version instead of the absolute newest. I'll look at this after merging this one. Thanks a bunch!

@borkdude borkdude merged commit 2a0a95b into babashka:main Mar 19, 2024
4 checks passed
@borkdude
Copy link
Contributor

borkdude commented Mar 19, 2024

Oh I see, you explained it indeed well in the commit message:

git/find-github-tag 'clj-kondo/clj-kondo "v2022.03.08" return nil

@vedang vedang deleted the fix/fetch-latest-deps-deploy branch March 19, 2024 13:17
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.

Neil does not use the latest version of slipset/deps-deploy in the neil add build command
2 participants