ConstructionBase.jl icon indicating copy to clipboard operation
ConstructionBase.jl copied to clipboard

Primitives for construction of objects

Results 19 ConstructionBase.jl issues
Sort by recently updated
recently updated
newest added

I was trying to put something together for Accessors.jl and found that some changes here can really improve performance downstream. The strategy used here is to only depend on `PropertyNames{fieldnames(obj)}()`...

Allows setting `Dict` fields.

This continues some of the discussion in https://github.com/JuliaObjects/ConstructionBase.jl/issues/53, esp. https://github.com/JuliaObjects/ConstructionBase.jl/issues/53#issuecomment-1073996640. See also https://github.com/JuliaArrays/StructArrays.jl/pull/241 for a PR to use this package in StructArrays. In StructArrays one generally needs to figure out...

Consider a type like: ```julia struct Foo{D} x::Int end ``` Which could be used as `Foo{:KeyFacts}(25)`. `constructorof` returns just `Foo` Then the following issue occurs: ```julia julia> constructorof(Foo{:ABC}) Foo julia>...

I read the docs but it is still not clear how one should define the relevant interface for types that have internally calculated fields. Eg ```julia struct Foo a b...

```Julia using BenchmarkTools using ConstructionBase struct A x::Int y::Int end struct B x::Int y::Union{Nothing, Int} end function update(x) setproperties(x, (; x = x.x + 1)) end function update2(x::T) where T...

Just corrects a typo in the docstring of setproperties.

## Release * [x] Tag a release * [ ] announce on discourse ## Propagate through ecosystem * [x] [Setfield.jl](https://github.com/jw3126/Setfield.jl), see https://github.com/jw3126/Setfield.jl/pull/91 * [x] [Kaleido.jl](https://github.com/tkf/Kaleido.jl), see https://github.com/tkf/Kaleido.jl/pull/8 * [x] https://github.com/tkf/BangBang.jl/pull/21...

We may as well move everything to github workflows and fix this at the same time.

ref https://github.com/mauro3/Parameters.jl/pull/105#issuecomment-579970545