Commit graph

36 commits

Author SHA1 Message Date
Sean Corfield
7fceefbe5c
update test deps to 1.12.0
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-09-05 22:43:45 -07:00
Sean Corfield
0f0d24b510
prep for 2.6.1126
forgot to change the build script for the minor bump to 2.6

Signed-off-by: Sean Corfield <sean@corfield.org>
2024-03-04 13:23:36 -08:00
Sean Corfield
fc983927ce
test against 1.12
Signed-off-by: Sean Corfield <sean@corfield.org>
2024-02-09 22:41:55 -08:00
Sean Corfield
18fcddfc34 fix 2.5.1091 release 2023-10-28 15:31:55 -07:00
Sean Corfield
0115424167 prep for 2.4.1078 2023-10-07 12:23:12 -07:00
Sean Corfield
f9811f0c59 minor scm tweak 2023-10-06 15:44:58 -07:00
Sean Corfield
8334978a43 update tools.build; drop template pom.xml 2023-10-06 15:11:43 -07:00
Sean Corfield
2c463ec517 bump to tools.build 0.9.5 2023-08-11 10:50:54 -07:00
Sean Corfield
2d5e89d545 ci -> show jar version 2023-06-10 19:12:44 -07:00
Sean Corfield
3910df215a split test/runner to make project more jack-in friendly 2023-04-15 11:29:08 -07:00
Sean Corfield
bfc8ad6821 prep for 2.4.1002 2023-03-03 15:57:05 -08:00
Sean Corfield
dbbe40dc94 print version when building a JAR 2023-03-02 09:59:03 -08:00
Sean Corfield
213c152fdb fixes #456 2023-02-01 22:20:14 -08:00
Sean Corfield
6ab8c6452b drop use of build-clj 2023-01-23 23:29:52 -08:00
Sean Corfield
95e50a930e fixes #386 #437 #439 2022-11-05 17:15:32 -07:00
Sean Corfield
fb1decbd1e fixes #409 by making the check conditional 2022-05-20 10:46:04 -07:00
Sean Corfield
afa5c6af99 bump version to 2.3.x for next release 2022-04-30 22:04:50 -07:00
Sean Corfield
ccaf29292a CI change for Clojure 1.11 release 2022-03-25 21:47:30 -07:00
Sean Corfield
6e4e1f6928 prep for 2.2.840 2021-12-23 13:37:20 -08:00
Sean Corfield
36e0ede47e move template pom.xml 2021-11-01 12:51:18 -07:00
Sean Corfield
e9abb81892 strip pom.xml and rename
Since it isn't a real pom.xml file now.
2021-11-01 11:52:08 -07:00
Sean Corfield
9052626805 prep for 2.1.818; document :values-default-columns 2021-10-04 16:09:28 -07:00
Sean Corfield
ed844ed057 add snapshot on deploy 2021-09-25 17:51:48 -07:00
Sean Corfield
dae09ff601 fixes #363 by improving inlining capability 2021-09-25 17:06:48 -07:00
Sean Corfield
3798dca428 update change log; clean up build 2021-08-30 19:30:55 -07:00
lread
1c042c375b PR review feedback: change run-doc-tests arg to :aliases
Example usages are now:

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

clojure -T:build run-doc-tests :aliases '[:cljs]'

clojure -T:build run-doc-tests :aliases '[:1.9]'

clojure -T:build run-doc-tests :aliases '[:1.10]'

clojure -T:build run-doc-tests :aliases '[:master]'
```
2021-08-30 21:50:13 -04: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
458cc9fa52 Tweak tests regeneration from docs
Tests will now always regenerate when:

- there is no last successful generation run
- OR when any docs, build files, or source files are newer than the
last successful generation run.
2021-08-30 17:56:42 -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
4ba9d2f6ca fix cljs test alias 2021-08-12 19:21:35 -07:00
Sean Corfield
5191abaa6c switch to tools.build 2021-08-12 19:20:02 -07:00