yesodweb / yesodweb/persistent

Quasi not validating OnDeleteCascade

Open
#1,474 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
486
Forks
306
PR merge metrics
No merged PRs in 30d

Description

I tried adding 'OnDeleteCascadeon a model definition but typedonDeleteCascade(starting with a lower case). Of course, the delete cascade feature didn'w work. However I was suprised that the compiler didn't winge about it. I don't know if adding something after a reference declaration is invalid or mean something, but letting people writeonDeleteCascade` is misleading. I would normally not test things like that. I only did it because I was unsure if and how it would work (first time I am using it).

Contributor guide

Open the contributing guide

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

No source file or test is named. Start by reproducing a Persistent model definition using the misspelled onDeleteCascade, then trace the model quasiquoter's validation path. Done means the invalid spelling is rejected by the compiler or an equivalent clear validation error is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.