WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 2a62b70

Browse files
committed
initial round of modernization
Signed-off-by: Sean Corfield <[email protected]>
1 parent b0875f5 commit 2a62b70

File tree

20 files changed

+425
-127
lines changed

20 files changed

+425
-127
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @seancorfield
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release Version
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build-and-release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v5
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-java@v5
16+
with:
17+
distribution: 'temurin'
18+
java-version: '21'
19+
- name: Setup Clojure
20+
uses: DeLaGuardo/setup-clojure@master
21+
with:
22+
cli: '1.12.2.1565'
23+
bb: 'latest'
24+
- name: Cache All The Things
25+
uses: actions/cache@v4
26+
with:
27+
path: |
28+
~/.m2/repository
29+
~/.gitlibs
30+
~/.clojure
31+
~/.cpcache
32+
~/.deps.clj
33+
key: ${{ runner.os }}-${{ hashFiles('**/deps.edn', '**/bb.edn') }}
34+
- name: Run All Tests, then Build & Deploy Release
35+
run: bb ci:deploy jdk21
36+
env:
37+
CLOJARS_PASSWORD: ${{secrets.DEPLOY_TOKEN}}
38+
CLOJARS_USERNAME: ${{secrets.DEPLOY_USERNAME}}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Release (branch) & Snapshot
2+
3+
on:
4+
push:
5+
branches:
6+
- "release"
7+
8+
jobs:
9+
build-and-snapshot:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v5
13+
- uses: actions/setup-java@v5
14+
with:
15+
distribution: 'temurin'
16+
java-version: '21'
17+
- name: Setup Clojure
18+
uses: DeLaGuardo/setup-clojure@master
19+
with:
20+
cli: '1.12.2.1565'
21+
bb: 'latest'
22+
- name: Cache All The Things
23+
uses: actions/cache@v4
24+
with:
25+
path: |
26+
~/.m2/repository
27+
~/.gitlibs
28+
~/.clojure
29+
~/.cpcache
30+
~/.deps.clj
31+
key: ${{ runner.os }}-${{ hashFiles('**/deps.edn', '**/bb.edn') }}
32+
- name: Run All Tests, then Build & Deploy Snapshot
33+
run: bb ci:deploy snapshot jdk21
34+
env:
35+
CLOJARS_PASSWORD: ${{secrets.DEPLOY_TOKEN}}
36+
CLOJARS_USERNAME: ${{secrets.DEPLOY_USERNAME}}
37+
38+
build:
39+
runs-on: ubuntu-latest
40+
strategy:
41+
matrix:
42+
java: [ '11', '17', '21' ]
43+
steps:
44+
- uses: actions/checkout@v5
45+
- uses: actions/setup-java@v5
46+
with:
47+
distribution: 'temurin'
48+
java-version: ${{ matrix.java }}
49+
- name: Setup Clojure
50+
uses: DeLaGuardo/setup-clojure@master
51+
with:
52+
cli: '1.12.2.1565'
53+
bb: 'latest'
54+
- name: Cache All The Things
55+
uses: actions/cache@v4
56+
with:
57+
path: |
58+
~/.m2/repository
59+
~/.clojure
60+
~/.cpcache
61+
~/.deps.clj
62+
key: ${{ runner.os }}-${{ hashFiles('**/deps.edn', '**/bb.edn') }}
63+
- name: Run Tests
64+
run: bb test jdk${{ matrix.java }}

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Pull Request
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
java: [ '11', '17', '21' ]
11+
steps:
12+
- uses: actions/checkout@v5
13+
- uses: actions/setup-java@v5
14+
with:
15+
distribution: 'temurin'
16+
java-version: ${{ matrix.java }}
17+
- name: Setup Clojure
18+
uses: DeLaGuardo/setup-clojure@master
19+
with:
20+
cli: '1.12.2.1565'
21+
bb: 'latest'
22+
- name: Cache All The Things
23+
uses: actions/cache@v4
24+
with:
25+
path: |
26+
~/.m2/repository
27+
~/.gitlibs
28+
~/.clojure
29+
~/.cpcache
30+
~/.deps.clj
31+
key: ${{ runner.os }}-${{ hashFiles('**/deps.edn', '**/bb.edn') }}
32+
- name: Run All Tests
33+
run: bb test:all jdk${{ matrix.java }}

