Skip to content
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

Is there any reason to keep yaws_sendfile_drv.c? #353

Closed
leoliu opened this issue Dec 12, 2018 · 12 comments
Closed

Is there any reason to keep yaws_sendfile_drv.c? #353

leoliu opened this issue Dec 12, 2018 · 12 comments

Comments

@leoliu
Copy link
Contributor

leoliu commented Dec 12, 2018

Erlang has file:sendfile/5 since R15 so I am wondering if it is time for yaws_sendfile_drv.c to go?

Keeping yaws_sendfile_drv.c has some downsides. It is painful when using embedded Yaws because yaws_sendfile starts it even when it is not needed. It needs extra care when using yaws as rebar3 deps.

At the moment I have a complex setup to deploy to centos from macOS and the setup can be reduced to one line if yaws_sendfile_drv.c is no more.

@vinoski
Copy link
Collaborator

vinoski commented Dec 12, 2018

True, it's probably time to retire this. I'll look into it.

@leoliu
Copy link
Contributor Author

leoliu commented Feb 1, 2019

Hi @vinoski, can this be done? I am dying to be able to pull Yaws as a rebar3 dep without much hassle. I think this is critical for people new to Yaws get started as well.

@vinoski
Copy link
Collaborator

vinoski commented Feb 2, 2019

I started working on it but I haven't completed it.

@leoliu
Copy link
Contributor Author

leoliu commented Feb 2, 2019

@vinoski, thanks for the update.

@vinoski
Copy link
Collaborator

vinoski commented Feb 4, 2019

The only current issue with this work is that some versions of R16 had buggy sendfile support. However, I believe the Yaws policy is to support the five most recent Erlang/OTP releases, so technically we can retire support for R16. I'll have to do that first.

@leoliu
Copy link
Contributor Author

leoliu commented Feb 4, 2019

Sounds good. Having OTP 17 as minimal requirement opens up other opportunities such as maps.

@vinoski
Copy link
Collaborator

vinoski commented Feb 16, 2019

@leoliu please have a look at the drop-yaws-sendfile branch, which currently passes Travis and builds correctly with rebar on Ubuntu. Feedback welcomed.

@leoliu
Copy link
Contributor Author

leoliu commented Feb 17, 2019

This is excellent news to the project! Thanks for the work.

I just added this line to rebar.config in a project and it is working like a charm. No complaints so far.

{yaws, {git, "https://github.com/klacke/yaws.git", {branch, "drop-yaws-sendfile"}}}

@vinoski
Copy link
Collaborator

vinoski commented Feb 23, 2019

This is now rebased to master, commit 0c700a7.

@vinoski vinoski closed this as completed Feb 23, 2019
@leoliu
Copy link
Contributor Author

leoliu commented Feb 23, 2019

@vinoski I just noticed one small issue. I now use Yaws as a rebar3 dep and after building a release the yaws-2.0.6 directory looks like this:

├── ebin
├── include
└── priv

all these subdirectories have a file Makefile.am which is unusual.

@vinoski
Copy link
Collaborator

vinoski commented Feb 25, 2019

There's an outstanding issue #262 that was opened a long time ago to add support for rebar3. It's been dormant for awhile but I just rebased master to the rebar3-support branch and pushed it here. I'd like to make changes specific to rebar3 on that branch, so can you try it and if the Makefile.am issue above is still a problem there, raise a new issue for it? Thanks.

@leoliu
Copy link
Contributor Author

leoliu commented Feb 25, 2019

Same issue with rebar3-support. See #368.

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

No branches or pull requests

2 participants