Skip to content

Disable migrate_unless within defmacro #13850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 22, 2024

Conversation

sabiwara
Copy link
Contributor

Running format --migrate would break the Elixir codebase as of now, this PR fixes it:

  • by avoiding formatting unless within defmacro - we can resue this approach for the pipe operator for this
  • removing a test for dbg since we plan to deprecate - or is that too early? I can perhaps try to find a workaround using Code.eval_string in this case

@@ -652,36 +652,6 @@ defmodule MacroTest do
"""
end

test "unless expression" do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd go ahead and remove the dbg feature altogether.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one specific to unless.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sabiwara sabiwara merged commit b528280 into elixir-lang:main Sep 22, 2024
9 checks passed
@sabiwara sabiwara deleted the format-migrate-defmacro branch September 22, 2024 11:04
ariel-anieli added a commit to ariel-anieli/elixir that referenced this pull request Sep 22, 2024
* `man/iex.1` & `man/elixir.1` are evaluated from `BUILD_MANPAGES`
* no diff in output of `build_man`.

```
$ git log -n1 --oneline --pretty=short
commit 458a00b2a (HEAD -> makefile)
Author: Ariel Otilibili <[email protected]>

    Refactored pre-requisites of `build_man`

$ make build_man -n > /tmp/makefile; echo $?
0

$ git switch main
Switched to branch 'main'
Your branch is up to date with 'origin/main'.

$ git log -n1 --oneline --pretty=short
commit b528280 (HEAD -> main, origin/main, origin/HEAD)
Author: Jean Klingler <[email protected]>

    Disable migrate_unless within defmacro and remove dbg for unless (elixir-lang#13850)

$ make build_man -n > /tmp/main; echo $?
0

$ diff /tmp/makefile /tmp/main; echo $?
0
```

Signed-off-by: Ariel Otilibili <[email protected]>
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