Ability to "fail to start"
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reading the Node.startProgram entry point and compare it with the Browser startup API, since the issue suggests both need similar behavior. Determine how init currently handles a task result and define what an explicit failure path should mean; done means applications can fail during initialization without storing a Maybe in the model.
Written by the indexing model from the issue text.
Description
Currently if your application model depends on the result of a task that can fail, you need to keep a Maybe on the model, because you have to call Node.startProgram with an instance of your model no matter what. If there was a way to explicitly not start the program, you could avoid the Maybe and fail directly in init. For example:
getSecureContext : Task Never (Maybe Crypto.SecureContext)
getSecureContext =
-- Turn fail-able task into one that always resolves.
...
init env =
Init.await getSecureContext <| \maybeSecureContext ->
when maybeSecureContext is
Nothing ->
Node.failToStart "Failed to get secure context."
Just secureContext ->
Node.startProgram
{ model =
{ secureContext = secureContext -- don't need a Maybe
...
Probably will want something similar for Browser.
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 6
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 3
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.
More from gren-lang/node
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
georgestephanis/p2026#40 ·
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·