lift / lift/framework

Incorrect composition of logical expressions in Javascript DSL

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

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.3k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

`JsAnd(a, JsNot(JsOr(b, c)))` produces `JsExp(a && !b || c)` instead of something like `JsExp(a && !(b || c))` (with more parentheses for correct logic evaluation).

Discussion: https://groups.google.com/d/topic/liftweb/W7JwaHe3sdI/discussion

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

Start with the JsAnd, JsNot, and JsOr entry points and reproduce the expression shown in the issue. Done means the generated JavaScript preserves the intended grouping, such as `a && !(b || c)`, and the behavior is covered by a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, scala
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.