diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3430f71379..ae7dac89fba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,13 @@ jobs: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - uses: julia-actions/cache@v1 + - name: MOI + shell: julia --project=@. {0} + run: | + using Pkg + Pkg.add([ + PackageSpec(name="MutableArithmetics", rev="bl/zero_number"), + ]) - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 with: diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index e8e1145d4b1..0a9464ca184 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -19,7 +19,10 @@ jobs: shell: julia --color=yes --project=docs/ {0} run: | using Pkg - Pkg.develop(PackageSpec(path=pwd())) + Pkg.add([ + PackageSpec(name="MutableArithmetics", rev="bl/zero_number"), + PackageSpec(path=pwd()), + ]) Pkg.instantiate() - name: Build and deploy env: diff --git a/src/macros.jl b/src/macros.jl index 209c3ed3f41..c921525e123 100644 --- a/src/macros.jl +++ b/src/macros.jl @@ -300,11 +300,11 @@ Therefore, the result of [`build_constraint`](@ref) is converted in a call to """ model_convert(::AbstractModel, rhs::Any) = rhs -function model_convert(model::AbstractModel, set::MOI.AbstractScalarSet) - if MOI.Utilities.supports_shift_constant(typeof(set)) - T = value_type(typeof(model)) - return MOI.Utilities.shift_constant(set, zero(T)) - end +function model_convert(::AbstractModel, set::MOI.AbstractScalarSet) + #if MOI.Utilities.supports_shift_constant(typeof(set)) + # T = value_type(typeof(model)) + # return MOI.Utilities.shift_constant(set, zero(T)) + #end return set end diff --git a/src/macros/@constraint.jl b/src/macros/@constraint.jl index 9789971cbe6..d4e8a0acf82 100644 --- a/src/macros/@constraint.jl +++ b/src/macros/@constraint.jl @@ -825,7 +825,7 @@ function build_constraint( end function build_constraint(error_fn::Function, f, set::Zeros, args...; kwargs...) - return build_constraint(error_fn, f, MOI.EqualTo(false), args...; kwargs...) + return build_constraint(error_fn, f, MOI.EqualTo(_MA.Zero()), args...; kwargs...) end function build_constraint(