Skip to content

Commit 9a9a07a

Browse files
Merge pull request #706 from devmotion/dw/compat
Update Julia compat to 1.10 and remove IfElse.jl
2 parents a22da4d + f8dc594 commit 9a9a07a

File tree

7 files changed

+17
-26
lines changed

7 files changed

+17
-26
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,26 @@ on:
66
push:
77
branches:
88
- master
9+
10+
# needed to allow julia-actions/cache to delete old caches that it has created
11+
permissions:
12+
actions: write
13+
contents: read
14+
915
jobs:
1016
test:
1117
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
version:
21+
- 'min'
22+
- '1'
1223
steps:
1324
- uses: actions/checkout@v4
14-
with:
15-
fetch-depth: 0
16-
- run: |
17-
if [ "`git rev-parse --abbrev-ref HEAD`" != master ]; then git fetch origin master:master; fi
1825
- uses: julia-actions/setup-julia@v2
1926
with:
20-
version: 1
21-
- uses: actions/cache@v4
22-
env:
23-
cache-name: cache-artifacts
24-
with:
25-
path: ~/.julia/artifacts
26-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
27-
restore-keys: |
28-
${{ runner.os }}-test-${{ env.cache-name }}-
29-
${{ runner.os }}-test-
30-
${{ runner.os }}-
27+
version: ${{ matrix.version }}
28+
- uses: julia-actions/cache@v2
3129
- uses: julia-actions/julia-buildpkg@v1
3230
- uses: julia-actions/julia-runtest@v1
3331
- uses: julia-actions/julia-processcoverage@v1

Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
1313
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
1414
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
1515
DynamicPolynomials = "7c1d4256-1411-5781-91ec-d7bc3513ac07"
16-
IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
1716
LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800"
1817
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1918
MultivariatePolynomials = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3"
@@ -46,7 +45,6 @@ ConstructionBase = "1.5.7"
4645
DataStructures = "0.18"
4746
DocStringExtensions = "0.8, 0.9"
4847
DynamicPolynomials = "0.5, 0.6"
49-
IfElse = "0.1"
5048
LabelledArrays = "1.5"
5149
MultivariatePolynomials = "0.5"
5250
NaNMath = "0.3, 1.1.2"
@@ -59,7 +57,7 @@ TermInterface = "2.0"
5957
TimerOutputs = "0.5"
6058
Unityper = "0.1.2"
6159
WeakValueDicts = "0.1.0"
62-
julia = "1.3"
60+
julia = "1.10"
6361

6462
[extras]
6563
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"

src/SymbolicUtils.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ include("types.jl")
3030

3131
# Methods on symbolic objects
3232
using SpecialFunctions, NaNMath
33-
import IfElse: ifelse # need to not bring IfElse name in or it will clash with Rewriters.IfElse
3433
include("methods.jl")
3534

3635
# LinkedList, simplification utilities

src/code.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function function_to_expr(op::typeof(^), O, st)
155155
return nothing
156156
end
157157

158-
function function_to_expr(::typeof(SymbolicUtils.ifelse), O, st)
158+
function function_to_expr(::typeof(ifelse), O, st)
159159
args = arguments(O)
160160
:($(toexpr(args[1], st)) ? $(toexpr(args[2], st)) : $(toexpr(args[3], st)))
161161
end

src/methods.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,8 @@ for f in [!, ~]
198198
end
199199

200200

201-
# An ifelse node, ifelse is a built-in unfortunately
202-
# So this uses IfElse.jl's ifelse that we imported
203-
function ifelse(_if::Symbolic{Bool}, _then, _else)
201+
# An ifelse node
202+
function Base.ifelse(_if::Symbolic{Bool}, _then, _else)
204203
Term{Union{symtype(_then), symtype(_else)}}(ifelse, Any[_if, _then, _else])
205204
end
206205
promote_symtype(::typeof(ifelse), _, ::Type{T}, ::Type{S}) where {T,S} = Union{T, S}

test/basics.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using SymbolicUtils: Symbolic, Sym, FnType, Term, Add, Mul, Pow, symtype, operation, arguments, issym, isterm, BasicSymbolic, term, isequal_with_metadata
22
using SymbolicUtils
33
using ConstructionBase: setproperties
4-
using IfElse: ifelse
54
using Setfield
65
using Test, ReferenceTests
76

test/fuzzlib.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ using SymbolicUtils
22
using SymbolicUtils: Term, showraw, Symbolic, issym
33
using SpecialFunctions
44
using Test
5-
import IfElse: ifelse
6-
import IfElse
75
using NaNMath
86

97
function rand_input(T)

0 commit comments

Comments
 (0)