FluxML / FluxML/Functors.jl

`@functor` is confused about properties vs fields

Open
#46 5 comments 3 reactions 0 assignees View on GitHub
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.