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

fix deprecated API usage in boiler_plate example #85

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fix deprecated API usage in boiler_plate example #85

wants to merge 2 commits into from

Conversation

utoni
Copy link

@utoni utoni commented Jan 20, 2020

  • use fio_url_s type instead of deprecated http_url_s

Signed-off-by: Toni Uhlig matzeton@googlemail.com

 - use fio_url_s type instead of deprecated http_url_s

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
@codecov-io
Copy link

codecov-io commented Jan 20, 2020

Codecov Report

Merging #85 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #85   +/-   ##
=======================================
  Coverage   50.36%   50.36%           
=======================================
  Files          34       34           
  Lines       13648    13648           
=======================================
  Hits         6874     6874           
  Misses       6774     6774
Impacted Files Coverage Δ
lib/facil/http/http.h 0% <ø> (ø) ⬆️
lib/facil/http/parsers/http1_parser.c 0% <ø> (ø) ⬆️
lib/facil/tls/fio_tls_missing.c 0% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c130672...fb18a37. Read the comment docs.

@boazsegev
Copy link
Owner

Hi @lnslbrty ,

Thank you for your PR 🙏🏻

Nice catch on the deprecation warning.

However, I think we will need to update the function call as well as the type (using fio_url_parse instead of http_url_parse).

Could you fix that before I merge?

Copy link
Owner

@boazsegev boazsegev left a comment

Choose a reason for hiding this comment

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

Thank you for the update. This is the line I was referring to.

examples/boiler_plate/src/cli.c Show resolved Hide resolved
@utoni
Copy link
Author

utoni commented Jan 24, 2020

Will do that ASAP.

@boazsegev
Copy link
Owner

Cool 😎

I'm mostly offline for the next week or two, but I'll try to merge as soon as I can :-)

@utoni
Copy link
Author

utoni commented Jan 25, 2020

Fixed.
I would also recommend to remove the broken makefile since all (modern) *Nix OSes support CMake (which is IMHO state-of-the-art technology).
I also need to investigate an issue regarding some explicit function pointer casts before I start porting facil.io to OpenWrt (and ofc maintaining the pkg).

…eprecated

 - added some missing initializers to some stack allocated structs

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
@boazsegev
Copy link
Owner

Hi @lnslbrty ,

Thank you for the PR and the updates 👍🏻

Fixed.

I'll probably merge it soon. My online time is still limited right now.

I would also recommend to remove the broken makefile since all (modern) *Nix OSes support CMake (which is IMHO state-of-the-art technology).

As for the CMake - I don't know why people use it. I find GNU make much easier to manage. However, I noticed you claim that the makefile is broken... how so?

I also need to investigate an issue regarding some explicit function pointer casts before I start porting facil.io to OpenWrt (and ofc maintaining the pkg).

Yes... facil.io uses some virtual function tables and pointer casting that walks a thin line by assuming that all pointers are an equal type-size (sizeof(uintptr_t)) - which might not be true on some older embedded systems (where function pointers are one length and type pointers are another length).

If you have any specific concerns I can help with, please let me know.

Kindly,
Bo.

@utoni
Copy link
Author

utoni commented Feb 2, 2020

As for the CMake - I don't know why people use it. I find GNU make much easier to manage. However, I noticed you claim that the makefile is broken... how so?

A simple make results in a missing main function error. I do not see any compile/linker commands since they are all "silenced". I would not recommend to do such things in Makefiles as it takes a lot more time to debug errors.
Another thing is the not-easy-to-read variable substitution. On my machine MAINSRC/MAIN_OBJS gets always expanded to an empty string.

Yes... facil.io uses some virtual function tables and pointer casting that walks a thin line by assuming that all pointers are an equal type-size (sizeof(uintptr_t)) - which might not be true on some older embedded systems (where function pointers are one length and type pointers are another length).

I'm working on it (but currently OOT - OutOfTime Exception). 😄

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.

None yet

3 participants