fix: export locals_without_parens from .formatter.exs - #211
Merged
Conversation
The export key was spelled `locals_without_parems`, so downstream packages using `import_deps: [:bb]` got an empty list and `mix format` added brackets to every DSL call.
This was referenced Aug 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #202.
The
exportkey in.formatter.exswas spelledlocals_without_parems, soevery downstream package with
import_deps: [:bb]resolved an empty list andmix formatadded brackets to every DSL call.The top-level
locals_without_parenswas spelled correctly, so formattinginside this repo was never affected — which is why it went unnoticed.
Verification
Tested against
bb_servo_pca9685(which already setsimport_deps: [:bb]) byswapping the fixed and published
.formatter.exsinto itsdeps/bbandclearing
cached_dot_formatterbetween runs:deps/bb/.formatter.exstype :revoluteaftermix formattype(:revolute)type :revoluteThe satellite's resolved
locals_without_parensgoes from 0 to 126 entries.mix check --no-retrypasses, includingmix spark.formatter --check— theSpark task only rewrites the
spark_locals_without_parenslist, so it doesn'treintroduce the typo.
Note on scope
The issue's description implies the fix lets a satellite strip existing
brackets. It doesn't: the Elixir formatter only refrains from adding parens
for
locals_without_parensentries, and preserves parens already present inthe source. Confirmed in this repo, where
type(:revolute)survivesmix formatdespite the correct top-level key.So satellites carrying already-bracketed DSL (e.g.
bb_servo_pca9685'stest/support/pan_tilt_robot.ex) need a one-off pass to strip them once theypick up a release with this fix. This PR only stops the formatter fighting
paren-less code from here on.