Commit graph

63 commits

Author SHA1 Message Date
Sean Corfield
83ad5cff74 fx #447 by updating deps/actions 2023-01-14 14:18:03 -08:00
Sean Corfield
fb1decbd1e fixes #409 by making the check conditional 2022-05-20 10:46:04 -07:00
Sean Corfield
ccaf29292a CI change for Clojure 1.11 release 2022-03-25 21:47:30 -07:00
Sean Corfield
4823ec8694 update build-clj 2022-03-06 12:09:46 -08:00
Sean Corfield
826407e9db first pass of caching formatter
needs more documentation.

Initial results suggest a speedup for simple queries of 2-3x.
Complex queries can see up to 20x speedup.
2022-01-08 00:41:21 -08:00
Sean Corfield
8976379fa6 update build-clj 2022-01-06 20:30:09 -08:00
Sean Corfield
0867ce54dc update build-clj 2022-01-04 14:00:41 -08:00
Sean Corfield
8979e938f3 fixes #374 2021-12-23 13:32:47 -08:00
Sean Corfield
aa8089524b update build/test dependencies 2021-12-13 10:50:29 -08:00
Sean Corfield
dc37852024 fix #372 2021-12-02 15:20:03 -08:00
Sean Corfield
627bc25357 retire CircleCI; update build-clj 2021-11-26 22:06:16 -08:00
Sean Corfield
ceabd49508 bump deps 2021-10-16 22:43:43 -07:00
Sean Corfield
3d0a9ba79c fixes #367 2021-10-03 21:59:11 -07:00
Sean Corfield
e44a30a7fd fixes #364 2021-09-25 16:32:00 -07:00
Sean Corfield
871908d5c9 update build-clj dep 2021-08-31 14:57:12 -07:00
lread
68a63b7078 Merge remote-tracking branch 'upstream/develop' into lread-issue-290
* upstream/develop:
  update eastwood etc
  add distribution (jdk)
  add maven cache to GH Actions
2021-08-30 22:07:08 -04:00
Sean Corfield
17881ef2b4 update eastwood etc 2021-08-30 18:47:10 -07:00
lread
ae29147a22 PR review feedback: move gen-doc-tests build code
Move the code that generates doc tests out from build.clj
to its own source runnable via main.

This isolates gen-doc-tests work to its own process
during the build.

I arbitrarily:
- chose 'build' as the folder for build helper sources
- namespaced our first build helper under 'honey.gen-doc-tests'
2021-08-30 21:08:28 -04:00
lread
cccd3e96fd Doc block testing now understands refer-clojure
Test-doc-blocks added support for this feature
2021-08-30 17:40:25 -04:00
lread
4eb9eca147 Merge remote-tracking branch 'upstream/develop' into lread-issue-290
Adapt to build changes.

* upstream/develop:
  Switch to build-clj lib
2021-08-28 17:14:04 -04:00
Sean Corfield
c81d27a224 Switch to build-clj lib 2021-08-27 22:51:49 -07:00
lread
35c5aee584 Test code blocks in docs with test-doc-blocks
Resolves #290

**Build**

New commands:
- `gen-doc-tests` - only regenerates tests if stale,
   use `clean` command to force regen
- `run-doc-tests` - calls gen-doc-tests then runs tests,
  accepts the same parameters as run-tests.
  Can specify `:platform`
    - `:cljs` - run tests under ClojureScript
    - otherwise Clojure where we can specify one of: `:1.9`
    `:1.10` `:master`

I'm not sure if my use of the `:platform` parameter jives with
your `:aliases` parameter used for `run-tests`.
Can adjust if you like.

Example usages:
```shell
clojure -T:build gen-doc-tests

clojure -T:build run-doc-tests :platform :cljs

clojure -T:build run-doc-tests

clojure -T:build run-doc-tests :platform :1.10
```

The `ci` command has been updated to generate and run doc tests for same
platforms as unit tests.

**Articles**

In addition to `README.md`, now testing doc blocks in all articles
under `doc` dir excepting `doc/operator-reference.md` which does not
have any runnable code blocks.

**Skipped**

Any code block that is intentionally not runnable has been marked to be
skipped via: `<!-- :test-doc-blocks/skip -->`.

**Consistency**

I noticed that some code blocks use REPL syntax:
```Clojure
user=> (+ 1 2 3)
6
```
and others use editor syntax:
```Clojure
(+ 1 2 3)
;;=> 6
```
some places also omit the comment for editor style:
```Clojure
(+ 1 2 3)
=> 6
```
All of this is just fine with test-doc-blocks.
I left the inconsistency as is, but can make a pass for consistency upon
request.

**HoneySQL state**

I noticed a code block that set the sql dialect was affecting other
tests. I simply restored the dialect to the default at the end of the
code block.

**Un-tweaked output**

