Commit graph

885 commits

Author SHA1 Message Date
Sean Corfield
df7ea21e7b
update John Shaffer's URL 2021-12-04 15:36:03 -08:00
Sean Corfield
e562329669 typo in docstring 2021-12-04 09:39:43 -08:00
Sean Corfield
8118f5448e prep for 2.1.833 2021-12-03 13:23:51 -08:00
Sean Corfield
d607f01dd5 prep for 2.1.832 2021-12-03 13:19:27 -08:00
Sean Corfield
e0cafbd434 extend lint checks to several column lists 2021-12-03 13:06:34 -08:00
Sean Corfield
dc37852024 fix #372 2021-12-02 15:20:03 -08:00
Sean Corfield
718b7f036f prep for 2.1.829 2021-11-27 16:02:44 -08:00
Sean Corfield
87039e7159 clarify argument lists of helper functions 2021-11-27 15:53:36 -08:00
Sean Corfield
66fc3a68ee fix #354 2021-11-27 15:27:12 -08:00
Sean Corfield
915857754d allow for automated release 2021-11-26 22:43:51 -08:00
Sean Corfield
d660c059d4 fix #370 2021-11-26 22:40:51 -08:00
Sean Corfield
be1df97b2b fix #371 2021-11-26 22:30:36 -08:00
Sean Corfield
627bc25357 retire CircleCI; update build-clj 2021-11-26 22:06:16 -08:00
Sean Corfield
dce2269be7 use more flexible cache 2021-11-01 16:56:07 -07: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
ceabd49508 bump deps 2021-10-16 22:43:43 -07:00
Sean Corfield
9052626805 prep for 2.1.818; document :values-default-columns 2021-10-04 16:09:28 -07:00
Sean Corfield
3cacec9c32 addresses #366 -- needs documentation! 2021-10-03 22:32:05 -07:00
Sean Corfield
6aee04e25c fixes #365 2021-10-03 22:18:12 -07:00
Sean Corfield
3d0a9ba79c fixes #367 2021-10-03 21:59:11 -07:00
Sean Corfield
80bbf85c3a typo 2021-09-25 18:47:18 -07:00
Sean Corfield
78cc769b98 prep for 2.0.813 2021-09-25 17:58:51 -07:00
Sean Corfield
472701d728 use 17 (no ea now) 2021-09-25 17:52:19 -07:00
Sean Corfield
ed844ed057 add snapshot on deploy 2021-09-25 17:51:48 -07:00
Sean Corfield
feb0c9a6f8 fixes #347 2021-09-25 17:35:02 -07:00
Sean Corfield
92e0a04a84 fixes #353 fixes #349 2021-09-25 17:27:04 -07:00
Sean Corfield
dae09ff601 fixes #363 by improving inlining capability 2021-09-25 17:06:48 -07:00
Sean Corfield
e44a30a7fd fixes #364 2021-09-25 16:32:00 -07:00
Sean Corfield
c7c6102661 address #353 for create table/string entity 2021-09-09 10:41:37 -07:00
Sean Corfield
ec758dd818 support AS in DELETE FROM alias 2021-09-01 10:20:19 -07:00
Sean Corfield
871908d5c9 update build-clj dep 2021-08-31 14:57:12 -07:00
Sean Corfield
e19870aba7 change pom to flush GH actions cache 2021-08-30 19:43:19 -07:00
Sean Corfield
bcdd81e931 set cache key from deps.edn 2021-08-30 19:40:46 -07:00
Sean Corfield
241f0c2519 trigger new maven cache? 2021-08-30 19:36:25 -07:00
Sean Corfield
3798dca428 update change log; clean up build 2021-08-30 19:30:55 -07:00
Sean Corfield
06e9917daa
Merge pull request #346 from lread/lread-issue-290
Test code blocks in docs with test-doc-blocks
2021-08-30 19:15:16 -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
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
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
Sean Corfield
9b018aa4ee add distribution (jdk) 2021-08-30 18:00:33 -07:00
Sean Corfield
55b68c4918 add maven cache to GH Actions 2021-08-30 17:58:15 -07: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
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
5246fe4549 Clean up prebuild 2021-08-18 08:31:31 -07:00