Code Monkey home page Code Monkey logo

Comments (5)

sorentwo avatar sorentwo commented on July 30, 2024 1

Ok. On CI it would still have progressive compilation. I believe what's happening is that when the old version of the module initializes. I'm investigating and trying to recreate the problem still.

from oban.

sorentwo avatar sorentwo commented on July 30, 2024 1

The issue was that there wasn't a compilation dependency between the hooks and the worker, but the worker tried verifying hook modules during compilation. It's fixed for the next release.

from oban.

sorentwo avatar sorentwo commented on July 30, 2024

I don't believe an Oban module should use ensure_compiled!, since that can interfere with module compilation order and possibly cause deadlocks. However, something funny is happening here, and we'll get to the bottom of it.

I'm curious, is shared_hook really the module name? It's not a standard-looking module like MyApp.SharedHook?

from oban.

sorentwo avatar sorentwo commented on July 30, 2024

One other thing—is this happening in dev with code reloading, or from running a standalone mix compile?

from oban.

omaralsoudanii avatar omaralsoudanii commented on July 30, 2024

@sorentwo the module name is a standard-looking name like MyApp.SharedHook.
Indeed, something is funny happening here. In the beginning, I was looking into a different solution to this issue by trying to:

  • Ensure the file permission is correct
  • Rename the module
  • Place the module somewhere else in the app
  • Remove the explicit hooks attribute and use the implicit way for each module that is supposed to use the shared hook, which works but requires undesirable code duplication.

One other thing—is this happening in dev with code reloading, or from running a standalone mix compile?

It happens in both scenarios and sometimes randomly on GitHub CI which runs:

  • mix deps.get
  • mix deps.compile

Another weird fix that I forgot to mention on dev with code reloading is if I remove the hooks attribute and then start the server (Phoneix framework), then my app works without the compilation error. After that, I re-add the hooks attribute and start the server which runs without the compilation error.

from oban.

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.