JuliaDiff / JuliaDiff/ForwardDiff.jl
`construct_seeds` for types where `typeof(one(T)) !=T` is broken
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 1k
- Forks
- 160
- PR merge metrics
- No merged PRs in 30d
Description
as far as i understand, the type of one(T) is not necessarily T (https://github.com/JuliaPhysics/Measurements.jl/issues/134 for example). but construct_seeds uses this:
https://github.com/JuliaDiff/ForwardDiff.jl/blob/50ec9a1ccb0a4390edc88398aa322656d58e7202/src/partials.jl#L9-L12
Maybe using oneunit there is more correct?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/partials.jl at lines 9-12 and inspect how construct_seeds derives seed values for types whose one(T) has a different type. Compare that behavior with the oneunit possibility and the Measurements.jl example linked in the issue; done means the affected type case is handled correctly without breaking existing seed construction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100