Skip to content

Commit

Permalink
Merge pull request #174 from thomvet/thomvet-patch-1
Browse files Browse the repository at this point in the history
Depend on StaticArraysCore.jl; remove Requires.jl dependency
  • Loading branch information
jw3126 authored Aug 5, 2022
2 parents c86ca0b + 2cfd07d commit 81ad5d9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.0'
- '1.3'
- '1.6'
- '1'
- 'nightly'
os:
Expand Down
7 changes: 3 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
name = "Setfield"
uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46"
version = "1.0.0"
version = "1.1.0"

[deps]
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
Future = "9fa8497b-333b-5362-9e8d-4d0656e87820"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"

[compat]
ConstructionBase = "0.1, 1.0"
MacroTools = "0.4.4, 0.5"
Requires = "0.5, 1.0"
julia = "1"
julia = "1.6"

[extras]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Expand Down
10 changes: 1 addition & 9 deletions src/Setfield.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ __precompile__(true)
module Setfield
using MacroTools
using MacroTools: isstructdef, splitstructdef, postwalk
using Requires: @require
using StaticArraysCore

if VERSION < v"1.1-"
using Future: copy!
Expand All @@ -26,12 +26,4 @@ for n in names(Setfield, all=true)
@eval Base.show(io::IO, l::$T) = _show(io, nothing, l)
end
end

function __init__()
@require StaticArrays="90137ffa-7385-5640-81b9-e52037218182" begin
setindex(a::StaticArrays.StaticArray, args...) =
Base.setindex(a, args...)
end
end

end
3 changes: 3 additions & 0 deletions src/setindex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ Base.@propagate_inbounds function setindex(d0::AbstractDict, v, k)
d[k] = v
return d
end

setindex(a::StaticArraysCore.StaticArray, args...) =
Base.setindex(a, args...)

2 comments on commit 81ad5d9

@jw3126
Copy link
Owner Author

@jw3126 jw3126 commented on 81ad5d9 Aug 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/65715

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.0 -m "<description of version>" 81ad5d965b543cc14d6ee51b63bec3b1e5827e71
git push origin v1.1.0

Please sign in to comment.