Giter VIP home page Giter VIP logo

Comments (9)

yurrriq avatar yurrriq commented on August 15, 2024

Perhaps the functions above should be optional callbacks in elli_handler instead.

from elli.

deadtrickster avatar deadtrickster commented on August 15, 2024

When erlang started in interactive mode and Elli is just another dependency (i.e. elli_prometheus tests), you can't just set {callback, elli_middleware} because it won't pass valid_callback since module isn't loaded yet. So either we should force module loading before/in valid_callback or don't call it at all.

This of course applies to 3d part middlewares too.

from elli.

yurrriq avatar yurrriq commented on August 15, 2024

Which module isn't loaded, elli_middleware or e.g. elli_prometheus?

from elli.

deadtrickster avatar deadtrickster commented on August 15, 2024

elli_middleware! Basically in interactive mode erlang won't load module until it called or its metadata asked.

from elli.

deadtrickster avatar deadtrickster commented on August 15, 2024

https://github.com/elli-lib/elli_prometheus/pull/11/files#diff-ccb26da865ea3c50c86dd4ae91942d2fR22

from elli.

yurrriq avatar yurrriq commented on August 15, 2024

I made the change from parsing Mod:module_info/1 to erlang:function_exported/3. Should we revert back?

from elli.

deadtrickster avatar deadtrickster commented on August 15, 2024

yeah!

from elli.

yurrriq avatar yurrriq commented on August 15, 2024

Done.

from elli.

deadtrickster avatar deadtrickster commented on August 15, 2024

Awesome, thanks!

from elli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.