Comments (4)
Hope you don't mind, but i went ahead and built it.
As a side note which might affect you in the future:
Since Phosphoricons include 1047 icons (Heroicons are only 230) i hit some weird dynamic function count limit on the erlang VM. So i decided to make some changes and generate packages per letter prefixing the icon (for instance the alarm
icon will live under the Bold.A
package. If Heroicons ever gets to 1024+ icons you will probably have the same issue :)
https://hex.pm/packages/phosphoricons
from heroicons_elixir.
Happy to see forks and more projects.
Is this function limit because the functions are generated via a macro or can you not have a module with more than 1024 functions?
I think that a future direction for this project (and perhaps your fork!) is to statically generate the code and download the icons, and have a task to update them - so we can tie package version to heroicon version. See #6 for some discussion on it
from heroicons_elixir.
Yeah, that would be helpful. I don't know what is the limit, but the error is something like this:
Compiling 2 files (.ex)
== Compilation error in file lib/phosphoricons.ex ==
** (CompileError) elixir_compiler_2:1: function '__MODULE__'/1+13:
An implementation limit was reached.
Try reducing the complexity of this function.
Instruction: {call_ext,4,{extfunc,'Elixir.Module','__put_attribute__',4}}
(stdlib 3.16.1) lists.erl:1342: :lists.foreach/2
Maybe you can shed some more light on it :)
from heroicons_elixir.
@noozo I just did a test:
defmodule Generator do
defmacro __using__(_opts) do
quote do
defmodule Generated do
for i <- Enum.to_list(1..2000) do
name = "name_#{i}"
quote do
def unquote(name)() do
nil
end
end
end
end
end
end
end
This compiles fine, so I guess it's not just that limit that you're running into
from heroicons_elixir.
Related Issues (15)
- Support for Heroicons v2 and mini
- Need a way to configure `view-box` and `fill` HOT 2
- Allow `outline` attribute HOT 1
- Dynamic icons HOT 1
- Missing icon HOT 2
- This package prevents using Phoenix Live View 0.19 HOT 6
- Add support for components HOT 1
- Update to Heroicons v2.1.1 HOT 1
- Error when rendering icons without any style modifiers HOT 4
- Possibly bug with error "expected either mini or solid, but got both." HOT 3
- Add <title> or <text> Tags to SVG, for Accessibility
- Mix script to update SVGs from Github HOT 7
- Warnings on latest in heex templates HOT 7
- Specify the stroke-width of the path HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroicons_elixir.