Better differentiation between list and scalar properties

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

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp
Domain
tooling

Research direction

Start by tracing the public property-reading API and the PLY parser path that produces the coercion error. Determine how callers can distinguish list and scalar properties without trial reads, and verify that mismatched reads produce clearer diagnostics; the issue is done when both behaviors are exposed consistently.

Written by the indexing model from the issue text.

Description

Perhaps I'm missing something obvious, but there doesn't appear to be anything in the API that can be used to easily see if a property is a list or scalar property. The best I can figure is to try reading a property as a scalar, then if it fails try to read it as a list and see if that works. Without parsing the error message, then, I have to try reading an int32, a uint32, and a double before trying the same as lists.

(Trying to read a list property as a scalar also results in an error message like

PLY parser: property values cannot be coerced to requested type double. Has type double

which should probably be changed to something more sensible.)

Dominant language
C++
Stars
406
Forks
74
PR merge metrics
No merged PRs in 30d

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.

More from nmwsharp/happly

All issues in nmwsharp/happly

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.