Tensegritics / Tensegritics/ClojureDart

Error when non-nullable optional

Open
#216 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Clojure
Stars
1.6k
Forks
119
PR merge metrics
No merged PRs in 30d

Description

Original report: https://clojurians.slack.com/archives/C03A6GE8D32/p1679998004285439

We assign null as the default default for all optionals, even when their types are not nullable. This cause errors during compilation of the generated Dart code.
We should catch this error before Dart.

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

Start by tracing how optional values receive their default during ClojureDart's generated Dart compilation flow, then reproduce the non-nullable-optional case. Done means the invalid default is detected before Dart compilation and a clear error is reported to the user.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, dart
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.