posit-dev / posit-dev/air

Air isn't idempotent when `:=` expression is broken over multiple lines

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

Nobody has claimed this yet.

Dominant language
Rust
Stars
446
Forks
32
Avg merge
16h 48m
Merged PRs (30d)
1

Description

Starting from this code:

y :=
  # comment
  a

After the first air format .:

y := # comment
a

After the second air format .:

y := a # comment

Tested with Air 0.10.0

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

Reproduce the issue with the multiline := example and run air format . twice to confirm that the output changes between runs. Trace the formatter handling of multiline assignments and comments; done means formatting the same input repeatedly produces identical output while preserving the intended comment placement.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
63/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.