Skip to content

fix: Compilation warnings on Elixir 1.20 - #175

Merged
crbelaus merged 2 commits into
mainfrom
fix-compile-warnings-elixir-1-20
May 1, 2026
Merged

crbelaus merged 2 commits into
mainfrom
fix-compile-warnings-elixir-1-20

Conversation

@crbelaus

@crbelaus crbelaus commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

Updates dependencies and moves the Phoenix.Component usage out of the html helpers to ensure clean compilation on Elixir 1.20.

@crbelaus crbelaus self-assigned this May 1, 2026
@crbelaus crbelaus changed the title Fix compilation warnings on Elixir 1.20 fix: Compilation warnings on Elixir 1.20 May 1, 2026
@crbelaus
crbelaus force-pushed the fix-compile-warnings-elixir-1-20 branch from 7c7604f to 968f102 Compare May 1, 2026 10:53
@crbelaus
crbelaus merged commit d8d7b6c into main May 1, 2026
6 checks passed
@crbelaus
crbelaus deleted the fix-compile-warnings-elixir-1-20 branch May 1, 2026 10:59
crbelaus pushed a commit that referenced this pull request Oct 1, 2026
Every compile on Elixir 1.20 warns about the navbar's own link:

```
warning: undefined attribute "target" for component ErrorTracker.Web.Layouts.navbar_item/1
```

The attribute is not only warned about, it is dropped. `target` is not
one of Phoenix's global attributes, so `target="_blank"` never makes
it into `@rest` — the attribute the `<a>` interpolates — and the
GitHub link opens in the same tab.

`include: ~w(target)` adds it to the global set, which is the documented
way to extend
`attr :rest, :global`. The attribute renders and the warning goes away.

Found while pinning a fork of 0.9.0 for a downstream app on Elixir
1.20.2 / phoenix_live_view 1.2.12. Related to #175.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant