`@functor` is confused about properties vs fields
- Dominant language
- Julia
- Stars
- 123
- Forks
- 18
- Avg merge
- 47m
- Merged PRs (30d)
- 1
Description
It was noticed in https://github.com/FluxML/Flux.jl/issues/2107 that Functors.jl + ProtoStruct.jl doesn't work, as Functors uses `fieldnames` + `getproperty`, which is overloaded by ProtoStruct.jl.
https://github.com/FluxML/Functors.jl/blob/v0.3.0/src/functor.jl#L11-L16
This is a bug, Functors should use `getfield` to be consistent. (Possibly the code was written before `getproperty` existed?)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/functor.jl lines 11-16, which use fieldnames and getproperty. Compare that lookup with the issue's ProtoStruct.jl conflict, then update the field access consistently to getfield; done means Functors no longer relies on the overloaded property behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100