JuliaArrays / JuliaArrays/FixedSizeArrays.jl

better error message when `convert` fails as intended

Open
#143 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Julia
Stars
99
Forks
8
PR merge metrics
No merged PRs in 30d

Description

From Discourse:

Since this is a common thing people might try, it might be worth either adding convert methods that just error, or adding error hints to this particular MethodError, linking to this issue and asking people to explicitly use the constructor.

The drawback of adding a convert methods that just errors is increasing the number of methods. However that seems better than registering an error hint, which requires non-static global state AFAIK.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin at the conversion call that produces the MethodError and compare it with the explicit constructor path. Resolve whether the project wants throwing convert methods or a MethodError hint; done means the selected behavior gives users the requested guidance without the other approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.