.gitignore

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
/target
2-
/classes
3-
/checkouts
4-
pom.xml
5-
pom.xml.asc
6-
*.jar
1+
.calva/mcp-server/port
2+
.calva/repl.calva-repl
3+
.clj-kondo/.cache
4+
.clj-kondo/imports
5+
.cpcache
6+
.lsp/.cache
7+
.portal/vs-code.edn
8+
.rebel_readline_history
79
*.class
10+
*.jar
811
/.lein-*
912
/.nrepl-port
13+
/checkouts
14+
/classes
15+
/target
16+
pom.xml
17+
pom.xml.asc

.travis.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 86 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,60 @@
1-
* version 0.7.0
2-
- throw+: specify message as fmt & args rather than a single string
3-
- can use % in args (at any depth) to represent the thrown object
4-
- support: move small helper functions into letfns
5-
* version 0.7.1
6-
- throw+: fix so that the thrown object is only eval'd once
7-
* version 0.7.2
8-
- throw+: introduce &thrown-object to allow both single-evaluation
9-
of object and deep substitution of % simultaneously
10-
* version 0.8.0
11-
- breaking change: slingshot.core -> slingshot.slingshot
12-
- remove &thrown-object in favor of a gensym. (the user will never
13-
need to refer to it)
14-
- simplify/clarify support functions
15-
* version 0.9.0
16-
- retire :wrapper and move :throwable to the context proper
17-
- stop using metadata on the context
18-
- provide an example in README.md
19-
- doc string fixes
20-
- change so catch hook always runs even when there are no catch
21-
clauses
22-
- provide slingshot/get-thrown-object to retrieve the object
23-
thrown by throw or throw+ given a Throwable caught within an
24-
ordinary try form.
1+
## CHANGES
2+
3+
* v0.13.next in progress
4+
- move to clj-commons; rename nses to `clj-commons.*`
5+
- switch to CLI / `deps.edn` / `build.clj` / `bb.edn`
6+
- add GitHub Actions for CI
7+
- drop support for Clojure 1.7 and earlier
8+
- clean up `use` and `refer all`
9+
10+
* version 0.12.2
11+
- improved interop with ex-info/ex-data
12+
- throw+ explicit cause can be nil
13+
- tests for more throw+ arguments
14+
- started travis-ci builds
15+
16+
* version 0.12.1
17+
- internal improvements
18+
- documentation updates for correctness, clarity
19+
20+
* version 0.12.0
21+
- new optional argument to throw+ allows specifying a Throwable as
22+
the cause explicitly
23+
- explicit cause overrides the captured cause in a catch
24+
- issue 29
25+
- now treats all IExceptionInfo objects as data wrappers
26+
- catch selectors refer to the map passed in to `ex-info`
27+
- issue 35
28+
- no longer provides :environment in &throw-context
29+
- now compatible with locals clearing
30+
- issue 36
31+
32+
* version 0.11.0
33+
- add :else option for try+ (issue 34)
34+
- improve catch by class to avoid reflection (issue 37)
35+
- dropped custom ex-info, ex-data, ex-class and other support for
36+
Clojure 1.3.0
37+
- modernized project.clj
38+
- signed artifacts for clojars
39+
40+
* version 0.10.3
41+
- make exception class available from support and add clojure.test
42+
support for testing that the proper exception is thrown (issue 21)
43+
- remove replace-all and % substitution in source in favor of using
44+
let to bind % (issue 22)
45+
- key-value pair -> key-values, generalize key-value selector to
46+
allow any even number of items in the vector (issue 23)
47+
48+
* version 0.10.2
49+
- accept a simple string as a message for throw+ (issue 19)
50+
- for catch, only interpret a form as a selector if it contains a %
51+
symbol, allows function literals for predicates (issue 20)
52+
53+
* version 0.10.1
54+
- fix slingshot version in examples to match release
55+
- remove reflection warnings from tests and turn on checking in
56+
project.clj [resolves issue 18]
57+
2558
* version 0.10.0
2659
- add get-throw-context and reimplement get-thrown-object using it
2760
- get-thrown-object will now find stones in cause chains like
@@ -44,44 +77,32 @@
4477
(accessible via get-throw-context or in &throw-context)
4578
- use clojure.core's ex-data and ex-info if available, but don't
4679
depend on them
47-
* version 0.10.1
48-
- fix slingshot version in examples to match release
49-
- remove reflection warnings from tests and turn on checking in
50-
project.clj [resolves issue 18]
51-
* version 0.10.2
52-
- accept a simple string as a message for throw+ (issue 19)
53-
- for catch, only interpret a form as a selector if it contains a %
54-
symbol, allows function literals for predicates (issue 20)
55-
* version 0.10.3
56-
- make exception class available from support and add clojure.test
57-
support for testing that the proper exception is thrown (issue 21)
58-
- remove replace-all and % substitution in source in favor of using
59-
let to bind % (issue 22)
60-
- key-value pair -> key-values, generalize key-value selector to
61-
allow any even number of items in the vector (issue 23)
62-
* version 0.11.0
63-
- add :else option for try+ (issue 34)
64-
- improve catch by class to avoid reflection (issue 37)
65-
- dropped custom ex-info, ex-data, ex-class and other support for
66-
Clojure 1.3.0
67-
- modernized project.clj
68-
- signed artifacts for clojars
69-
* version 0.12.0
70-
- new optional argument to throw+ allows specifying a Throwable as
71-
the cause explicitly
72-
- explicit cause overrides the captured cause in a catch
73-
- issue 29
74-
- now treats all IExceptionInfo objects as data wrappers
75-
- catch selectors refer to the map passed in to `ex-info`
76-
- issue 35
77-
- no longer provides :environment in &throw-context
78-
- now compatible with locals clearing
79-
- issue 36
80-
* version 0.12.1
81-
- internal improvements
82-
- documentation updates for correctness, clarity
83-
* version 0.12.2
84-
- improved interop with ex-info/ex-data
85-
- throw+ explicit cause can be nil
86-
- tests for more throw+ arguments
87-
- started travis-ci builds
80+
81+
* version 0.9.0
82+
- retire :wrapper and move :throwable to the context proper
83+
- stop using metadata on the context
84+
- provide an example in README.md
85+
- doc string fixes
86+
- change so catch hook always runs even when there are no catch
87+
clauses
88+
- provide slingshot/get-thrown-object to retrieve the object
89+
thrown by throw or throw+ given a Throwable caught within an
90+
ordinary try form.
91+
92+
* version 0.8.0
93+
- breaking change: slingshot.core -> slingshot.slingshot
94+
- remove &thrown-object in favor of a gensym. (the user will never
95+
need to refer to it)
96+
- simplify/clarify support functions
97+
98+
* version 0.7.2
99+
- throw+: introduce &thrown-object to allow both single-evaluation
100+
of object and deep substitution of % simultaneously
101+
102+
* version 0.7.1
103+
- throw+: fix so that the thrown object is only eval'd once
104+
105+
* version 0.7.0
106+
- throw+: specify message as fmt & args rather than a single string
107+
- can use % in args (at any depth) to represent the thrown object
108+
- support: move small helper functions into letfns

ORIGINATOR

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@scgilardi

0 commit comments

Comments
 (0)