Skip to content

Preserve import selections when applying exclusions - #16161

Open
lukaszsamson wants to merge 2 commits into
elixir-lang:mainfrom
lukaszsamson:codex/fix-import-exclusions
Open

lukaszsamson wants to merge 2 commits into
elixir-lang:mainfrom
lukaszsamson:codex/fix-import-exclusions

Conversation

@lukaszsamson

@lukaszsamson lukaszsamson commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Preserve the previous import selection when applying except:, including an empty selection. Apply only: :sigils to that selection before excluding names. Update the docs and add regression tests for both cases.

Assisted-by: Codex:GPT-6

@josevalim josevalim added this to the v1.22 milestone Nov 20, 2026
@josevalim

Copy link
Copy Markdown
Member

Thank you, I noticed that import FunctionsAndMacros, only: :functions, except: [g: 1] imported nothing and only should always reset the state. So I pushed a fix for it. However, because this has the possibility of breaking existing codebases, I will only merge this after we branch v1.21 out. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants