I've forked Arc to Waffle and merged all open PRs

Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library.

The progress I made during the last couple of months is that I’ve merged all open pull requests, published the library to the hex.pm. Also, I’m streaming my work on the project on Twitch :slight_smile:

The next changes I’m working on right now is to cover all available features in the documentation and also implement the proper file validation with magic bytes.

I would appreciate any feedback or star on GitHub :slight_smile:

41 Likes

Wow, 29 stars so far. Thank you all so much for support!

2 Likes

Forgive me, but I am absolutely a greenhorn about library management.
Why did not you continue arc but forked it and renamed it? Is Arc unmaintained?

When it came to making this decision did you weigh the pros and cons vs making a new library instead of forking Arc? In other words, in a best case scenario as of today do you still think the arc model of dealing with file uploads is the way to go?

Also are you currently using this project in a large scale production roll out?

1 Like

I’m pretty sure the issue was that Arc had a lot of open issues and a lot of open PR’s but no one was managing, merging, or keeping up with Arc for over a year at this point. At that point you can’t do much but fork and continue. ^.^;

13 Likes

We really need a maintained library for files upload mater. So thank you for sharing this one.
Please do you plan also an alternative to arc_ecto ? That would be great!

2 Likes

Yep, but I recall there also being other libs that took a completely different approach to file uploads than arc.

Yep, and those still exist and are mostly kept up to date. Arc just has a lot of users and the fact it was dead was harmful to those projects when needed bug fixes needed to get in. Thus Waffle is to keep that same code persisting and still updating. :slight_smile:

4 Likes

Arc is under Apache license, so, you can’t just fork it and use the old name. It was my first thought to do it, but unfortunately you have to change the name if you want to fork something under Apache license :slight_smile:

Also, you want to publish the library to the registry and the old name is already taken. This is how the Waffle name was born.

4 Likes

Absolutely! I’ve forked arc_ecto to the waffle_ecto as well. This library is under the same GitHub organisation.

To my surprise we already have new adapters from community as waffle_gcs for integration with Google Cloud.

5 Likes

We are actively using it with several projects now. One of them is https://vocab10k.com (an app to learn English words and practice pronunciation).

Also, my company (evrone.com) is supporting open source initiatives and I’m open to work on the library as many time as I want.

9 Likes

I just came across this this Arc issue. Since it’s you that opened it I assume you fixed it in waffle.

However it seems that this has not been changed in the documentation:

defmodule Avatar do
  use Waffle.Definition
  @extension_whitelist ~w(.jpg .jpeg .gif .png)

  def validate({file, _}) do
    file_extension = file.file_name |> Path.extname() |> String.downcase()
    Enum.member?(@extension_whitelist, file_extension)
  end
end

I also found a bit empty the docs for waffle_ecto. So to use it, does one just use the same instructions as for arc_ecto but and change arc_ecto by waffle_ecto?

That’s a great work, and it would be ever more if we could have full documentation and maybe some guide about upgrading from Arc to Waffle.

Thank you. ^^

2 Likes

I have made the change from Arc to Waffle, and related ecto packages in a project and just changed Arc to Waffle everywhere I needed it. Tests are ok and release is working fine :slight_smile:

But I don’t know about the issue You mention.

4 Likes

Sorry I was wrong. @achempion rather referenced the issue in the Waffle repository here. So in the future he will provide proper instructions for file validation. But for now one could follow the already suggested solution in the initial issue.

Thank you for your feedback. This is really reassuring. ^^

3 Likes

I just see waffle as a drop in replacement for arc, with a more active development cycle.

5 Likes

New release of waffle so far. It was all about documentation. We’ve migrated all docs to the hexdocs to the corresponding modules.

If you have any suggestions for improvement please tell me :slight_smile:

For now I want to focus and sort out outdated dependencies and implement proper file validations based on content rather than extension. You can follow the progress on placeholder issue here.

5 Likes

I’ve made a new major release upgrade. Now the waffle is v1.0.0.

In this version I’ve finally upgraded all dependencies and removed Poison in favour of Jason.

Now I can focus on “nice to have” features like file validation based on file type rather than file extension.

If you have any feature suggestions or ideas on improvement you can write here :slight_smile: We’ll reach 100 stars on GitHub soon.

15 Likes

@achempion Loving the work, it’s been a huge help so I don’t have to maintain my own forked arc in my project to have a PR I needed. ^.^

7 Likes

@achempion Great work and congrats on the v1.0.0 cut! Very glad to remove Poison dep from my project, thanks for the work.

4 Likes

Hi,
I like the library, good work. Is there any way to check if a image attachment has larger or equal resolution than 120x120?
Thanks