Git Product home page Git Product logo

Comments (1)

Mumfrey avatar Mumfrey commented on May 25, 2024

That's correct, by default everything defaults to a priority of 1000 that includes the priority for configs and mixins themselves. Mixins do not inherit the priority from their config, but you can specify a global default mixin priority in a config if you want to.

Config priority determines the order in which configs are applied to their targets, lower numbers are applied earlier, higher numbers later, so if one config is downstream of another, it should have higher priority.

Mixin priority is used to determine which specific mixin "wins" in any given conflict scenario. When a method is mixed in (either overwritten or added) it is decorated with an invisible annotation which stores the priority of the source mixin, if a later mixin comes along then its priority is compared with the annotated value and if it's higher then the new mixin wins, and if it's lower or equal then a warning is raised so that you know the downstream mixin's method was not applied.

This gives you fairly fine grained control of the application process, of course you can use config plugins to refine the process further.

from mixin.

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.