Some code blocks had string output hand-tweaked for readability.
These have been adjusted to instead use `sql/format`'s `:pretty` option.
In some cases the output is not as readable as the hand-tweaked version.
I humbly suggest that perhaps `:pretty` output could perhaps be
improved (instead of having test-doc-blocks somehow adapt).

**Corrections**

There were very few code blocks that required fixing due to incorrect
output/code.  Please review the diffs carefully to make sure all is as
expected.

**refer-clojure :excludes**

Not currently supported for test-doc-blocks, not a real issue for
Clojure, we'll see warnings under Clojure, but that's probably ok.

But I might actually need it for ClojureScript.
I was finding that `for` did not get overridden by our helper
`:refer` in CloureScript.

Will add proper support to test-doc-blocks but in the short-term,
will use `h/for`.

**ns requires adjustments**

Any specific case of `(ns my-ns (require [my-require :as a]))` is now
the REPL friendly `(require '[my-require :as a])`

Any missing required `requires` were added.

The HoneySQL docs seem to encourage the use of referred vars for
helpers. Although this has the con of overlaps with Clojure core vars,
it is also convenient for Clojure when using `:refer :all`.

**ClojureScript :refer**

ClojureScript does not support `:refer :all` and each var must be
specified in place of `:all`.

I have adjusted examples accordingly to work with both Clojure and
ClojureScript.
2021-08-27 18:39:07 -04:00
Sean Corfield
584cd1c711 update tools.build; add deploy via build 2021-08-22 19:30:04 -07:00
Sean Corfield
eac5e933c3 Fix runner/build/gitpod REPL 2021-08-17 22:39:07 -07:00
Sean Corfield
68a1ccfa3c Bump tools.build; write scm>tag 2021-08-13 16:10:45 -07:00
Sean Corfield
68eafc0c2e clean up :deploy 2021-08-12 19:43:16 -07:00
Sean Corfield
5191abaa6c switch to tools.build 2021-08-12 19:20:02 -07:00
Sean Corfield
964f9837b0 version bumps 2021-07-29 23:00:02 -07:00
Sean Corfield
a393cd89e2 fixes #337 by using clojure.test for cljs 2021-07-15 19:26:59 -07:00
Sean Corfield
8ec08ca686 Addresses #331 by changing some CI stuff
* Updated Eastwood to 0.5.1
* Added set -Eeo pipefail to run-tests.sh (I don't like -x)
* Run CI on PR
* Add shellcheck to steps

I'm not going to run Eastwood on tests at this point (see my
comments in #334 for reasons).
2021-06-21 15:16:18 -07:00
Sean Corfield
3b00d5c3e6 bump :test-runner 2021-06-16 22:35:53 -07:00
Sean Corfield
0ab991d856 drop :runner now we use -X 2021-06-16 18:25:59 -07:00
Sean Corfield
07a4d9127d Update deps 2021-05-09 16:06:49 -07:00
Sean Corfield
6ca391c84a Update test-runner 2021-05-09 11:35:33 -07:00
Sean Corfield
84147b242d Bump depstar 2021-04-11 11:10:13 -07:00
Sean Corfield
b010f91586 Update Eastwood; run it on Clojure 1.9 2021-04-01 12:28:13 -07:00
Sean Corfield
230aa7088a Minor library updates 2021-03-21 12:07:08 -07:00
Sean Corfield
337d2c7f5d Minor library version updates 2021-03-21 11:55:47 -07:00
Sean Corfield
d76b2d82b1 Prep for 2.0 Alpha 3 2021-03-13 15:55:31 -08:00
Sean Corfield
41522c89a1 Clarify 1.9+ Clojure support 2021-03-07 09:43:03 -08:00
Sean Corfield
25acc53b24 Bump cljs-test-runner to get more recent cljs
So that `(symbol :kw)` works (although I decided to use an explcit call
to `name` instead.
2021-02-02 12:12:01 -08:00
Sean Corfield
3439bb6c48 More CLI tweaking for CircleCI 2021-01-31 06:08:14 -08:00
Sean Corfield
4af4f3f7ed Fixes #274 by committing to seancorfield/honeysql for v2 2021-01-30 11:59:35 -08:00
Sean Corfield
67c6c3a2cf Fixes #275 by dropping 1.7 & 1.8 2021-01-30 11:50:14 -08:00
Sean Corfield
86a4d2056b Auto-sync pom.cml 2021-01-29 14:56:06 -08:00
Sean Corfield
0880d0212f Minor version/tooling updates 2021-01-29 13:17:01 -08:00
Sean Corfield
117e1c7f64 Update to latest depstar 2020-11-08 21:17:39 -08:00
Sean Corfield
0255307aaf Bump to latest depstar 2020-10-09 14:53:13 -07:00
Sean Corfield
40828b2c57 Update to latest depstar; latest CLI 2020-10-08 22:29:10 -07:00
Sean Corfield
e4e8dd3342 Latest test-runner SHA 2020-10-07 23:04:52 -07:00